RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.81k stars 10.74k forks source link

Failed to start Service for snap application rocketchat-server.rocketchat-server #14582

Open xjojoramirez opened 5 years ago

xjojoramirez commented 5 years ago

Description:

Service for snap application rocketchat-server does not auto start anymore.

Steps to reproduce:

  1. Turn on server.

Expected behavior:

Rocketchat must be actively running after turning on the server.

Actual behavior:

Rocketchat service status failure after turning on the server.

Server Setup Information:

Additional context

Relevant logs:

 snap.rocketchat-server.rocketchat-server.service - Service for snap applicatio
   Loaded: loaded (/etc/systemd/system/snap.rocketchat-server.rocketchat-server.
   Active: failed (Result: exit-code) since Wed 2019-05-22 00:01:09 UTC; 10min a
  Process: 2138 ExecStart=/usr/bin/snap run rocketchat-server (code=exited, stat
 Main PID: 2138 (code=exited, status=1/FAILURE)

May 22 00:01:09 smctchat_server systemd[1]: snap.rocketchat-server.rocketchat-se
May 22 00:01:09 smctchat_server systemd[1]: snap.rocketchat-server.rocketchat-se
May 22 00:01:09 smctchat_server systemd[1]: Stopped Service for snap application
May 22 00:01:09 smctchat_server systemd[1]: snap.rocketchat-server.rocketchat-se
May 22 00:01:09 smctchat_server systemd[1]: snap.rocketchat-server.rocketchat-se
May 22 00:01:09 smctchat_server systemd[1]: Failed to start Service for snap app
lines 1-12/12 (END)...skipping...
● snap.rocketchat-server.rocketchat-server.service - Service for snap application rocketchat-server.rocketchat-server
   Loaded: loaded (/etc/systemd/system/snap.rocketchat-server.rocketchat-server.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2019-05-22 00:01:09 UTC; 10min ago
  Process: 2138 ExecStart=/usr/bin/snap run rocketchat-server (code=exited, status=1/FAILURE)
 Main PID: 2138 (code=exited, status=1/FAILURE)

May 22 00:01:09 smctchat_server systemd[1]: snap.rocketchat-server.rocketchat-server.service: Service hold-off time over, scheduling restart.
May 22 00:01:09 smctchat_server systemd[1]: snap.rocketchat-server.rocketchat-server.service: Scheduled restart job, restart counter is at 6.
May 22 00:01:09 smctchat_server systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-server.
May 22 00:01:09 smctchat_server systemd[1]: snap.rocketchat-server.rocketchat-server.service: Start request repeated too quickly.
May 22 00:01:09 smctchat_server systemd[1]: snap.rocketchat-server.rocketchat-server.service: Failed with result 'exit-code'.
May 22 00:01:09 smctchat_server systemd[1]: Failed to start Service for snap application rocketchat-server.rocketchat-server.
kokspflanze commented 5 years ago

i had the same problem, connection problem to mongoDB

2019-06-05T20:05:46Z systemd[1]: Started Service for snap application rocketchat-server.rocketchat-server.
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: Checking if oplog has been enabled, and enabling if not
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: MongoDB shell version v3.4.20
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: connecting to: mongodb://127.0.0.1:27017
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: 2019-06-05T22:05:47.058+0200 W NETWORK  [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: 2019-06-05T22:05:47.059+0200 E QUERY    [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: connect@src/mongo/shell/mongo.js:240:13
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: @(connect):1:6
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: exception: connect failed
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: /snap/rocketchat-server/1377/bin/startRocketChat: line 28: /var/snap/rocketchat-server/common/*.env: No such file or directory

i try

snap remove rocketchat-server
snap start rocketchat-server

not best but working for me, maybe it help someone

xjojoramirez commented 5 years ago

@kokspflanze does it solve the issue? Does rocketchat-server auto starts now?

kokspflanze commented 5 years ago

@Mojoejojo yes, after the remove it was fixed the problem.

i also try to switch to an other version, but nothing changed.

reetp commented 5 years ago

Please close if this issue is resoved

agiletuan commented 5 years ago

i had the same problem, connection problem to mongoDB

2019-06-05T20:05:46Z systemd[1]: Started Service for snap application rocketchat-server.rocketchat-server.
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: Checking if oplog has been enabled, and enabling if not
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: MongoDB shell version v3.4.20
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: connecting to: mongodb://127.0.0.1:27017
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: 2019-06-05T22:05:47.058+0200 W NETWORK  [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: 2019-06-05T22:05:47.059+0200 E QUERY    [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: connect@src/mongo/shell/mongo.js:240:13
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: @(connect):1:6
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: exception: connect failed
2019-06-05T20:05:47Z rocketchat-server.rocketchat-server[3324]: /snap/rocketchat-server/1377/bin/startRocketChat: line 28: /var/snap/rocketchat-server/common/*.env: No such file or directory

i try

snap remove rocketchat-server
snap start rocketchat-server

not best but working for me, maybe it help someone

Thank you very much! You saved my night!

God bless you!

fedorenchik commented 4 years ago

how on earth can you start after remove ? what I get after remove is:

$ sudo snap remove rocketchat-server
rocketchat-server removed
$ sudo snap start rocketchat-server
error: snap "rocketchat-server" not found
Sensuz commented 4 years ago

i had the same problem, connection problem. Does it solved using @kokspflanze code?

Is it safe to remove rocketchat-server?

Sensuz commented 4 years ago

@fedorenchik how did you fixed the issue after sudo remove?

hueltonsantos commented 2 years ago

olá pessoal, porque quando instala via snap ele dar esse erro ? "root@huelton-rocket:/home/huelton# sudo systemctl status rocketchat Unit rocketchat.service could not be found." e não funciona nem a pau . Aguém aí poderia ajudar ?

fedorenchik commented 2 years ago

@fedorenchik how did you fixed the issue after sudo remove?

I haven't fixed the issue. :facepalm: