Service always failing

I’m running “2.0.6.3_beta_2021-06-17” as a service on “Linux 5.13.0-41-generic #46~20.04.1-Ubuntu SMP Wed Apr 20 13:16:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux” (Linux Mint).
The service always fails. I can do

:~$ sudo systemctl reset-failed duplicati
:~$ sudo systemctl start duplicati
:~$ sudo systemctl status duplicati

and the service starts as expected and directly fails again

● duplicati.service - Duplicati web-server
     Loaded: loaded (/etc/systemd/system/duplicati.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-05-23 14:31:13 CEST; 4ms ago
   Main PID: 7000 (duplicati-serve)
      Tasks: 1 (limit: 18963)
     Memory: 128.0K
     CGroup: /system.slice/duplicati.service
             └─7000 /bin/bash /usr/bin/duplicati-server --webservice-interface=any --webservice-port=8200 --portable-mode

Mai 23 14:31:13 <hostname> systemd[1]: Started Duplicati web-server.
<user>@<hostname>:~$ sudo systemctl status duplicati
● duplicati.service - Duplicati web-server
     Loaded: loaded (/etc/systemd/system/duplicati.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2022-05-23 14:31:19 CEST; 14s ago
    Process: 7037 ExecStart=/usr/bin/duplicati-server $DAEMON_OPTS (code=exited, status=100)
   Main PID: 7037 (code=exited, status=100)

Mai 23 14:31:19 <hostname> systemd[1]: duplicati.service: Scheduled restart job, restart counter is at 5.
Mai 23 14:31:19 <hostname> systemd[1]: Stopped Duplicati web-server.
Mai 23 14:31:19 <hostname> systemd[1]: duplicati.service: Start request repeated too quickly.
Mai 23 14:31:19 <hostname> systemd[1]: duplicati.service: Failed with result 'exit-code'.
Mai 23 14:31:19 <hostname> systemd[1]: Failed to start Duplicati web-server.

Duplicati can however be started manually through the Mint main menu and as i can say so far be used to do a backup. Restore not yet tested.

If somebody could guide me to resolve this would be greatly appreciated.

thx

what gives sudo journalctl -e -u duplicati ?

thx for helping @gpatel-fr

This means somehow “fatal: impossible to open socket”:

Mai 23 14:31:18 <hostname> duplicati-server[7041]: Ein schwerwiegender Fehler trat in Duplicati auf: System.Exception: Öffnen von Socket nicht möglich, geprüfte Ports: 8200
Mai 23 14:31:18 <hostname> duplicati-server[7041]:   at Duplicati.Server.WebServer.Server..ctor (System.Collections.Generic.IDictionary`2[TKey,TValue] options) [0x00307] in <156011ea63b34859b4073abdbf0b1573>:0
Mai 23 14:31:18 <hostname> duplicati-server[7041]:   at Duplicati.Server.Program.StartWebServer (System.Collections.Generic.Dictionary`2[TKey,TValue] commandlineOptions) [0x00000] in <156011ea63b34859b4073abdbf0b1573>:0
Mai 23 14:31:18 <hostname> duplicati-server[7041]:   at Duplicati.Server.Program.RealMain (System.String[] _args) [0x00227] in <156011ea63b34859b4073abdbf0b1573>:0
Mai 23 14:31:19 <hostname> systemd[1]: duplicati.service: Main process exited, code=exited, status=100/n/a
Mai 23 14:31:19 <hostname> systemd[1]: duplicati.service: Failed with result 'exit-code'.
Mai 23 14:31:19 <hostname> systemd[1]: duplicati.service: Scheduled restart job, restart counter is at 5.
Mai 23 14:31:19 <hostname> systemd[1]: Stopped Duplicati web-server.
Mai 23 14:31:19 <hostname> systemd[1]: duplicati.service: Start request repeated too quickly.
Mai 23 14:31:19 <hostname> systemd[1]: duplicati.service: Failed with result 'exit-code'.
Mai 23 14:31:19 <hostname> systemd[1]: Failed to start Duplicati web-server.

the most usual reason for socket opening error is that the socket is already open, so what gives:

sudo ss -tapnu | grep 8200 | grep LISTEN

tcp   LISTEN 0      16                     0.0.0.0:8200           0.0.0.0:*      users:(("minidlnad",pid=1081,fd=8))

you are running an incompatible service that is using the port 8200.
As it don’t seem to be possible to setup it to use another port, you will have to setup Duplicati to use an available port. see Installation - Duplicati 2 User's Manual on editing /etc/default/duplicati to change the port.

1 Like

Setting up different port has done it.

I set “duplicati” to run at boot to have “Duplicati.GUI.TrayIcon” showing up.

All done. Well done.

thx a lot