simplex-chat / simplex-chat/simplexmq

Systemd Failure On Detailed Install

Open
#1,402 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haskell
Stars
847
Forks
111
Avg merge
3d 11h
Merged PRs (30d)
9

Description

Followed the steps:
https://simplex.chat/docs/server.html
Started a new install of xmq and came across an issue at step 5. Optional — If you're using distribution with systemd, create /etc/systemd/system/smp-server.service file with the following content:

When running the systemd service it shows an error

root@smp-nl-001:/usr/local/bin# simplex-servers-certs
cp: cannot stat '/var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/smp.MYDOMAIN.link/smp.MYDOMAIN.link.crt': No such file or directory
root@smp-nl-001:/usr/local/bin# systemctl status smp-server
× smp-server.service - SMP server
     Loaded: loaded (/etc/systemd/system/smp-server.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2024-11-04 10:15:49 UTC; 2h 0min ago
   Main PID: 21179 (code=exited, status=1/FAILURE)
        CPU: 21ms

Nov 04 10:15:49 smp-nl-001 smp-server[21179]: Error: no HTTPS credentials: /etc/opt/simplex/web.crt, /etc/opt/simplex/web.key
Nov 04 10:15:49 smp-nl-001 smp-server[21179]: Use Let's Encrypt to generate: certbot certonly --standalone -d yourdomainname --key-type rsa --rsa-key-size 4096
Nov 04 10:15:49 smp-nl-001 smp-server[21179]: [INFO 2024-11-04 10:15:49 +0000 src/Simplex/Messaging/Server/Env/STM.hs:253] restoring queues from file /var/opt/simplex/smp-server-store.log
Nov 04 10:15:49 smp-nl-001 smp-server[21179]: [INFO 2024-11-04 10:15:49 +0000 src/Simplex/Messaging/Server/StoreLog.hs:220] creating store log...
Nov 04 10:15:49 smp-nl-001 smp-server[21179]: [DEBUG 2024-11-04 10:15:49 +0000 src/Simplex/Messaging/Server/Main.hs:286] Releasing web server resources...
Nov 04 10:15:49 smp-nl-001 smp-server[21179]:
Nov 04 10:15:49 smp-nl-001 systemd[1]: smp-server.service: Main process exited, code=exited, status=1/FAILURE
Nov 04 10:15:49 smp-nl-001 simplex-servers-stopscript[21199]: Refusing to backup files with failed service state
Nov 04 10:15:49 smp-nl-001 systemd[1]: smp-server.service: Control process exited, code=exited, status=1/FAILURE
Nov 04 10:15:49 smp-nl-001 systemd[1]: smp-server.service: Failed with result 'exit-code'.

dmesg: Output: shows nothing

I tried moving forward to the caddy section where I encountered a second issue
step 6 of the Caddy install
Make the script executable and execute it:
Error:
:/usr/local/bin# chmod +x /usr/local/bin/simplex-servers-certs && /usr/local/bin/simplex-servers-certs cp: cannot stat '/var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/smp.MYDOMAIN.link/smp.MYDOMAIN.link.crt': No such file or directory

If anyone could give me some direction on where I am going wrong with the detailed install steps, I would be grateful.

Contributor guide

No contributing guide indexed for this repository

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 server installation steps at https://simplex.chat/docs/server.html, especially the systemd service definition and Caddy step 6. Trace how simplex-servers-certs obtains the certificate and compare it with the paths and service errors reported here; done means the documented sequence works for a fresh install and the service reaches an active state.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
devops, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.