Failed to run the package service - Synology DS415+


#1

Hi,

I’m not able to run the Duplicati package on my brand new DS415+. I’ve been running Duplicati on my private Windows server for years now so I was keen te get it on my NAS too.

I’ve installed the Mono package, version 3.10.0-4. I’ve installed the latest Duplicati package. The package will not run, rebooted the NAS to be sure, no effect.

image

I checked the post ‘Package for Synology doesn’t launch on DS416’ but it didn’t provide an answer that works for me hence this new post.

FYI: I’m an experienced Sys Admin but on M$/Citrix/RES. My Linux skills leave a lot to be desired… :frowning:


#2

Don’t have a clear answer, but there are some more hints here:


Synology Connection Lost
#3

Hi Kenneth,

Thanks for replying.

I’ve found that post. It starts with a situation where some communication is possible with duplicati, wich doesn’t apply of course…
I found the bit were ppl we’re trying to start Duplicati manually interresting so I followed your instructions.

(Are the fisrt 3 commands persistent btw?)

export SYNO_LOGIN_CGI=/usr/syno/synoman/webman/login.cgi
export SYNO_AUTHENTICATE_CGI=/usr/syno/synoman/webman/modules/authenticate.cgi
export SYNO_DSM_AUTH=1
/volume1/@appstore/mono/bin$ ./mono /volume1/@appstore/Duplicati/Duplicati.Server.exe --webservice-port=8200 --webservice-interface=any

A serious error occurred in Duplicati:

System.Exception: Failed to create, open or upgrade the database.
Error message: Access to the path "/var/services/homes" is denied.
  at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary`2 commandlineOptions) [0x00000] in <filename unknown>:0
  at Duplicati.Server.Program.RealMain (System.String[] args) [0x00000] in <filename unknown>:0

So it seems that it’s an access error. Wich makes sense because the requested folder doesn’t exist:

/var/services$ ls -l
total 0
lrwxrwxrwx  1 root root 24 Aug  1 18:10 pgsql -> /volume1/@database/pgsql
lrwxrwxrwx  1 root root 13 Aug 15 14:28 tmp -> /volume1/@tmp
lrwxrwxrwx+ 1 root root 12 Aug  1 20:59 web -> /volume1/web

To make a long story short (I actually deleted a long answer before typing this (creating folders and all manually):

Eventually I ran this:

 sudo /volume1/@appstore/mono/bin/mono /volume1/@appstore/Duplicati/Duplicati.Server.exe --webservice-port=8200 --webservice-interface=any

Server has started and is listening on 0.0.0.0, port 8200

So it ran once, manually. I rebooted the NAS and try to run Duplicati from the package center which, unfortunatly, showed the initial error.

image
'
The whole things screams ‘wrong service account’ to me. Problem is ‘services.msc’ doesn’t work on Linux (no I didn’t try :joy:)


#4

Nope, they only stick in the current shell.

That is most likely caused by “user homes” not being enabled in DSM. This is enabled in “Control panel”, “User” then “Advance tab”:
https://www.synology.com/da-dk/knowledgebase/DSM/help/DSM/AdminCenter/file_user_advanced

But, the data should be in /root/.config and not in /var/sevices/homes


#5

I gave up and installed a docker container… :wink:

I do agree that the data should be in /root/.config but apperently the installation defaults to /var/services/homes.


#6

as commented on the github page:
Hi Guys,

I tried the http group, but that did not work for me. What I actually noticed could maybe help: for me it does not work when I use the quickconnect.to . So when I remotely access my NAS (using quickconnect.to) and run duplicati in the console, it gives the errors as described. When I access the NAS on a local machine, using the IP address instead of quickconnect, it does work (first had an XSRV (?) error, but that disapeared when i did a reload). I did not try a backup, still have to setup an SFTP server on my linux machine.


#7

euh, just noticing this error in my log:

System.Net.WebException: Error: TrustFailure (The authentication or decryption has failed.) —> System.IO.IOException: The authentication or decryption has failed. —> System.IO.IOException: The authentication or decryption has failed. —> Mono.Security.Protocol.Tls.TlsException: Invalid certificate received from server. Error code: 0xffffffff800b010a
at Mono.Security.Protocol.Tls.RecordProtocol.EndReceiveRecord (System.IAsyncResult asyncResult) [0x00040] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (System.IAsyncResult ar, System.Boolean ignoreEmpty) [0x00000] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (System.IAsyncResult result) [0x00071] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
— End of inner exception stack trace —
at Mono.Security.Protocol.Tls.SslClientStream.EndNegotiateHandshake (System.IAsyncResult result) [0x0003b] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (System.IAsyncResult asyncResult) [0x0000c] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
— End of inner exception stack trace —
at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (System.IAsyncResult asyncResult) [0x00057] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
at Mono.Net.Security.Private.LegacySslStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00011] in <5071a6e4a4564e19a2eda0f53e42f9bd>:0
at Mono.Net.Security.Private.LegacySslStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x0000e] in <5071a6e4a4564e19a2eda0f53e42f9bd>:0
at Mono.Net.Security.MonoTlsStream.CreateStream (System.Byte[] buffer) [0x0006a] in <5071a6e4a4564e19a2eda0f53e42f9bd>:0
— End of inner exception stack trace —
at System.Net.WebClient.DownloadFile (System.Uri address, System.String fileName) [0x000c9] in <5071a6e4a4564e19a2eda0f53e42f9bd>:0
at System.Net.WebClient.DownloadFile (System.String address, System.String fileName) [0x00019] in <5071a6e4a4564e19a2eda0f53e42f9bd>:0
at (wrapper remoting-invoke-with-check) System.Net.WebClient:DownloadFile (string,string)
at Duplicati.Library.AutoUpdater.UpdaterManager.CheckForUpdate (Duplicati.Library.AutoUpdater.ReleaseType channel) [0x000ee] in <2e3a1be277654a188f84e503094300c3>:0

not sure what to make of it. This was probably during one of my tries when using Quickconnect (based on timestamp)


#8

The dreaded “mono certificate” issue rears it’s head again.

Can you get to a terminal to run mono -v and see what version of mono you have? If it’s too old it may not have newer certificates installed.


#9

Synology uses Mono 4.6.2. this is the latest version offered by the Package Center.
Could this be the cause of the problem?


#10

Hi @Paffing - welcome to the forum!

For the record, Duplicati should be able to work with mono 3.0 - and I know some people have had it working with mono 4.5. That being said, I think I read somewhere (sorry, can’t find it right now) that the Synology provided mono package had some issue and “manually” installing it resolved the problem.

Out of curiosity, are you having the problem as well or were you just offering help. I ask because this is a fairly old issue so if you yourself need assistance we might want to break this off to it’s own topic.


#11

Hi @JonMikelV,

I know the OP personal and came across his messsage.
I had a different issue (missing token and missing options, like storage type, when adding a new backup), when looking closer into the issue, I’m having the same problem.

What I can do is uninstall mono and install it manually.

Cheers,

Pardi


#12

You may hijack my thread Pardi! :joy:


#13

I just don’t give up that easily :wink:


#14

You mean you can’t give up because you bought a Synology with some exotic chip so you cannot run docker containers… :stuck_out_tongue_winking_eye:

But like I said: I do hope you can get it to work… (and that Jon is able to assist you)