I’ve had a working Duplicati setup in a TrueNAS jail for a while, but recently I made some changes and it’s completely broken, even if I change everything back (I switched from 127.0.0.1
to ::1
as the listen address). For some context, I created my own jail rather than using the plugin, I reverse proxy to the webservice using Nginx in the jail, and I have two Google Drive and one Azure Storage backup destinations. The folders and files are passed in via mounts, and the permissions are all set correctly. The command-line which starts Duplicati is the following:
/usr/local/bin/mono /usr/local/share/duplicati/Duplicati.Server.exe --webservice-port=8200 --webservice-interface=::1 --webservice-password='[redacted]' -d /config/
And nginx contains a proxy_pass
block:
location / {
proxy_pass http://[::1]:8200;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $http_add_x_forwarded_for;
proxy_set_header Connection "Keep-Alive";
proxy_set_header Proxy-Connection "Keep-Alive";
}
However, the server doesn’t start properly. When I run the command directly or use the service, it starts with no output, then if I hit it with a request, it just crashes with the following stacktrace:
[ERROR] FATAL UNHANDLED EXCEPTION: System.UriFormatException: Invalid URI: The hostname could not be parsed.
at System.Uri.CreateThis (System.String uri, System.Boolean dontEscape, System.UriKind uriKind) [0x0007b] in <b3922b7d60404fa9ae645f1fb97f5b6b>:0
at System.Uri..ctor (System.String uriString) [0x00014] in <b3922b7d60404fa9ae645f1fb97f5b6b>:0
at HttpServer.HttpClientContext.OnRequestLine (System.Object sender, HttpServer.Parser.RequestLineEventArgs e) [0x00095] in <bed89f1655ee48029f6d6812f54c58ad>:0
at (wrapper delegate-invoke) System.EventHandler`1[HttpServer.Parser.RequestLineEventArgs].invoke_void_object_TEventArgs(object,HttpServer.Parser.RequestLineEventArgs)
at HttpServer.Parser.HttpRequestParser.OnFirstLine (System.String value) [0x00172] in <bed89f1655ee48029f6d6812f54c58ad>:0
at HttpServer.Parser.HttpRequestParser.Parse (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x0010f] in <bed89f1655ee48029f6d6812f54c58ad>:0
at HttpServer.HttpClientContext.OnReceive (System.IAsyncResult ar) [0x00059] in <bed89f1655ee48029f6d6812f54c58ad>:0
at System.Net.Sockets.SocketAsyncResult+<>c.<Complete>b__27_0 (System.Object state) [0x0000b] in <b3922b7d60404fa9ae645f1fb97f5b6b>:0
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00008] in <0e06830de9a44394a7e366951eabca52>:0
at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <0e06830de9a44394a7e366951eabca52>:0
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <0e06830de9a44394a7e366951eabca52>:0
(I’ve tried using log-file
and log-level
, but I can’t get that to work, I get a Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Value cannot be null.
when I add the --log-file
argument)
Because it doesn’t say, I’m not sure which hostname is the issue, whether that’s what’s being passed by the proxy (I’ve confirmed via tcpdump
that the Host header is normal) or if it’s a destination URL that for some reason is not good anymore. I also am not familiar enough with the CommandLine.exe file or any other one, or the webservice options to be able to debug this further, despite my best attempts.
Any advice for further troubleshooting steps or a solution?