Headless upgrade to canary failed - Cannot find the specified file


#1

Hi,

I was looking to upgrade my headless setup to canary, but failed.

I used this doc > Headless installation on Debian or Ubuntu · duplicati/duplicati Wiki · GitHub.

  1. rm -rf /usr/lib/duplicati/*
  2. wget http://canary-version.zip
  3. unzip
  4. start

Startup failed with:

root@nas-24-A9-04:/usr/lib/duplicati# /usr/bin/duplicati-server --webservice-port=8200 --webservice-interface=any

Unhandled Exception:
System.ComponentModel.Win32Exception: ApplicationName=’/usr/lib/duplicati/Duplicati.Server.exe’, CommandLine=’ --webservice-port=8200 --webservice-interface=any’, CurrentDirectory=’’, Native error= Cannot find the specified file
at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in :0
at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in :0
at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x00000] in :0
at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecentSpawn (System.Reflection.MethodInfo method, System.String[] cmdargs, AutoUpdateStrategy defaultstrategy) [0x00000] in :0
at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecent (System.Reflection.MethodInfo method, System.String[] cmdargs, AutoUpdateStrategy defaultstrategy) [0x00000] in :0
at Duplicati.Server.Program.Main (System.String[] args) [0x00000] in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ComponentModel.Win32Exception: ApplicationName=’/usr/lib/duplicati/Duplicati.Server.exe’, CommandLine=’ --webservice-port=8200 --webservice-interface=any’, CurrentDirectory=’’, Native error= Cannot find the specified file
at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in :0
at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in :0
at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x00000] in :0
at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecentSpawn (System.Reflection.MethodInfo method, System.String[] cmdargs, AutoUpdateStrategy defaultstrategy) [0x00000] in :0
at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecent (System.Reflection.MethodInfo method, System.String[] cmdargs, AutoUpdateStrategy defaultstrategy) [0x00000] in :0
at Duplicati.Server.Program.Main (System.String[] args) [0x00000] in :0

After attempts with several canary versions, the lastest working one is 2.0.2.10_canary_2017-10-11, and the issue start with 2.0.2.11_canary_2017-10-20.

Running on Readynas OS6, based on Debian 8.

Search on this issue was not successful yet.
Any advices ?

Rgds,


#2

I’m not positive about this on Linux, but on Windows don’t need to remove the old version - you can just install over it. Have you tried that?


#3

I tried both (without removing previous version, and with cleaning everything) if I’m right, will redo to confirm.


#4

Very odd. I may have to back off and hope that somebody else with more Linux experience, such as @Pectojin, might have some input.


#5

It looks like it’s some kind of issue locating the actual server executable, so first steps are to ensure the files are actually there.

Over at the Sonarr community they had a similar error, which they could resolved by starting the process with a bash script that set some mono specific path variables. I’m not sure how that would apply here, but it looks relevant from the stack trace Not able to update - Help & Support - sonarr :: forums


#6

Well, I tried to unzip 2.0.2.11 on top of the working 2.0.2.10, but still doesn’t start.

I also updated the startup script with:

#!/bin/bash
INSTALLDIR=/usr/lib/duplicati
export LD_LIBRARY_PATH="${INSTALLDIR}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export MONO_PATH=$MONO_PATH:${INSTALLDIR}

export PATH=$INSTALLDIR:$PATH
cd $INSTALLDIR

EXE_FILE=${INSTALLDIR}/Duplicati.Server.exe
APP_NAME=DuplicatiServer

exec -a “$APP_NAME” mono “$EXE_FILE” “$@”

But still no success.

I have pretty good knowledge on Linux, but none in mono :sweat_smile:


Running Duplicati on startup on Freenas / FreeBSD
#7

Well, I had a doubt with the custom Debian setup due to Netgear ReadyNAS repo.

I need further tests before to confirm, but seems that some mono packages dependencies are not met. I do not know yet if it’s Debian or Netgear repo that are in cause.

Using the mono project repo seems to solve.

To follow.


#8

After several tests, I confirm.

Latest Canary doesn’t work with default mono-devel suite on Debian 8.10.
I had to switch to mono project repository:

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
apt-get install apt-transport-https
echo "deb https://download.mono-project.com/repo/debian stable-jessie main" | tee /etc/apt/sources.list.d/mono-official-stable.list
apt-get update; apt-get -y upgrade; apt-get -y dist-upgrade; apt-get autoremove; apt-get install mono-devel

For whatever reason, the autoremove remove mono-devel after the upgrade, so need to be reinstall it.

Debian 9.4.0 mono-devel version is fine out of the box.


#9

Glad to hear you got it working, and thanks for sharing what did the trick for you!

Should we flag you previous post as the solution?


#10

Sounds like :grinning: