Unable to download duplicacy_web in docker container using saspus's image with tag:mini

I’m trying to set up a duplicacy container using saspus’s docker image with tag:mini on my synology NAS: Docker Hub

Attaching the log:

init.sh runing as user root:root(0:0)
Remote available versions… latest: 1.5.0 stable: 1.4.1
Newest cached local version… None
Using version 1.4.1
Downloading executable from https://acrosync.com/duplicacy-web/duplicacy_web_linux_x64_1.4.1
Connecting to acrosync.com (198.199.87.9:443)
wget: error getting response: Connection reset by peer
Download failed

If I SSH into the NAS and run “wget https://acrosync.com/duplicacy-web/duplicacy_web_linux_x64_1.4.1”, it is able to download successfully

I then created a container using saspus’s image with tag:v1.5.0, opening bash terminal in the running container, and ran the command. It also gets the same error

bash-5.1# wget https://acrosync.com/duplicacy-web/duplicacy_web_linux_x64_1.4.1
Connecting to acrosync.com (198.199.87.9:443)
wget: error getting response: Connection reset by peer

I googled, and tried various fixes on the v1.5.0 container. After I ran the following command in the v1.5.0 container’s bash terminal, I was able to wget successfully

bash-5.1# apk add ca-certificates wget
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
(1/3) Installing libunistring (0.9.10-r0)
(2/3) Installing libidn2 (2.3.0-r0)
(3/3) Installing wget (1.21.1-r1)
Executing busybox-1.32.1-r0.trigger
OK: 15 MiB in 27 packages

bash-5.1# wget https://acrosync.com/duplicacy-web/duplicacy_web_linux_x64_1.4.1
–2021-07-17 11:17:03-- https://acrosync.com/duplicacy-web/duplicacy_web_linux_x64_1.4.1
Resolving acrosync.com (acrosync.com)… 198.199.87.9
Connecting to acrosync.com (acrosync.com)|198.199.87.9|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 31436080 (30M) [application/x-troff-man]
Saving to: ‘duplicacy_web_linux_x64_1.4.1’
duplicacy_web_linux_x6 100%[===========================>] 29.98M 6.02MB/s in 5.8s
2021-07-17 11:17:09 (5.21 MB/s) - ‘duplicacy_web_linux_x64_1.4.1’ saved [31436080/31436080]

After some digging around, I noticed before running “apk add ca-certificates wget”, it is using BusyBox v1.32.1 for wget

Does anyone have any knowledge whether this issue is related to my synology NAS or the docker image? Is there anything I can do to fix it? I’m not too well versed in command lines, but I can understand the basic ones

Any help is greatly appreciated!

1 Like

Maybe certificate chain has changed and I would need to update certificates in the container. Or perhaps busybox wget cannot handle some interesting redirect scenarios.

I’ll test it later tonight (PST time) and update the container as needed. Will update this post with status and findings!

Thank you for pointing it out!

I can’t reproduce the issue. Are you still experiencing it? Maybe it was intermittent issue and just trying later fixed it? Can you reproduce it again? (you can delete the duplicacy executable from /config folder and restart the container)

This is what I do:

temp=/tmp/dupl01
mkdir -p $temp


docker run  --name duplicacy-web-container             \
        --hostname duplicacy-web-docker                \
         --publish 4875:3875/tcp                       \
             --env USR_ID=$(id -u)                     \
             --env GRP_ID=$(id -g)                     \
             --env TZ="America/Los_Angeles"            \
          --volume $temp/config:/config                \
          --volume $temp/logs:/logs                    \
          --volume $temp/cache:/cache                  \
          --volume $temp/backuproot:/backuproot:ro     \
          --volume $temp/storage:/storage              \
                   saspus/duplicacy-web:mini

and this is what I see:

Unable to find image 'saspus/duplicacy-web:mini' locally
mini: Pulling from saspus/duplicacy-web
188c0c94c7c5: Pull complete
cb5ee09c1393: Pull complete
b4b7e9c9ae73: Pull complete
Digest: sha256:4bc62dc0cf02041458f33a9e4695853ac0a778f9d44d5d2235920335d6349797
Status: Downloaded newer image for saspus/duplicacy-web:mini
init.sh runing as user root:root(0:0)
Remote available versions... latest: 1.5.0 stable: 1.4.1
Newest cached local version... None
Using version 1.4.1
Downloading executable from https://acrosync.com/duplicacy-web/duplicacy_web_linux_x64_1.4.1
Connecting to acrosync.com (198.199.87.9:443)
saving to '/config/bin/duplicacy_web_linux_x64_1.4.1'
duplicacy_web_linux_   0% |                                | 81920  0:06:22 ETA
...

Yes, I am still experiencing the issue

I’m creating the docker container using the docker app UI (installed from the synology package center), so I’m not entirely sure if the setup is different from the command line

After creating the container using the UI, and running it for the first time, the log mentions the following and then the container stops:

