Can't connect to DSM started Duplicati after Synology 6.2 update

Just updated to latest DSM 6.2, copied back all the stuff from root/.config/Duplicati/, installed the certificates for mono and then noticed that I’m no longer able to connect to the UI - not inside DSM nor via direct call to port 8200 . When running the server manually it works fine but not when just starting the package inside DSM. I went through all the hints here but nothing really worked… Anyone the same issues? Or hints what to try.

Running 2.0.3.6_canary_2018-04-23 on a DS115j and that worked all fine with DSM 6.1.6

Hi @tilltoll, welcome to the forum!

I moved your post to it’s own topic with a more descriptive title with the hopes that somebody who has a Synology box might chime in.

Just to clarify, when Duplicati is working via a manual run are you seeing all your jobs and such from before the DSM update? (In other words, can you at least do a manual run in case a Restore is necessary?)

Do you see any error messages (either in DSM or Duplicati logs) when Duplicati fails to start from inside DSM?

My NAS still tells me 6.1.7 is the latest version. Guess they are doing a gradual rollout. When I get 6.2 I’ll let you know if I have the same issue, but maybe I should wait!

Updating DSM wiped all /root/.config/Duplicati - Knowing that I saved the directory and put it back after the update. When manually starting Duplicati.Server.exe I can see all config, looks all fine. Backups also run without any issue.
I see no entry in the Duplicati-server.sqlite db. For the synology logs I don’t know where exactly I would find the relevant log.

It sounds like @Wim_Jansen may have also used Duplicati on a Synology box, maybe he’s gotten the same update as you already…

I always start the server manually as I was never able to directly connect via the port. And havent upgraded yet.

Yep, I noticed that with previous DSM updates. I ended up moving the Duplicati database and other stuff to /volume1, and then just creating a symlink in /root/.config. When a DSM update wipes out that folder I only have to recreate the symlink.

2 Likes

So, I tried again to re-install mono and duplicati. Then i started the package from within DSM and checked again the log which looks a bit weird to me. Looks as if there is a second instance running or that it gets started twice.

2018/06/15 18:45:31 start Duplicati: begin to stop version 2.0.3.6
2018/06/15 18:45:32 start Duplicati 2.0.3.6 Begin start-stop-status stop
mono is /usr/local/bin/mono
duplicati is NOT running …
Nothing to stop for duplicati.
duplicati is NOT running …
2018/06/15 18:45:34 start Duplicati 2.0.3.6 End start-stop-status stop ret=[0]
2018/06/15 18:45:34 start Duplicati 2.0.3.6 Begin unload apparmor
2018/06/15 18:45:34 start Duplicati 2.0.3.6 End unload apparmor ret=[0]
2018/06/15 18:45:34 start Duplicati: stop version 2.0.3.6 successfully, result 0
2018/06/15 18:45:54 start Duplicati: begin to start version 2.0.3.6
2018/06/15 18:45:59 start Duplicati 2.0.3.6 Begin pre-load apparmor
2018/06/15 18:45:59 start Duplicati 2.0.3.6 End pre-load apparmor ret=[0]
2018/06/15 18:45:59 start Duplicati 2.0.3.6 Begin start-stop-status start
mono is /usr/local/bin/mono
duplicati is NOT running …
Starting duplicati.
duplicati is running …
2018/06/15 18:46:02 start Duplicati 2.0.3.6 End start-stop-status start ret=[0]
2018/06/15 18:46:05 start Duplicati: start version 2.0.3.6 successfully, result 0
Another instance is running, and was notified

Someone an idea how to analyze further?

I don’t know about analyzing Synology specifically, but if at least one version seems to be running does that mean you can get to the web GUI on either port 8200 or 8300?

I’ve just installed this on my DS918+ and i get the same error. So haven’t been able to use it at all. cannot access it outside the DSM interface either

Unfortunately, I don’t have a Synology box to check this out on but maybe some of the other DSM + Duplicati users here (such as @conrad, @ToH2002, @David_Jameson, @rickard, @Dick_Hoogendoorn or @kenkendk) might have some ideas.

