Installation: Failed to connect error on running 'sleep 20 && curl http://localhost:4000/api/v1/instance'

Running the OTP installation method (link below) and on the step where it says, # Wait for about 20 seconds and query the instance endpoint, if it shows your uri, name and email correctly, you are configured correctly.

I ran the said step:

sleep 20 && curl http://localhost:4000/api/v1/instance

But the output is:

curl: (7) Failed to connect to localhost port 4000: Connection refused

What am I doing wrong here? I’m running these commands as root and the Ubuntu flavor is amd64.

Installation link: Installing on Linux using OTP releases - Akkoma Documentation

You’ve messed up a prior step in that case. This step just tests it all works.

I nuked and paved first time I tried as I messed something up, which is why I wrote my guide; it was more so I could follow along than others, but I figured others might benefit also.

need more info here - when you boot the instance, does it start?

there should be logs

@snott Could you share the link for your guide please?
EDIT: I see you’ve written one for Debian. Would it be the same for Ubuntu?

@FloatingGhost I get the Welcome to nginx screen. How do I view the logs? I can share here. I ask because I’m following the steps of the official guide so might be helpful for others in future.

I tried @snott installation guide. Same error after running sleep 20 && curl http://localhost:4000/api/v1/instance

Sharing this additional info - there are two errors messages that I get in RED color when I run the following commands.

Success. You can now start the database server using:
    pg_ctlcluster 12 main start
Ver Cluster Port Status Owner    Data directory              Log file
12  main    5432 down   postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log

In the above,
12 main 5432 down postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
is in RED color.

When I run adduser --system --shell /bin/false --home /opt/akkoma akkoma

I get the following.