init.sh runing as user root:root(0:0)
Remote available versions… latest: 1.5.0 stable: 1.4.1
Newest cached local version… None
Using version 1.4.1
Downloading executable from https://acrosync.com/duplicacy-web/duplicacy_web_linux_x64_1.4.1
Connecting to acrosync.com (198.199.87.9:443)
wget: error getting response: Connection reset by peer
Download failed

Fascinating.

Let me build two test versions then —

  1. One as-is, with newer alpine, which may have newer busybox, and ca-certificates
  2. and one with standalone wget installed.

Would you be able to try each and see which one works and which one doesn’t?

Yes, I can try!

If it’s any help, when I create a docker container using the image with tag:v1.5.0, I get the following log during the first start up

Not sure if there’s a different process in place for downloading the duplicacy_web and CLI executable

launch.sh runing as user root:root(0:0)
Using machine-id = -removed-
duplicacy_web runing as user root:root(0:0)
Logging tail of the log from this moment on
Starting duplicacy
Log directory set to /logs
Duplicacy Web Edition 1.5.0 (BAFF49)
Starting the web server at http://[::]:3875
2021/07/17 22:04:42 A new license has been downloaded for saspus-duplicacy-web1
2021/07/17 22:04:42 Temporary directory set to /cache
2021/07/17 22:04:42 Duplicacy Web Edition 1.5.0 (BAFF49)
2021/07/17 22:04:42 Downloading the CLI executable from https://github.com/gilbertchen/duplicacy/releases/download/v2.7.2/duplicacy_linux_x64_2.7.2
2021/07/17 22:04:45 Duplicacy CLI 2.7.2

The latest tag has duplicacy_web burned in inside as a layer. the mini tag downloads it on first start. The tagged ones are tracking latest so they don’t need to download duplciacy_web.

Here is the one simply rebuilt with the new alpine:

saspus/duplicacy-web:mini-test-1

and here is the one with separate wget

saspus/duplicacy-web:mini-test-2

Please try which if any works?

saspus/duplicacy-web:mini-test-1

init.sh runing as user root:root(0:0)
Remote available versions... latest: 1.5.0 stable: 1.4.1
Newest cached local version... None
Using version 1.4.1
Downloading executable from https://acrosync.com/duplicacy-web/duplicacy_web_linux_x64_1.4.1
Connecting to acrosync.com (198.199.87.9:443)
wget: error getting response: Connection reset by peer
Download failed

saspus/duplicacy-web:mini-test-2

init.sh runing as user root:root(0:0)
Remote available versions... latest: 1.5.0 stable: 1.4.1
Newest cached local version... None
Using version 1.4.1
Downloading executable from https://acrosync.com/duplicacy-web/duplicacy_web_linux_x64_1.4.1
--2021-07-17 22:18:15--  https://acrosync.com/duplicacy-web/duplicacy_web_linux_x64_1.4.1
Resolving acrosync.com (acrosync.com)... 198.199.87.9
Connecting to acrosync.com (acrosync.com)|198.199.87.9|:443... connected.
Length: 31436080 (30M) [application/x-troff-man]
Saving to: '/config/bin/duplicacy_web_linux_x64_1.4.1'
2021-07-17 22:18:20 (6.40 MB/s) - '/config/bin/duplicacy_web_linux_x64_1.4.1' saved [31436080/31436080]
Using machine-id = -removed-
duplicacy_web runing as user root:root(0:0)
Logging tail of the log from this moment on
Starting duplicacy_web
Log directory set to /logs
Duplicacy Web Edition 1.4.1 (074ED2)
Starting the web server at http://[::]:3875
2021/07/17 22:18:22 A new license has been downloaded for saspus-duplicacy-web2
2021/07/17 22:18:22 Temporary directory set to /cache
2021/07/17 22:18:22 Duplicacy Web Edition 1.4.1 (074ED2)
2021/07/17 22:18:22 Downloading the CLI executable from https://github.com/gilbertchen/duplicacy/releases/download/v2.7.2/duplicacy_linux_x64_2.7.2
2021/07/17 22:18:25 Duplicacy CLI 2.7.2

Wow! Looks like wget from busybox stumbles on something perhaps specific to your regional CDN endpoint… no idea. Regardless, the fix would be to simply add standalone wget to the container layer.

diff --git a/Dockerfile b/Dockerfile
index 61c3603..3a878a5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -19,7 +19,7 @@ ENV GRP_ID=0
 ENV TZ="America/Los_Angeles"

 # Installing software
-RUN apk --update add --no-cache bash ca-certificates dbus su-exec tzdata jq curl && \
+RUN apk --update add --no-cache bash ca-certificates dbus su-exec tzdata jq curl wget && \
     rm -f /var/lib/dbus/machine-id && ln -s /config/machine-id /var/lib/dbus/machine-id

 EXPOSE 3875/tcp

I’ll update the mini container in a minute.

Done! Thank you @casualsailo for finding the bug and help with testing!

1 Like

Thank you so much! The new image with tag:mini is working

1 Like

Interesting post, I do recall reading some notes on BusyBox’s wget not supporting HTTPS proxies.


I wonder if it applies in this case?
Anyway, seems the suggested “fix” is to install proper wget.

1 Like