Duplicati won't startup after update on MacOS

Hi all,

first of all thanks to all people who developed this great program. Its quite easy to use but still flexible for advanced usage. That’s great ! I’m using it since version 1.3 and had no problems at all.

But today I updated Duplicati from version duplicati-2.0.1.45_experimental_2017-02-03.dmg to duplicati-2.0.1.73_experimental_2017-07-15.dmg when the update notice within the program was shown. After the program tried to restart it didn’t start any more. After that I tried to download and install the latest beta version duplicati-2.0.2.1_beta_2017-08-01.dmg from the Website and installed it manually, but no luck. Then I tried to downgrade back to the 2.0.1.45_experimental version, but even then Duplicati doesn’t start now. :frowning:
When I look into the process list while starting the program I see the process for a few seconds then it disappears. One time I found in the log files (via Console app) a message from launchd for Duplicate.app that the service exited abnormal with code 1.
What can I do now to get the program run again ?

I’m using OS X 10.11.6 (El Capitan) on a Mac mini.

Try looking in the folder ~/.config/Duplicati/ and see if you have a folder that is named updates, and if so, delete it.

To see the folder in finder, type this from the terminal:

open ~/.config/Duplicati/

After you remove the updates folder, install the beta version from here: https://www.duplicati.com/downloads

And then it should work as before.

Hi,

I looked into that folder but there is no “updates” folder inside.
It looks like this:
duplicati

I even tried to install the latest version again, but no differences.

Ok, it appears that there is something that prevents Duplicati from starting, but without an error message it is hard to figure out what happens.

Can you try to run it from a terminal like this:

/Applications/Duplicati.app/Contents/MacOS/duplicati

And see if there are error messages?

Ok, thats the message after starting from terminal:

Server gestartet und hört auf 127.0.0.1, Port 8200
Request error: System.Net.WebException: Error: ConnectFailure (Connection refused) ---> System.Net.Sockets.SocketException: Connection refused
  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x000d1] in <5071a6e4a4564e19a2eda0f53e42f9bd>:0 
  at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x0019b] in <5071a6e4a4564e19a2eda0f53e42f9bd>:0 
   --- End of inner exception stack trace ---
  at Duplicati.Library.Utility.AsyncHttpRequest+AsyncWrapper.GetResponseOrStream () [0x0004d] in <1cb5198b00f34ae59d97ee7fe7a3a16c>:0 
  at Duplicati.Library.Utility.AsyncHttpRequest.GetResponse () [0x00044] in <1cb5198b00f34ae59d97ee7fe7a3a16c>:0 
  at Duplicati.GUI.TrayIcon.HttpServerConnection.PerformRequestInternal[T] (System.String method, System.String endpoint, System.Collections.Generic.Dictionary`2[TKey,TValue] queryparams) [0x001ca] in <d07129d6974642b0bbdaa3ccc42fe89d>:0 
  at Duplicati.GUI.TrayIcon.HttpServerConnection.PerformRequest[T] (System.String method, System.String urlfragment, System.Collections.Generic.Dictionary`2[TKey,TValue] queryparams) [0x0000c] in <d07129d6974642b0bbdaa3ccc42fe89d>:0 
Request error: System.Net.WebException: Error: ConnectFailure (Connection refused) ---> System.Net.Sockets.SocketException: Connection refused
  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x000d1] in <5071a6e4a4564e19a2eda0f53e42f9bd>:0 
  at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x0019b] in <5071a6e4a4564e19a2eda0f53e42f9bd>:0 
   --- End of inner exception stack trace ---
  at Duplicati.Library.Utility.AsyncHttpRequest+AsyncWrapper.GetResponseOrStream () [0x0004d] in <1cb5198b00f34ae59d97ee7fe7a3a16c>:0 
  at Duplicati.Library.Utility.AsyncHttpRequest.GetResponse () [0x00044] in <1cb5198b00f34ae59d97ee7fe7a3a16c>:0 
  at Duplicati.GUI.TrayIcon.HttpServerConnection.PerformRequestInternal[T] (System.String method, System.String endpoint, System.Collections.Generic.Dictionary`2[TKey,TValue] queryparams) [0x001ca] in <d07129d6974642b0bbdaa3ccc42fe89d>:0 
  at Duplicati.GUI.TrayIcon.HttpServerConnection.PerformRequest[T] (System.String method, System.String urlfragment, System.Collections.Generic.Dictionary`2[TKey,TValue] queryparams) [0x0000c] in <d07129d6974642b0bbdaa3ccc42fe89d>:0 
