Caddy fails to start, saying "Start request repeated too quickly". I have tried the command "rm -rf /root/snap/rocketchat-server/current/.caddy" but it still doesn't work.
Caddy should have been set up correctly, and allowed me to access the rocketchat instance in the new domain "chat.example.com" (with HTTPS)
I get an error, with Caddy's status saying (code=exited, status=1/FAILURE). Mongo will usually fail to start if a reboot occurs, although all I have to do is kill the process uses its port, and then restart mango, which fixes the issue.
Browser Admin Log:
[34mI20180505-13:48:27.110(0) Will load cache for users
[34mI20180505-13:48:27.149(0) 2 records load from users
[34mI20180505-13:48:27.151(0) Will load cache for rocketchat_room
[34mI20180505-13:48:27.163(0) 1 records load from rocketchat_room
[34mI20180505-13:48:27.164(0) Will load cache for rocketchat_subscription
[34mI20180505-13:48:27.165(0) 1 records load from rocketchat_subscription
[34mI20180505-13:48:27.166(0) Will load cache for rocketchat_settings
[34mI20180505-13:48:27.225(0) 635 records load from rocketchat_settings
[34mI20180505-13:48:28.977(0) Updating process.env.MAIL_URL
[34mI20180505-13:48:29.347(0) Starting Email Intercepter...
[34mI20180505-13:48:29.651(0) Will load cache for rocketchat_permissions
[34mI20180505-13:48:29.653(0) 77 records load from rocketchat_permissions
[34mI20180505-13:48:29.658(0) Will load cache for rocketchat_roles
[34mI20180505-13:48:29.659(0) 11 records load from rocketchat_roles
[34mI20180505-13:48:31.509(0) LocalStore: store created at
[34mI20180505-13:48:31.509(0) LocalStore: store created at
[34mI20180505-13:48:32.067(0) Setting default file store to GridFS
[34mI20180505-13:48:40.269(0) (rocketchat_migrations.js:152) Migrations: Not migrating, already at version 109
[34mI20180505-13:48:40.829(0) [32mUsing GridFS for custom sounds storage
[34mI20180505-13:48:40.855(0) [32mUsing GridFS for custom emoji storage
[34mI20180505-13:48:40.929(0) Updating process.env.MAIL_URL
[34mI20180505-13:48:43.759(0) [32mâž” [32mSystem âž” startup
[34mI20180505-13:48:43.762(0) [32mâž” [32m+--------------------------------------------+
[34mI20180505-13:48:43.764(0) [32mâž” [32m| SERVER RUNNING |
[34mI20180505-13:48:43.764(0) [32mâž” [32m+--------------------------------------------+
[34mI20180505-13:48:43.765(0) [32mâž” [32m| |
[34mI20180505-13:48:43.765(0) [32mâž” [32m| Rocket.Chat Version: 0.63.3 |
[34mI20180505-13:48:43.766(0) [32mâž” [32m| NodeJS Version: 8.9.4 - x64 |
[34mI20180505-13:48:43.766(0) [32mâž” [32m| Platform: linux |
[34mI20180505-13:48:43.767(0) [32mâž” [32m| Process Port: 3000 |
[34mI20180505-13:48:43.769(0) [32mâž” [32m| Site URL: http://chat.example.com:3000 |
[34mI20180505-13:48:43.769(0) [32mâž” [32m| ReplicaSet OpLog: Enabled |
[34mI20180505-13:48:43.770(0) [32mâž” [32m| Commit Hash: cbc951cead |
[34mI20180505-13:48:43.770(0) [32mâž” [32m| Commit Branch: HEAD |
[34mI20180505-13:48:43.771(0) [32mâž” [32m| |
[34mI20180505-13:48:43.771(0) [32mâž” [32m+--------------------------------------------+
Rocket.Chat's log:
-- Logs begin at Sat 2018-05-05 13:22:14 UTC, end at Sat 2018-05-05 14:08:55 UTC. --
May 05 13:22:14 ip-123-45-6-789 rocketchat-server.rocketchat-server[4161]: Was unable to connect to Mongo. Please make sure Mongo has started successfully: sudo systemctl status snap.rocketchat-server.rocketchat-mongo to view logs: sudo
May 05 13:22:14 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Main process exited, code=exited, status=1/FAILURE
May 05 13:22:14 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Unit entered failed state.
May 05 13:22:14 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Failed with result 'exit-code'.
May 05 13:22:14 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Service hold-off time over, scheduling restart.
May 05 13:22:14 ip-123-45-6-789 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-server.
May 05 13:22:14 ip-123-45-6-789 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-server.
May 05 13:22:14 ip-123-45-6-789 rocketchat-server.rocketchat-server[4497]: Mongo is not available, can't start. Waiting 10 seconds and trying again
May 05 13:22:24 ip-123-45-6-789 rocketchat-server.rocketchat-server[4497]: Mongo is not available, can't start. Waiting 15 seconds and trying again
May 05 13:22:39 ip-123-45-6-789 rocketchat-server.rocketchat-server[4497]: Mongo is not available, can't start. Waiting 20 seconds and trying again
May 05 13:22:59 ip-123-45-6-789 rocketchat-server.rocketchat-server[4497]: Mongo is not available, can't start. Waiting 25 seconds and trying again
May 05 13:23:24 ip-123-45-6-789 rocketchat-server.rocketchat-server[4497]: Mongo is not available, can't start. Waiting 30 seconds and trying again
May 05 13:23:54 ip-123-45-6-789 rocketchat-server.rocketchat-server[4497]: Was unable to connect to Mongo. Please make sure Mongo has started successfully: sudo systemctl status snap.rocketchat-server.rocketchat-mongo to view logs: sudo
May 05 13:23:54 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Main process exited, code=exited, status=1/FAILURE
May 05 13:23:54 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Unit entered failed state.
May 05 13:23:54 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Failed with result 'exit-code'.
May 05 13:23:54 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Service hold-off time over, scheduling restart.
May 05 13:23:54 ip-123-45-6-789 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-server.
May 05 13:23:54 ip-123-45-6-789 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-server.
May 05 13:23:54 ip-123-45-6-789 rocketchat-server.rocketchat-server[4859]: Mongo is not available, can't start. Waiting 10 seconds and trying again
May 05 13:24:05 ip-123-45-6-789 rocketchat-server.rocketchat-server[4859]: Mongo is not available, can't start. Waiting 15 seconds and trying again
May 05 13:24:20 ip-123-45-6-789 rocketchat-server.rocketchat-server[4859]: Mongo is not available, can't start. Waiting 20 seconds and trying again
May 05 13:24:40 ip-123-45-6-789 rocketchat-server.rocketchat-server[4859]: Mongo is not available, can't start. Waiting 25 seconds and trying again
May 05 13:25:05 ip-123-45-6-789 rocketchat-server.rocketchat-server[4859]: Mongo is not available, can't start. Waiting 30 seconds and trying again
May 05 13:25:35 ip-123-45-6-789 rocketchat-server.rocketchat-server[4859]: Was unable to connect to Mongo. Please make sure Mongo has started successfully: sudo systemctl status snap.rocketchat-server.rocketchat-mongo to view logs: sudo
May 05 13:25:35 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Main process exited, code=exited, status=1/FAILURE
May 05 13:25:35 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Unit entered failed state.
May 05 13:25:35 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Failed with result 'exit-code'.
May 05 13:25:35 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Service hold-off time over, scheduling restart.
May 05 13:25:35 ip-123-45-6-789 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-server.
May 05 13:25:35 ip-123-45-6-789 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-server.
May 05 13:25:35 ip-123-45-6-789 rocketchat-server.rocketchat-server[5196]: Mongo is not available, can't start. Waiting 10 seconds and trying again
May 05 13:25:45 ip-123-45-6-789 rocketchat-server.rocketchat-server[5196]: Mongo is not available, can't start. Waiting 15 seconds and trying again
May 05 13:26:00 ip-123-45-6-789 rocketchat-server.rocketchat-server[5196]: Mongo is not available, can't start. Waiting 20 seconds and trying again
May 05 13:26:20 ip-123-45-6-789 rocketchat-server.rocketchat-server[5196]: Mongo is not available, can't start. Waiting 25 seconds and trying again
May 05 13:26:45 ip-123-45-6-789 rocketchat-server.rocketchat-server[5196]: Mongo is not available, can't start. Waiting 30 seconds and trying again
May 05 13:27:15 ip-123-45-6-789 rocketchat-server.rocketchat-server[5196]: Was unable to connect to Mongo. Please make sure Mongo has started successfully: sudo systemctl status snap.rocketchat-server.rocketchat-mongo to view logs: sudo
May 05 13:27:15 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Main process exited, code=exited, status=1/FAILURE
May 05 13:27:15 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Unit entered failed state.
May 05 13:27:15 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Failed with result 'exit-code'.
May 05 13:27:15 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Service hold-off time over, scheduling restart.
May 05 13:27:15 ip-123-45-6-789 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-server.
May 05 13:27:15 ip-123-45-6-789 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-server.
May 05 13:27:15 ip-123-45-6-789 rocketchat-server.rocketchat-server[5530]: Mongo is not available, can't start. Waiting 10 seconds and trying again
May 05 13:27:25 ip-123-45-6-789 rocketchat-server.rocketchat-server[5530]: Mongo is not available, can't start. Waiting 15 seconds and trying again
May 05 13:27:40 ip-123-45-6-789 rocketchat-server.rocketchat-server[5530]: Mongo is not available, can't start. Waiting 20 seconds and trying again
May 05 13:28:00 ip-123-45-6-789 rocketchat-server.rocketchat-server[5530]: Mongo is not available, can't start. Waiting 25 seconds and trying again
May 05 13:28:25 ip-123-45-6-789 rocketchat-server.rocketchat-server[5530]: Mongo is not available, can't start. Waiting 30 seconds and trying again
May 05 13:28:55 ip-123-45-6-789 rocketchat-server.rocketchat-server[5530]: Was unable to connect to Mongo. Please make sure Mongo has started successfully: sudo systemctl status snap.rocketchat-server.rocketchat-mongo to view logs: sudo
May 05 13:28:55 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Main process exited, code=exited, status=1/FAILURE
May 05 13:28:55 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Unit entered failed state.
May 05 13:28:55 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Failed with result 'exit-code'.
May 05 13:28:55 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-server.service: Service hold-off time over, scheduling restart.
May 05 13:28:55 ip-123-45-6-789 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-server.
May 05 13:28:55 ip-123-45-6-789 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-server.
May 05 13:28:55 ip-123-45-6-789 rocketchat-server.rocketchat-server[5976]: Mongo is not available, can't start. Waiting 10 seconds and trying again
May 05 13:29:05 ip-123-45-6-789 rocketchat-server.rocketchat-server[5976]: Mongo is not available, can't start. Waiting 15 seconds and trying again
May 05 13:29:20 ip-123-45-6-789 rocketchat-server.rocketchat-server[5976]: Mongo is not available, can't start. Waiting 20 seconds and trying again
May 05 13:29:40 ip-123-45-6-789 rocketchat-server.rocketchat-server[5976]: Mongo is not available, can't start. Waiting 25 seconds and trying again
May 05 13:30:05 ip-123-45-6-789 rocketchat-server.rocketchat-server[5976]: Mongo is not available, can't start. Waiting 30 seconds and trying again
May 05 13:30:35 ip-123-45-6-789 rocketchat-server.rocketchat-server[5976]: Was unable to connect to Mongo. Please make sure Mongo has started successfully: sudo systemctl status snap.rocketchat-server.rocketchat-mongo to view logs: sudo
Mongo's Log:
-- Logs begin at Sat 2018-05-05 13:22:14 UTC, end at Sat 2018-05-05 14:10:45 UTC. --
May 05 13:46:37 ip-123-45-6-789 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-mongo.
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10617]: 2018-05-05T13:46:37.753+0000 I CONTROL [initandlisten] MongoDB starting : pid=10628 port=27017 dbpath=/var/snap/rocketchat-server/common 64-bit host=ip-123-45-6-
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10617]: 2018-05-05T13:46:37.754+0000 I CONTROL [initandlisten] db version v3.2.7
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10617]: 2018-05-05T13:46:37.754+0000 I CONTROL [initandlisten] git version: 4249c1d2b5999ebbf1fdf3bc0e0e3b3ff5c0aaf2
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10617]: 2018-05-05T13:46:37.754+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10617]: 2018-05-05T13:46:37.754+0000 I CONTROL [initandlisten] allocator: tcmalloc
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10617]: 2018-05-05T13:46:37.754+0000 I CONTROL [initandlisten] modules: none
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10617]: 2018-05-05T13:46:37.755+0000 I CONTROL [initandlisten] build environment:
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10617]: 2018-05-05T13:46:37.755+0000 I CONTROL [initandlisten] distmod: ubuntu1604
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10617]: 2018-05-05T13:46:37.755+0000 I CONTROL [initandlisten] distarch: x86_64
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10617]: 2018-05-05T13:46:37.755+0000 I CONTROL [initandlisten] target_arch: x86_64
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10617]: 2018-05-05T13:46:37.755+0000 I CONTROL [initandlisten] options: { net: { bindIp: "127.0.0.1" }, processManagement: { pidFilePath: "/var/snap/rocketchat-server/co
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10617]: 2018-05-05T13:46:37.781+0000 E NETWORK [initandlisten] listen(): bind() failed errno:98 Address already in use for socket: 127.0.0.1:27017
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10617]: 2018-05-05T13:46:37.781+0000 E NETWORK [initandlisten] addr already in use
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10617]: 2018-05-05T13:46:37.781+0000 E STORAGE [initandlisten] Failed to set up sockets during startup.
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10617]: 2018-05-05T13:46:37.781+0000 I CONTROL [initandlisten] dbexit: rc: 48
May 05 13:46:37 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-mongo.service: Main process exited, code=exited, status=48/n/a
May 05 13:46:37 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-mongo.service: Unit entered failed state.
May 05 13:46:37 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-mongo.service: Failed with result 'exit-code'.
May 05 13:46:37 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-mongo.service: Service hold-off time over, scheduling restart.
May 05 13:46:37 ip-123-45-6-789 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-mongo.
May 05 13:46:37 ip-123-45-6-789 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-mongo.
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10633]: 2018-05-05T13:46:37.990+0000 I CONTROL [initandlisten] MongoDB starting : pid=10644 port=27017 dbpath=/var/snap/rocketchat-server/common 64-bit host=ip-123-45-6-
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10633]: 2018-05-05T13:46:37.990+0000 I CONTROL [initandlisten] db version v3.2.7
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10633]: 2018-05-05T13:46:37.990+0000 I CONTROL [initandlisten] git version: 4249c1d2b5999ebbf1fdf3bc0e0e3b3ff5c0aaf2
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10633]: 2018-05-05T13:46:37.991+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10633]: 2018-05-05T13:46:37.991+0000 I CONTROL [initandlisten] allocator: tcmalloc
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10633]: 2018-05-05T13:46:37.991+0000 I CONTROL [initandlisten] modules: none
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10633]: 2018-05-05T13:46:37.991+0000 I CONTROL [initandlisten] build environment:
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10633]: 2018-05-05T13:46:37.991+0000 I CONTROL [initandlisten] distmod: ubuntu1604
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10633]: 2018-05-05T13:46:37.992+0000 I CONTROL [initandlisten] distarch: x86_64
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10633]: 2018-05-05T13:46:37.992+0000 I CONTROL [initandlisten] target_arch: x86_64
May 05 13:46:37 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10633]: 2018-05-05T13:46:37.992+0000 I CONTROL [initandlisten] options: { net: { bindIp: "127.0.0.1" }, processManagement: { pidFilePath: "/var/snap/rocketchat-server/co
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10633]: 2018-05-05T13:46:38.017+0000 E NETWORK [initandlisten] listen(): bind() failed errno:98 Address already in use for socket: 127.0.0.1:27017
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10633]: 2018-05-05T13:46:38.017+0000 E NETWORK [initandlisten] addr already in use
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10633]: 2018-05-05T13:46:38.018+0000 E STORAGE [initandlisten] Failed to set up sockets during startup.
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10633]: 2018-05-05T13:46:38.018+0000 I CONTROL [initandlisten] dbexit: rc: 48
May 05 13:46:38 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-mongo.service: Main process exited, code=exited, status=48/n/a
May 05 13:46:38 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-mongo.service: Unit entered failed state.
May 05 13:46:38 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-mongo.service: Failed with result 'exit-code'.
May 05 13:46:38 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-mongo.service: Service hold-off time over, scheduling restart.
May 05 13:46:38 ip-123-45-6-789 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-mongo.
May 05 13:46:38 ip-123-45-6-789 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-mongo.
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10647]: 2018-05-05T13:46:38.240+0000 I CONTROL [initandlisten] MongoDB starting : pid=10659 port=27017 dbpath=/var/snap/rocketchat-server/common 64-bit host=ip-123-45-6-
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10647]: 2018-05-05T13:46:38.241+0000 I CONTROL [initandlisten] db version v3.2.7
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10647]: 2018-05-05T13:46:38.241+0000 I CONTROL [initandlisten] git version: 4249c1d2b5999ebbf1fdf3bc0e0e3b3ff5c0aaf2
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10647]: 2018-05-05T13:46:38.241+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10647]: 2018-05-05T13:46:38.241+0000 I CONTROL [initandlisten] allocator: tcmalloc
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10647]: 2018-05-05T13:46:38.242+0000 I CONTROL [initandlisten] modules: none
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10647]: 2018-05-05T13:46:38.242+0000 I CONTROL [initandlisten] build environment:
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10647]: 2018-05-05T13:46:38.242+0000 I CONTROL [initandlisten] distmod: ubuntu1604
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10647]: 2018-05-05T13:46:38.242+0000 I CONTROL [initandlisten] distarch: x86_64
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10647]: 2018-05-05T13:46:38.242+0000 I CONTROL [initandlisten] target_arch: x86_64
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10647]: 2018-05-05T13:46:38.242+0000 I CONTROL [initandlisten] options: { net: { bindIp: "127.0.0.1" }, processManagement: { pidFilePath: "/var/snap/rocketchat-server/co
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10647]: 2018-05-05T13:46:38.268+0000 E NETWORK [initandlisten] listen(): bind() failed errno:98 Address already in use for socket: 127.0.0.1:27017
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10647]: 2018-05-05T13:46:38.268+0000 E NETWORK [initandlisten] addr already in use
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10647]: 2018-05-05T13:46:38.268+0000 E STORAGE [initandlisten] Failed to set up sockets during startup.
May 05 13:46:38 ip-123-45-6-789 rocketchat-server.rocketchat-mongo[10647]: 2018-05-05T13:46:38.268+0000 I CONTROL [initandlisten] dbexit: rc: 48
May 05 13:46:38 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-mongo.service: Main process exited, code=exited, status=48/n/a
May 05 13:46:38 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-mongo.service: Unit entered failed state.
May 05 13:46:38 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-mongo.service: Failed with result 'exit-code'.
Caddy's Log:
-- Logs begin at Sat 2018-05-05 13:22:14 UTC, end at Sat 2018-05-05 14:05:53 UTC. --
May 05 13:34:09 ip-123-45-6-789 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:34:09 ip-123-45-6-789 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:34:10 ip-123-45-6-789 rocketchat-server.rocketchat-caddy[7133]: Activating privacy features... 2018/05/05 13:34:10 [chat.example.com] failed to get certificate: [chat.example.com] error presenting token: presenting with standard HTTP p
May 05 13:34:10 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Main process exited, code=exited, status=1/FAILURE
May 05 13:34:10 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Unit entered failed state.
May 05 13:34:10 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result 'exit-code'.
May 05 13:34:10 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Service hold-off time over, scheduling restart.
May 05 13:34:10 ip-123-45-6-789 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:34:10 ip-123-45-6-789 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:34:11 ip-123-45-6-789 rocketchat-server.rocketchat-caddy[7154]: Activating privacy features... 2018/05/05 13:34:11 [chat.example.com] failed to get certificate: [chat.example.com] error presenting token: presenting with standard HTTP p
May 05 13:34:11 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Main process exited, code=exited, status=1/FAILURE
May 05 13:34:11 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Unit entered failed state.
May 05 13:34:11 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result 'exit-code'.
May 05 13:34:11 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Service hold-off time over, scheduling restart.
May 05 13:34:11 ip-123-45-6-789 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:34:11 ip-123-45-6-789 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:34:12 ip-123-45-6-789 rocketchat-server.rocketchat-caddy[7172]: Activating privacy features... 2018/05/05 13:34:12 [chat.example.com] failed to get certificate: [chat.example.com] error presenting token: presenting with standard HTTP p
May 05 13:34:12 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Main process exited, code=exited, status=1/FAILURE
May 05 13:34:12 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Unit entered failed state.
May 05 13:34:12 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result 'exit-code'.
May 05 13:34:12 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Service hold-off time over, scheduling restart.
May 05 13:34:12 ip-123-45-6-789 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:34:12 ip-123-45-6-789 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:34:13 ip-123-45-6-789 rocketchat-server.rocketchat-caddy[7195]: Activating privacy features... 2018/05/05 13:34:13 [chat.example.com] failed to get certificate: [chat.example.com] error presenting token: presenting with standard HTTP p
May 05 13:34:13 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Main process exited, code=exited, status=1/FAILURE
May 05 13:34:13 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Unit entered failed state.
May 05 13:34:13 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result 'exit-code'.
May 05 13:34:13 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Service hold-off time over, scheduling restart.
May 05 13:34:13 ip-123-45-6-789 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:34:13 ip-123-45-6-789 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:34:14 ip-123-45-6-789 rocketchat-server.rocketchat-caddy[7216]: Activating privacy features... 2018/05/05 13:34:14 [chat.example.com] failed to get certificate: [chat.example.com] error presenting token: presenting with standard HTTP p
May 05 13:34:14 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Main process exited, code=exited, status=1/FAILURE
May 05 13:34:14 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Unit entered failed state.
May 05 13:34:14 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result 'exit-code'.
May 05 13:34:14 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Service hold-off time over, scheduling restart.
May 05 13:34:14 ip-123-45-6-789 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:34:14 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Start request repeated too quickly.
May 05 13:34:14 ip-123-45-6-789 systemd[1]: Failed to start Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:35:31 ip-123-45-6-789 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:35:31 ip-123-45-6-789 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:35:31 ip-123-45-6-789 rocketchat-server.rocketchat-caddy[7494]: Activating privacy features... done.
May 05 13:35:31 ip-123-45-6-789 rocketchat-server.rocketchat-caddy[7494]: 2018/05/05 13:35:31 listen tcp :80: listen: address already in use
May 05 13:35:31 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Main process exited, code=exited, status=1/FAILURE
May 05 13:35:31 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Unit entered failed state.
May 05 13:35:31 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result 'exit-code'.
May 05 13:35:31 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Service hold-off time over, scheduling restart.
May 05 13:35:31 ip-123-45-6-789 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:35:31 ip-123-45-6-789 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:35:31 ip-123-45-6-789 rocketchat-server.rocketchat-caddy[7509]: Activating privacy features... done.
May 05 13:35:31 ip-123-45-6-789 rocketchat-server.rocketchat-caddy[7509]: 2018/05/05 13:35:31 listen tcp :80: listen: address already in use
May 05 13:35:31 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Main process exited, code=exited, status=1/FAILURE
May 05 13:35:31 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Unit entered failed state.
May 05 13:35:31 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result 'exit-code'.
May 05 13:35:31 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Service hold-off time over, scheduling restart.
May 05 13:35:31 ip-123-45-6-789 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:35:31 ip-123-45-6-789 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-caddy.
May 05 13:35:31 ip-123-45-6-789 rocketchat-server.rocketchat-caddy[7528]: Activating privacy features... done.
May 05 13:35:31 ip-123-45-6-789 rocketchat-server.rocketchat-caddy[7528]: 2018/05/05 13:35:31 listen tcp :80: listen: address already in use
May 05 13:35:31 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Main process exited, code=exited, status=1/FAILURE
May 05 13:35:31 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Unit entered failed state.
May 05 13:35:31 ip-123-45-6-789 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result 'exit-code'.
can you post your caddy configuration file?
Also, if you disable caddy (blank config or stop running it), does rocket chat work?
I've got the same issue. Running Ubuntu 16.04. The snap installs rocketchat-server correctly (I can use it as http), but either Caddy is broken or the documentation is wrong. Following the documentation:
rocketchat-server.initcaddy
snap run rocketchat-server.initcaddy
Then edit Caddyfile to hold {where mydomain.com is my actual domain name}
http://mydomain.com
proxy / localhost:3000 {
websocket
transparent
}
Restart and check the status
systemctl restart snap.rocketchat-server.rocketchat-caddy
systemctl status snap.rocketchat-server.rocketchat-caddy
I get this output:
snap.rocketchat-server.rocketchat-caddy.service - Service for snap application rocketchat-server.rocketchat-caddy
Loaded: loaded (/etc/systemd/system/snap.rocketchat-server.rocketchat-caddy.service; enabled; vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Sun 2018-07-22 14:36:08 UTC; 4s ago
Process: 25771 ExecStart=/usr/bin/snap run rocketchat-server.rocketchat-caddy (code=exited, status=1/FAILURE)
Main PID: 25771 (code=exited, status=1/FAILURE)
Jul 22 14:36:08 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Unit entered failed state.
Jul 22 14:36:08 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result 'exit-code'.
Jul 22 14:36:08 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Service hold-off time over, scheduling restart.
Jul 22 14:36:08 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-caddy.
Jul 22 14:36:08 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Start request repeated too quickly.
Jul 22 14:36:08 systemd[1]: Failed to start Service for snap application rocketchat-server.rocketchat-caddy.
try removing the "http://"
mydomain.com
proxy / localhost:3000 {
websocket
transparent
}
That doesn't change anything - I get the same message after restarting Caddy.
I had the same issue. What resolved it for me was deleting the Caddy directory rm -rf /root/snap/rocketchat-server/current/.caddy and restarting the service as per https://github.com/RocketChat/Rocket.Chat/issues/7419#issuecomment-384332125 (Hat tip @mirzazeyrek)
Make sure your DNS records are correct, and also be aware of the Letsencrypt rate limits
Check the issue thread I linked to for other troubleshooting tips.
Thanks but it still does the same thing. Edit: I found a solution. I created a new Ubuntu 18.04 droplet on Digital Ocean and everything works perfectly.
Since this looks like more of a support request than a bug report, and the person who posted this seems to have resolved the issue, I will be closing this. If further support is needed please see our guidelines for support. Thanks!
Most helpful comment
I had the same issue. What resolved it for me was deleting the Caddy directory
rm -rf /root/snap/rocketchat-server/current/.caddyand restarting the service as per https://github.com/RocketChat/Rocket.Chat/issues/7419#issuecomment-384332125 (Hat tip @mirzazeyrek)Make sure your DNS records are correct, and also be aware of the Letsencrypt rate limits
Check the issue thread I linked to for other troubleshooting tips.