Just out of curiosity, have you noticed any similar posts in the DSM forums (that I guess I’m assuming must exist somewhere)?

I’m using Duplicati 2.0.3.3_beta_2018-04-02 on Synology DSM 6.2-23739 Update 2. I gave up trying to run it from Synology’s package manager (I do install it using that though) and currently run it manually by command line as root; it should be possible to do this automatically on boot using the Task Scheduler, but due to chronic myopic laziness I haven’t bothered setting that up yet. The command line I use is along these lines:

  export TMPDIR=/volume1/backup/duplicati/tmp ; \
      /volume1/@appstore/mono/bin/mono-sgen \
      /volume1/@appstore/Duplicati/Duplicati.Server.exe \
      --server-datafolder=/volume1/backup/duplicati \
      --webservice-interface=any --webservice-port=8200 \
      --webservice-password=whatever

… I set TMPDIR and server-datafolder because the default location for these on Synology is quite small (2GB for / on my box), and I ran into problems because

  1. Duplicati’s database for my ~1.4TB of backups takes up 11GB.
  2. It seems that Duplicati can easily use 1GB in /tmp during a backup run.

… in both cases the causes of the failures involved were not obvious. My research indicated that enlarging the root partition under DSM is impossible without a reinstall from scratch. If you use separate server data and temp directories like this, make sure you create the /backup volume in DSM and the /backup/duplicati/tmp directory with appropriate permissions!

For security reasons you may wish to be cautious about the exact switches you use for the web service and password!

2 Likes

I have this issue whenever there is a big Synology update. I check the package manager and it usually says Duplicati is NOT running. But if I ssh to the Snynology and “ps ax” I’ll see it running. I kill the process and start it again using the package manager and all is well. (Until the next major update.)

I have a feeling it may be a flaw in the Duplicati package design. I don’t have this problem with any other Synology packages.

Hi!

I am not running Synology, but rather Debian, but I think this is a Linux problem. I have searched a bit every now and then, and I have noticed that people experiencing the same effects tend to be running a Linux OS.

I’d be happy to take part is testing solutions.

Rickard

The odd initial log, odd “ps” results, and finding from looking at where this occurs fit with the theory:

duplicati/Installer/Synology/scripts/start-stop-status

  1. The start-stop-status script records and observes the PID of the Server process it launched.

  2. The Server is now two processes due to updater redesign in Oct 2017 canary, and now in beta.

  3. The relatively gentle kill that Linux does to the parent kills the parent, leaving the child around.

  4. The child is where backup service happens. For example child has the port that you browse to.

The same hidden-child problem exists on Windows command line, killing a Server using a Control-C.

On Linux systems, this kill can be caught (.NET looks harder but possible). Not sure about Windows.

Unless things (how many?) are taught parent/child, parent should catch request and also close child.

For a workaround, one possible approach is to stop automatic updates export environment variable:

AUTOUPDATE_Duplicati_SKIP_UPDATE=1 (might not need the -1 part) will revert to a single Server.

On to another branch of the original issue, seeing an example commandline layout reinforced my theory that the start script launching Server with no options might not supply the options one would want to use in DSM.

You can refer to the script source linked earlier, or find, check, and edit your own local copy.

–parameters-file in the script would allow actual options to be put somewhere else if desired.

I’m not sure about interactions between custom scripts and Duplicati updates, however custom is avoided if a workaround of both the parent/child preventer and the option-supplier could be shipped as a standard install, however agreeing on where --parameters-file should point to might be hard (and what if that file’s not there?)

Do you recall if it’s ALWAYS two processes or only after an in-GUI update has been applied (so the running version is newer than the base version)?

They’re both base 2.0.3.9 on Windows here. A Process Explorer hover over process gives the image pathname.

TrayIcon behaves similarly for its server I believe. Oddly, WindowsService launches a single-process server and I’m not sure if it’s intended or not. If not intended, I know how to get dual. It fixes updates but breaks shutdown…

[SOLVED] Is it ok that I see 5 processes of Duplicati in Windows Task manager? has background on processes.