Adding system user `akkoma' (UID 114) ...
Adding new user `akkoma' (UID 114) with group `nogroup' ...
Creating home directory `/opt/akkoma' ...

Here akkoma' (UID 114) with group is in RED color (some kind of warning).

These are the only warning I get. Other than that the files extractions go fine.

Apart from that, I accepted the defaults or a Yes to each of the following.

What domain will your instance use? (e.g [] xxx.tld
What is the name of your instance? (e.g. The Corndog Emporium) [] xxxx
What is your admin email address? []
What email address do you want to use for sending email notifications? []
Do you want search engines to index your site? (y/n) [y] y
Do you want to store the configuration in the database (allows controlling it from admin-fe)? (y/n) [n] y
What is the hostname of your database? [localhost]
What is the name of your database? [akkoma]
What is the user used to connect to your database? [akkoma]
What is the password used to connect to your database? [autogenerated]
Would you like to use RUM indices? [n] y
What port will the app listen to (leave it if you are using the default setup with nginx)? [4000]
What ip will the app listen to (leave it if you are using the default setup with nginx)? []
What directory should media uploads go in (when using the local uploader)? [/var/lib/akkoma/uploads]
What directory should custom public files be read from (custom emojis, frontend bundle overrides, robots.txt, etc.)? [/var/lib/akkoma/static]
Do you want to strip location (GPS) data from uploaded images? This requires exiftool, it was detected as installed. (y/n) [y] y
Do you want to anonymize the filenames of uploads? (y/n) [n] y
Do you want to deduplicate uploaded files? (y/n) [n] y

none of the above is when you start the server


su akkoma -s $SHELL -lc "./bin/pleroma start

Should your command have a closing double quote? Like:

su akkoma -s $SHELL -lc "./bin/pleroma start"?
I did that and I got the following dump.

02:42:16.923 [notice]     :alarm_handler: {:set, {:system_memory_high_watermark, []}}

02:42:17.460 [error] Use `RUM` index is enabled, but were not applied migrations for it.
If you want to start Pleroma anyway, set
config :pleroma, :database, rum_enabled: false
Otherwise apply the following migrations:
`mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/`

02:42:17.461 [notice] Application pleroma exited: exited in: Pleroma.Application.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (Pleroma.ApplicationRequirements.VerifyError) Unapplied RUM Migrations detected
            (pleroma 3.4.0-0-gf91b89673) lib/pleroma/application_requirements.ex:32: Pleroma.ApplicationRequirements.handle_result/1
            (pleroma 3.4.0-0-gf91b89673) lib/pleroma/application.ex:55: Pleroma.Application.start/2
            (kernel application_master.erl:293: :application_master.start_it_old/4
[os_mon] memory supervisor port (memsup): Erlang has closed

02:42:17.474 [notice]     :alarm_handler: {:clear, :system_memory_high_watermark}
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
{"Kernel pid terminated",application_controller,"{application_start_failure,pleroma,{bad_return,{{'Elixir.Pleroma.Application',start,[normal,[]]},{'EXIT',{#{'__exception__' => true,'__struct__' => 'Elixir.Pleroma.ApplicationRequirements.VerifyError',message => <<\"Unapplied RUM Migrations detected\">>},[{'Elixir.Pleroma.ApplicationRequirements',handle_result,1,[{file,\"lib/pleroma/application_requirements.ex\"},{line,32}]},{'Elixir.Pleroma.Application',start,2,[{file,\"lib/pleroma/application.ex\"},{line,55}]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,293}]}]}}}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,pleroma,{bad_return,{{'Elixir.Pleroma.Application',start,[normal,[]]},{'EXIT',{#{'__exception__' => true,'__struct__' => 'Elixir.Pleroma.ApplicationRequirements.VerifyError',message => <<"Unapplied RUM Migrations detected">>},[{'Elixir.Pleroma.ApplicationRequirements',handle_result,1,[{file,"lib/pleroma/application_requirements.ex"},{line,32}]},{'Elixir.Pleroma.Application',start,2,[{file,"lib/pleroma/application.ex"},{line,55}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,293}]}]}}}}})

Crash dump is being written to: erl_crash.dump...done

If you followed my guide you would not have rum indices, so should have selected n for that question.

I was thinking the same. Thought it’d be cool to have the ‘search’ functionality. It was causing me a lot of problems anyhow.

Let me whip up a new droplet and try with No to the following?
Would you like to use RUM indices? [n]

My DigitalOcean droplet has the following configuration BTW.

2 GB Memory / 1 AMD vCPU / 50 GB Disk / - Ubuntu 20.04 (LTS) x64

1 Like

or you could follow the error message’s instruction and just change the setting in config :woozy_face:

1 Like

Also @snott Why have the following in the installation guide? It has always caused me problems if we’re going to say No to Rum indices anyway? Just a thought that crossed my mind - confusing for users as well.

apt install postgresql-11-rum

@FloatingGhost I would love to do that. But the steps? Nevertheless, have rebuilt my droplet, will get back. :slightly_smiling_face:

1 Like

@snott Installation successful! Sharing some notes (in case someone lands here) and suggestions.

After running su akkoma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/akkoma/config.exs --output-psql /tmp/setup_db.psql", I entered n for the following.

Would you like to use RUM indices? [n] n

Again, after running su akkoma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/akkoma/config.exs --output-psql /tmp/setup_db.psql"

I also got the following message in RED color. I ignored this.

!!! Config path is not declared! Please ensure it exists and that AKKOMA_CONFIG_PATH and/or PLEROMA_CONFIG_PATH is unset or points to an existing file

Suggestion: After running su akkoma -s $SHELL -lc "./bin/pleroma daemon" would be nice to have a ‘new line’ before root (for presentation) :slightly_smiling_face: Notice root@ms-in:~# in the below code.

{“approval_required”:false,“avatar_upload_limit”:2000000,“background_image”:“",“background_upload_limit”:4000000,“banner_upload_limit”:4000000,“description”:"Akkoma: The cooler fediverse server",“description_limit”:5000,“email”:"”,“languages”:[“en”],“max_toot_chars”:5000,“pleroma”:{“metadata”:{“account_activation_required”:false,“features”:[“pleroma_api”,“akkoma_api”,“mastodon_api”,“mastodon_api_streaming”,“polls”,“v2_suggestions”,“pleroma_explicit_addressing”,“shareable_emoji_packs”,“multifetch”,“pleroma:api/v1/notifications:include_types_filter”,“editing”,“relay”,“pleroma_emoji_reactions”,“exposable_reactions”,“profile_directory”,“custom_emoji_reactions”,“pleroma:get:main/ostatus”],“federation”:{“enabled”:true,“exclusions”:false,“mrf_hashtag”:{“federated_timeline_removal”:[],“reject”:[],“sensitive”:[“nsfw”]},“mrf_object_age”:{“actions”:[“delist”,“strip_followers”],“threshold”:604800},“mrf_policies”:[“ObjectAgePolicy”,“TagPolicy”,“HashtagPolicy”,“InlineQuotePolicy”],“quarantined_instances”:[],“quarantined_instances_info”:{“quarantined_instances”:{}}},“fields_limits”:{“max_fields”:10,“max_remote_fields”:20,“name_length”:512,“value_length”:2048},“post_formats”:[“text/plain”,“text/html”,“text/markdown”,“text/bbcode”,“text/x.misskeymarkdown”],“privileged_staff”:false},“stats”:{“mau”:0},“vapid_public_key”:“BJ_I-ZKrhy81oDvzeJGiOsjmK-3JipFpnUwipoYwK1Y5gaKhCkDNxhjDjNGDuD9uC1eFHGXYlfY8uqQKULZYsCk”},“poll_limits”:{“max_expiration”:31536000,“max_option_chars”:200,“max_options”:20,“min_expiration”:0},“registrations”:true,“stats”:{“domain_count”:0,“status_count”:0,“user_count”:0},“thumbnail”:“",“title”:"some title”,“upload_limit”:16000000,“uri”:“”,“urls”:{“streaming_api”:“wss://”},“version”:“2.7.2 (compatible; Akkoma 3.4.0-0-gf91b89673)”}root@ms-in:~#


  1. What’s the difference between the following? Same result, right?
    Your guide: certbot certonly --standalone --preferred-challenges http -d yourinstance.tld
    Other guides: certbot certonly --email <your@emailaddress> -d <yourdomain> --standalone

  2. In the Add email capability section of your guide, would be nice to have a sample example. Sendinblue has been the easiest to understand IMHO.

  3. If there’s a way to ‘bulk’ subscribe relays, would be great to have it in the Adding relays section.

Thank you both very much. I’m loving it here!

1 Like

I could be blind, but pretty sure I left that out of my guide deliberately - I will add a note and link to official documentation at that point.

My guide is a “I don’t know what I am doing but this worked” type deal. As I learn I will update it. Glad you got it going!

1 Like

I left that out of my guide deliberately

I understand where you’re coming from @snott

As someone who earns his living writing technical documentation, I’ll humbly suggest to put it all down. Perhaps as a running note.
We have this motto: “If it’s not documented, it does not exist”. So might as well dump all the messages and the troubleshooting steps, if any. As in, ‘what to do when a message is displayed? Ignore or do something?’ :slight_smile: