Can't start the Mastodon process

Hello… After my instance got errors of unknown cause, I decided to reinstall my ubuntu vps. Looks like that every step goes Ok, except the final step. The cure elephant keeps hitting the computer screen when I open my instance’s homepage. Even I have set these orders:

systemctl daemon-reload
systemctl start --now mastodon-web mastodon-sidekiq mastodon-streaming
systemctl enable --now mastodon-web mastodon-sidekiq mastodon-streaming

I know in fact my mastodon process has not started, but can someone help me? Thanks.

As always, check your logs using journalctl command

1 Like

Hello.
Before I do that, should I change to mastodon user?Or still as root user?

I see this logs file:

mastodon@vmi634771:/root$ journalctl
Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal' can see all messages.
      Pass -q to turn off this notice.
-- Logs begin at Sun 2021-12-19 03:05:30 CST, end at Mon 2021-12-20 03:50:45 CST. --
Dec 19 03:05:30 vmi634771.contaboserver.net node[31073]: WARN Starting streaming API server master with 1 workers
Dec 19 03:05:30 vmi634771.contaboserver.net node[31073]: WARN Starting worker 1
Dec 19 03:05:30 vmi634771.contaboserver.net node[31073]: ERR! Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
Dec 19 03:05:30 vmi634771.contaboserver.net node[31073]: WARN Worker 1 exiting
Dec 19 03:05:31 vmi634771.contaboserver.net node[31073]: WARN Starting worker 2
Dec 19 03:05:31 vmi634771.contaboserver.net node[31073]: WARN Worker 2 now listening on 127.0.0.1:4000
Dec 19 03:05:31 vmi634771.contaboserver.net node[31073]: ERR! Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
Dec 19 03:05:31 vmi634771.contaboserver.net node[31073]: WARN Worker 2 exiting
Dec 19 03:05:31 vmi634771.contaboserver.net bundle[31068]: [31068] Puma starting in cluster mode...
Dec 19 03:05:31 vmi634771.contaboserver.net bundle[31068]: [31068] * Puma version: 5.3.2 (ruby 2.7.2-p137) ("Sweetnighter")
Dec 19 03:05:31 vmi634771.contaboserver.net bundle[31068]: [31068] *  Min threads: 5
Dec 19 03:05:31 vmi634771.contaboserver.net bundle[31068]: [31068] *  Max threads: 5
Dec 19 03:05:31 vmi634771.contaboserver.net bundle[31068]: [31068] *  Environment: production
Dec 19 03:05:31 vmi634771.contaboserver.net bundle[31068]: [31068] *   Master PID: 31068
Dec 19 03:05:31 vmi634771.contaboserver.net bundle[31068]: [31068] *      Workers: 2
Dec 19 03:05:31 vmi634771.contaboserver.net bundle[31068]: [31068] *     Restarts: (✔) hot (✖) phased
Dec 19 03:05:31 vmi634771.contaboserver.net bundle[31068]: [31068] * Preloading application
Dec 19 03:05:31 vmi634771.contaboserver.net node[31073]: WARN Starting worker 3
Dec 19 03:05:31 vmi634771.contaboserver.net node[31073]: WARN Worker 3 now listening on 127.0.0.1:4000
Dec 19 03:05:31 vmi634771.contaboserver.net node[31073]: ERR! Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
Dec 19 03:05:31 vmi634771.contaboserver.net node[31073]: WARN Worker 3 exiting
Dec 19 03:05:31 vmi634771.contaboserver.net node[31073]: WARN Starting worker 4
Dec 19 03:05:31 vmi634771.contaboserver.net node[31073]: WARN Worker 4 now listening on 127.0.0.1:4000
Dec 19 03:05:31 vmi634771.contaboserver.net node[31073]: ERR! Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
Dec 19 03:05:31 vmi634771.contaboserver.net node[31073]: WARN Worker 4 exiting
Dec 19 03:05:32 vmi634771.contaboserver.net node[31073]: WARN Starting worker 5
Dec 19 03:05:32 vmi634771.contaboserver.net node[31073]: WARN Worker 5 now listening on 127.0.0.1:4000
Dec 19 03:05:32 vmi634771.contaboserver.net node[31073]: ERR! Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
Dec 19 03:05:32 vmi634771.contaboserver.net node[31073]: WARN Worker 5 exiting
Dec 19 03:05:32 vmi634771.contaboserver.net node[31073]: WARN Starting worker 6
Dec 19 03:05:32 vmi634771.contaboserver.net node[31073]: WARN Worker 6 now listening on 127.0.0.1:4000
Dec 19 03:05:32 vmi634771.contaboserver.net node[31073]: ERR! Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
Dec 19 03:05:32 vmi634771.contaboserver.net node[31073]: WARN Worker 6 exiting
Dec 19 03:05:32 vmi634771.contaboserver.net node[31073]: WARN Starting worker 7
Dec 19 03:05:32 vmi634771.contaboserver.net node[31073]: WARN Worker 7 now listening on 127.0.0.1:4000
Dec 19 03:05:32 vmi634771.contaboserver.net node[31073]: ERR! Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
Dec 19 03:05:32 vmi634771.contaboserver.net node[31073]: WARN Worker 7 exiting
Dec 19 03:05:32 vmi634771.contaboserver.net node[31073]: WARN Starting worker 8
Dec 19 03:05:32 vmi634771.contaboserver.net node[31073]: WARN Worker 8 now listening on 127.0.0.1:4000
Dec 19 03:05:32 vmi634771.contaboserver.net node[31073]: ERR! Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
Dec 19 03:05:32 vmi634771.contaboserver.net node[31073]: WARN Worker 8 exiting
Dec 19 03:05:33 vmi634771.contaboserver.net node[31073]: WARN Starting worker 9
Dec 19 03:05:33 vmi634771.contaboserver.net node[31073]: WARN Worker 9 now listening on 127.0.0.1:4000
Dec 19 03:05:33 vmi634771.contaboserver.net node[31073]: ERR! Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
Dec 19 03:05:33 vmi634771.contaboserver.net node[31073]: WARN Worker 9 exiting
Dec 19 03:05:33 vmi634771.contaboserver.net node[31073]: WARN Starting worker 10
Dec 19 03:05:33 vmi634771.contaboserver.net node[31073]: WARN Worker 10 now listening on 127.0.0.1:4000
Dec 19 03:05:33 vmi634771.contaboserver.net node[31073]: ERR! Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
Dec 19 03:05:33 vmi634771.contaboserver.net node[31073]: WARN Worker 10 exiting
Dec 19 03:05:33 vmi634771.contaboserver.net node[31073]: WARN Starting worker 11
Dec 19 03:05:33 vmi634771.contaboserver.net node[31073]: WARN Worker 11 now listening on 127.0.0.1:4000
Dec 19 03:05:33 vmi634771.contaboserver.net node[31073]: ERR! Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
Dec 19 03:05:33 vmi634771.contaboserver.net node[31073]: WARN Worker 11 exiting
Dec 19 03:05:33 vmi634771.contaboserver.net bundle[31068]: /home/mastodon/.rbenv/versions/2.7.2/lib/ruby/2.7.0/net/protocol.rb:66: warning: already initialized constant Net::ProtoDec 19 03:05:33 vmi634771.contaboserver.net bundle[31068]: /home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/net-protocol-0.1.0/lib/net/protocol.rb:66: warning: previous definitioDec 19 03:05:33 vmi634771.contaboserver.net bundle[31068]: /home/mastodon/.rbenv/versions/2.7.2/lib/ruby/2.7.0/net/protocol.rb:206: warning: already initialized constant Net::BuffDec 19 03:05:33 vmi634771.contaboserver.net bundle[31068]: /home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/net-protocol-0.1.0/lib/net/protocol.rb:206: warning: previous definitiDec 19 03:05:33 vmi634771.contaboserver.net bundle[31068]: /home/mastodon/.rbenv/versions/2.7.2/lib/ruby/2.7.0/net/protocol.rb:503: warning: already initialized constant Net::NetPDec 19 03:05:33 vmi634771.contaboserver.net bundle[31068]: /home/mastodon/live/vendor/bundle/ruby/2.7.0/gems/net-protocol-0.1.0/lib/net/protocol.rb:503: warning: previous definitiDec 19 03:05:34 vmi634771.contaboserver.net node[31073]: WARN Starting worker 12
Dec 19 03:05:34 vmi634771.contaboserver.net node[31073]: WARN Worker 12 now listening on 127.0.0.1:4000
Dec 19 03:05:34 vmi634771.contaboserver.net node[31073]: ERR! Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
Dec 19 03:05:34 vmi634771.contaboserver.net node[31073]: WARN Worker 12 exiting
Dec 19 03:05:34 vmi634771.contaboserver.net bundle[31069]: /home/mastodon/.rbenv/versions/2.7.2/lib/ruby/2.7.0/net/protocol.rb:66: warning: already initialized constant Net::Protolines 1-65

Is it because of the redis? Thank you.

Thank you. One thing that is obvious from your log is that redis is not running. Make sure PostgreSQL and redis are running before trying to start mastodon.

1 Like

@saper Thank you for your help. Even facing some problems when installing the Redis server, however, the main problem gets resolved by following your tips. My instance come back again :fireworks: :fireworks:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.