Request error: System.Net.WebException: Error: ConnectFailure (Connection refused) ---> System.Net.Sockets.SocketException: Connection refused
  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x000d1] in <5071a6e4a4564e19a2eda0f53e42f9bd>:0 
  at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x0019b] in <5071a6e4a4564e19a2eda0f53e42f9bd>:0 
   --- End of inner exception stack trace ---
  at Duplicati.Library.Utility.AsyncHttpRequest+AsyncWrapper.GetResponseOrStream () [0x0004d] in <1cb5198b00f34ae59d97ee7fe7a3a16c>:0 
  at Duplicati.Library.Utility.AsyncHttpRequest.GetResponse () [0x00044] in <1cb5198b00f34ae59d97ee7fe7a3a16c>:0 
  at Duplicati.GUI.TrayIcon.HttpServerConnection.PerformRequestInternal[T] (System.String method, System.String endpoint, System.Collections.Generic.Dictionary`2[TKey,TValue] queryparams) [0x001ca] in <d07129d6974642b0bbdaa3ccc42fe89d>:0 
  at Duplicati.GUI.TrayIcon.HttpServerConnection.PerformRequest[T] (System.String method, System.String urlfragment, System.Collections.Generic.Dictionary`2[TKey,TValue] queryparams) [0x0000c] in <d07129d6974642b0bbdaa3ccc42fe89d>:100:

That indicates that the server starts, but the tray-icon code cannot connect to the running server.

Are you using a firewall of sorts that prevents the connection from happening?

I just use the firewall of MacOS itself. But I didn’t configure anything there myself, so the settings should be at the defaults. I checked the firewall settings and there is a setting “block all incoming connections”, but this setting is off.

I also checked with netstat for open ports, but there is no process listening on port 8200 (which I suggest from the console output is used by Duplicati).

But when I looked into the system.log file, I noticed that there is the following message showing every time I start Duplicati:

12.08.17 18:29:27,000 kernel[0]: Sandbox: mono-sgen32(3261) System Policy: deny(1) file-write-create /usr/share/.mono

As I have in my mind that Duplicati uses Mono framework (?) maybe it has something to do with it ?

I have never seen that before, but I am guessing that it is using the App Store sandboxing for some reason. Did you install Mono from here:
http://www.mono-project.com/download/

I would think that the error you see can happen if Mono is installed through App Store as it sandboxes applications.

No, I didn’t install Mono from the AppStore.
As I remember i installed it once (as a separated package) for the v1 version of Duplicati, but removed it in the meantime (since I think its not needed as a separate package for Duplicati v2?)

It is very much required :slight_smile:

If you try something like:

mono --version

or

which mono

You can probably get some clues as to where Mono is residing and installed from.

But I think you can just install the latest version and it will “fix” things for you.

Hello kenkendk,

finally I made it to go on with this topic.

The next thing I did was reinstalling the mono framework directly from the homepage (it was version 5.2 then ), but that didn’t help anything. still the same error.

Just now I reinstalled again, now the version 5.4 of Mono, but still the same error. I also deactivated the firewall completely to exclude any interference with it. But no luck. Still the same. Meanwhile the Mac is also updated to Sierra (still not High Sierra). But no progress…

Do you have any idea what I could do now ?

Mono version:
Mono JIT compiler version 5.4.0.201 (2017-06/71277e78f6e Thu Sep 21 19:22:55 EDT 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: yes(3.6.0svn-mono-master/8b1520c8aae)
GC: sgen (concurrent by default)

Hi again,

I played a bit around and found out the following:

If I start just the duplicati server process with

/Applications/Duplicati.app/Contents/MacOS/duplicati-server

in Terminal, then the Server starts up (Message “Server gestartet und hört auf 127.0.0.1, Port 8200”) and I can connect via web browser as normal. The backups are also working as normal.

It seems only the tray icon process cannot connect to the server. when I tried to start the duplicati process while the server is running using this command:

/Applications/Duplicati.app/Contents/MacOS/duplicati --no-hosted-server

It gives me the same error of not being able to connect to the server process.
So I wonder whats going on in the tray icon code ?

I’ve reported this as an issue: Unable to start duplicati 2.0.2.1 · Issue #2850 · duplicati/duplicati · GitHub

It should work with:

/Applications/Duplicati.app/Contents/MacOS/duplicati --no-hosted-server --serverurl=http://localhost:8200

I have tried once with MacOS failing to accept localhost but willingly accept 127.0.0.1. You can try switching between the two to see if anything works.

Alternatively, could it be some firewall issue? I have the MacOS firewall enabled, but it does not prevent me from running Duplicati.

@tiagoboldt: Thanks for filing this bug report.

@kenkendk: I Tried this command line with localhost as well as with 127.0.0.1, but nothing works. I also tried it with firewall deactivated, but it won’t work even.

But as I stated earlier I still see this error “Sandbox: mono-sgen32(3261) System Policy: deny(1) file-write-create /usr/share/.mono” in log file when starting /Applications/Duplicati.app/Contents/MacOS/duplicati. I searched a bit again and found this info about Apples “System integrity Protection”:

This is the most important statement: "Here’s what it restricts, even from root:

You can’t modify anything in /System, /bin, /sbin, or /usr (except /usr/local); or any of the built-in apps and utilities."

which seems the root of the issue: the mono framework tries to create this file /usr/share/.mono which fails. I think there will be an exception raised somewhere in duplicati code then, which leads to the error message of “not being able to connect” although the root cause probably is that file permission issue.

So in essence it seems to be a mono issue, but not a duplicati issue. The strange thing still is, that it seems to work on some installations and on some not even with the latest mono framework version.

Yes, that is my take as well. Weirdly it works on my machine, and I do not have the folder and I have SIP enabled, so I should get the same error. Something else must be triggering the error.

On my machine the folder /usr/share is owned by root:wheel.