First time install, can't start


#1

Hi,

Just started using this. Looks great but I can’t get it to run. We are running on Ubuntu with command line access only. Installed first time but complained about dependencies. I fixed that and re-ran installer (seemed to go through) but now when trying to run I get:

Crash! 
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: A serious error occurred in Duplicati: System.Exception: Failed to create, open or upgrade the database.
Error message: Access to the path "/home/ieadmin/.config/Duplicati" is denied.

Followed by a lot more output which I could post but I suspect the key to the problem is here. Is it permissions?

Sorry a bit lost as I’m new to this product and only work with Ubuntu occasionally.

Many thanks.


#2

Welcome @Gal,

Looks like an OS permission issue, so first step is to check the permissions on the .config and Duplicati folders. It shoud look something like this:

# ls -la /home/ieadmin | grep .config
drwx------  33 ieadmin ieadmin      37 Feb 17 21:23 .config

and

# ls -la /home/ieadmin/.config | grep Duplicati
drwxrwx---  4 ieadmin ieadmin    5 Mar 22 01:36 Duplicati

Specifically look for the names and the drwx.
If they’re not correct we can fix it by setting ownership:

# sudo chown ieadmin:ieadmin /home/ieadmin/.config
# sudo chown -R ieadmin:ieadmin /home/ieadmin/.config/Duplicati

And then fixing the permissions

# sudo chmod 700 /home/ieadmin/.config
# sudo chmod -R 770 /home/ieadmin/.config/Duplicati

If they appear to be correct, check that Duplicati is running under your user:

# ps aux | grep duplicati
ieadmin     24248  0.0  0.1 432804 20940 ?        SNsl Apr08   0:01 DuplicatiServer /usr/lib/duplicati/Duplicati.Server.exe --webservice-port=8200 --webservice-listen-interface=any

#3

Awesome - that worked. Thank you very much.

Next question (sorry!) should I be able to access the web gui on port 8200? I have this in Terminal:

Server has started and is listening on 127.0.0.1, port 8200

But a classic can’t connect to server in browser. I’m browsing to it from another machine if that’s relevant.

Thanks again.


#4

Not to worry :slight_smile:

For security Duplicati only listens on requests from localhost by default. You need to allow requests from other sources.

There’s two ways to do it:

  1. From the web API (you can’t unless you do ssh port forwarding or have a gui on the server)
  2. Update the systemd file to include the launch parameter --webservice-interface=any

#2 is the easiest if you’ve already got the CLI open :slight_smile:

First figure out where the Duplicati systemd service file is:

# systemctl status duplicati
● duplicati.service - Duplicati web-server
   Loaded: loaded (/lib/systemd/system/duplicati.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2018-04-08 15:14:20 CEST; 2 days ago 

The Loaded: loaded line tells you the file location

Edit the file (vim, nano, etc)

# nano /lib/systemd/system/duplicati.service

In the file update the ExecStart line to include --webservice-interface=any
The line will look like this:

ExecStart=/usr/bin/duplicati-server $DAEMON_OPTS --webservice-port=8200 --webservice-interface=any

--webservice-port=8200 may or may not be there. You can include it or leave it as is.

Oh and, of course, reload systemd and restart the service:

# sudo systemctl daemon-reload
# sudo systemctl restart duplicati

Edit: changed ‘webservice–listen-interface’ to ‘webservice-interface’


Config Remote Access From Windows Command Line
#5

Thank you so much again for the help. I had another problem - the duplicati.service file was missing. I managed to install that manually and I think the service is now running however I still can’t access via browser from another computer.

Service is running:

duplicati.service - Duplicati web-server
   Loaded: loaded (/etc/systemd/system/duplicati.service; enabled)
   Active: active (running) since Wed 2018-04-11 12:30:47 BST; 2min 33s ago
 Main PID: 864 (mono)
   CGroup: name=dsystemd:/system/duplicati.service
           ├─ 864 DuplicatiServer /usr/lib/duplicati/Duplicati.Server.exe --w...
           └─1314 /usr/bin/mono /usr/lib/duplicati/Duplicati.Server.exe --web...

Apr 11 12:30:53 myserver.co.uk duplicati-server[864]: Server has started a...
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

Service file reads like this:

[Unit]
Description=Duplicati web-server
After=network.target

[Service]
Nice=19
IOSchedulingClass=idle
EnvironmentFile=-/etc/default/duplicati
ExecStart=/usr/bin/duplicati-server $DAEMON_OPTS --webservice-port=8200 --webservice-listen-interface=any
Restart=always

[Install]
WantedBy=multi-user.target

And I can curl localhost:8200 but still get server not found when trying to access via browser from another machine on the network.

Did I miss something? Thanks again in advance.


#6

Is the port open in UFW?

# sudo ufw status

#7

I thought of that but it’s not enabled:

Status: inactive

It must be blocked some other way. I can’t telnet to 8200 either but I can to other ports such as say 10000 where webmin is running and 80.

So close but I think we’re getting off topic now. I didn’t set this machine up so I need to check with the person who did.

Thank you very much for your help.


#8

Hmm, fair enough.

With UFW turned off it would have to be something else. Maybe iptables? But yes, in that case it may be best to verify with the person who configured it.

I’m glad I could help this far, hope you get the rest figured out :slight_smile:


#9

I’ll have a look at iptables - thanks again.


#10

Hi again :slightly_smiling_face:

It looks like we don’t have a firewall running on this machine since it’s only access via LAN.

The duplicati.service file has this line

ExecStart=/usr/bin/duplicati-server $DAEMON_OPTS --webservice-port=8200 --webservice-listen-interface=any

But the status says this:

Server has started and is listening on 127.0.0.1, port 8200

Is that correct? Should it be listening on 127.0.0.1?

Thanks,


#11

Ok I found the problem - this part of the config:

--webservice-listen-interface=any

Should simply be:

--webservice-interface=any

I changed that, rebooted and I think we’re good now! Thank you. :slight_smile:


#12

Oh, good!

I wonder where I got the wrong option name from…

I should correct my previous posts to avoid confusion with people who might stumble upon it later :slight_smile: