RocketChat / RocketChat/Rocket.Chat

It's can't start caddy service when upgrade from 3.18.3 to 4.1.2

Open
#23,851 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

I upgrade from 3.18.1 to 4.1.2 use snap.But it’s will can’t start caddy.
Error message:
2021-12-02T21:41:29+08:00 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-caddy. 2021-12-02T21:41:29+08:00 rocketchat-server.rocketchat-caddy[2351]: {“level”:“info”,“ts”:1638452489.7481782,“msg”:“using provided configuration”,“config_file”:"/var/snap/rocketchat-server/1494/Caddyfile",“config_adapter”:""} 2021-12-02T21:41:29+08:00 rocketchat-server.rocketchat-caddy[2351]: run: adapting config using caddyfile: /var/snap/rocketchat-server/1494/Caddyfile:2: unrecognized directive: proxy 2021-12-02T21:41:29+08:00 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Main process exited, code=exited, status=1/FAILURE 2021-12-02T21:41:29+08:00 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result ‘exit-code’. 2021-12-02T21:41:29+08:00 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Scheduled restart job, restart counter is at 5. 2021-12-02T21:41:29+08:00 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-caddy. 2021-12-02T21:41:29+08:00 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Start request repeated too quickly. 2021-12-02T21:41:29+08:00 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result ‘exit-code’. 2021-12-02T21:41:29+08:00 systemd[1]: Failed to start Service for snap application rocketchat-server.rocketchat-caddy.

Steps to reproduce:
  1. run this command to switch snap channel: snap switch rocketchat-server --channel=4.x/edge
  2. then run snap refresh rocketchat-server this command to upgrade and it's done.
  3. Then see caddy service can't start.
Expected behavior:

It's should all service started.

Actual behavior:
Server Setup Information:
  • Version of Rocket.Chat Server: 3.18.3 to 4.1.2
  • Operating System: Ubuntu 20.04
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: 12.22.1
  • MongoDB Version: 3.6.14
Client Setup Information
  • Desktop App or Browser Version: 3.6.0
  • Operating System: Win10
Additional context
Relevant logs:

2021-12-02T21:41:29+08:00 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-caddy.
2021-12-02T21:41:29+08:00 rocketchat-server.rocketchat-caddy[2351]: {“level”:“info”,“ts”:1638452489.7481782,“msg”:“using provided configuration”,“config_file”:"/var/snap/rocketchat-server/1494/Caddyfile",“config_adapter”:""}
2021-12-02T21:41:29+08:00 rocketchat-server.rocketchat-caddy[2351]: run: adapting config using caddyfile: /var/snap/rocketchat-server/1494/Caddyfile:2: unrecognized directive: proxy
2021-12-02T21:41:29+08:00 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Main process exited, code=exited, status=1/FAILURE
2021-12-02T21:41:29+08:00 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result ‘exit-code’.
2021-12-02T21:41:29+08:00 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Scheduled restart job, restart counter is at 5.
2021-12-02T21:41:29+08:00 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-caddy.
2021-12-02T21:41:29+08:00 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Start request repeated too quickly.
2021-12-02T21:41:29+08:00 systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result ‘exit-code’.
2021-12-02T21:41:29+08:00 systemd[1]: Failed to start Service for snap application rocketchat-server.rocketchat-caddy.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the generated /var/snap/rocketchat-server/1494/Caddyfile and the snap upgrade commands in the reproduction steps. Compare the Caddy configuration and service behavior before and after refreshing from the 3.x to 4.x channel, focusing on the reported unrecognized proxy directive. Done means the caddy service starts successfully after the documented snap upgrade.

Written by the indexing model from the issue text.

Assessment

Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.