Closed TobogganMD closed 1 year ago
I don't have a way to test your environment, however I'm wondering if the zip file pulled from Github is corrupt.
Outside of the container, since you mention ARM64, have you tried running the wget and unzip commands to see what happens?
Thanks for your reply and contribution with the script! The zipfile opens without issue on Windows, I ran the wget line and unzip line on the RPi outside the container and it worked without any issues.
unzip /tmp/main.zip "vpn-configs-contrib-main/openvpn/ovpn/*" -d /tmp/ Archive: /tmp/main.zip 1c8bb78d139f960096a303ed31aeb69d7af1ee5a creating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/ inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/multihop.ca.toronto.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/multihop.ca.toronto.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/multihop.ch.zurich.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/multihop.ch.zurich.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/multihop.se.any-city.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/multihop.se.any-city.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/multihop.us.chicago.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/multihop.us.chicago.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/multihop.us.new-york.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/multihop.us.new-york.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.at.vienna.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.at.vienna.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.au.sydney.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.au.sydney.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.ca.toronto.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.ca.toronto.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.ch.zurich.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.ch.zurich.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.de.any-city.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.de.any-city.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.de.erfurt.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.de.erfurt.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.de.frankfurt.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.de.frankfurt.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.de.offenbach.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.de.offenbach.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.dk.copenhagen.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.dk.copenhagen.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.es.madrid.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.es.madrid.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.fi.helsinki.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.fi.helsinki.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.fr.paris.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.fr.paris.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.gb.london.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.gb.london.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.it.milan.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.it.milan.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.jp.tokyo.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.jp.tokyo.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.nl.amsterdam.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.nl.amsterdam.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.no.oslo.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.no.oslo.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.pl.warsaw.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.pl.warsaw.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.ro.bucharest.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.ro.bucharest.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.se.any-city.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.se.any-city.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.se.gothenburg.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.se.gothenburg.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.se.malmo.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.se.malmo.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.se.stockholm.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.se.stockholm.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.se.sundsvall.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.se.sundsvall.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.sg.singapore.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.sg.singapore.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.ua.kyiv.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.ua.kyiv.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.us.any-city.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.us.any-city.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.us.atlanta.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.us.atlanta.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.us.chicago.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.us.chicago.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.us.dallas.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.us.dallas.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.us.los-angeles.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.us.los-angeles.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.us.miami.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.us.miami.udp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.us.new-york.tcp.ovpn
inflating: /tmp/vpn-configs-contrib-main/openvpn/ovpn/standard.us.new-york.udp.ovpn
Googling the zipfile offset error didn't really generate any understanding for me (linux noob unfortunately).
Did the unzip fail numerous times or was this a one-attempt sort of thing? Ruling out a possible one-instance of corruption.
The docker container @haugene uses has WGET and UNZIP, but not SVN, so I used WGET and UNZIP as the archive retrieval method. Odd no one else reported an issue so I'm stumped and am wondering about that ARM64 which I know nothing about.
One temporary workaround while we wait on some other input is to use the OTHER VPN option and provide your own OVPN data to the server you prefer for now so you use the latest build.
I tried recreating the container a bunch of times, also using different tags for the image like latest, master, dev. Ran into the same error every time. I guess being an OVPN subscriber and using this container on a RPi is a bit of an edge case, so it might be that no one else is running this particular combination. I'll go back to the custom method as you mention when I find the time, too bad though, since I appreciated your little setup script.
Can you fire up a virtualbox on your normal machine and run docker on it to see? I say virtualbox as you mentioned Windows and I know nothing about docker capabilities/limitations with Windows.
+1, getting the same thing on my RPI4
@haugene "docker scan" tells me a lot of packages are out of date on the container. Is it possible to issue an update and potentially more regularly with updates so that way some of these bugs may be resolved? I know it's a long shot but I'm assuming this is related to the unzip package since it's an ARM64 issue. Maybe that has been resolved? Also, can you add in the SVN package? Maybe I can go back in the future and rework the script to use SVN export and see if that has better success for ARM64 people.
getting the same issue
same issue here as well
Running in a container inside a Synology DSM environment (so Linux based)
Downloading configs from https://github.com/haugene/vpn-configs-contrib/archive/main.zip into /tmp/tmp.3bFdDbTOny
Extracting configs to /tmp/tmp.KKYyr4dzh3
file #1904: bad zipfile offset (local header sig): 4748473
Well that is fun - I see the same issue myself after redoing a container using my Ubuntu 20.04 VM. My test container image works fine (using older commits from everyone) vs. using the latest release.
@haugene definitely the latest docker container has something off and I'm wondering if it's due to packages needing updated/being buggy.
I am getting this issue aswel in a docker container on an x64 machine running ubuntu server so it is not just arm devices
I know I'm kind of free wheeling here. Just putting stuff for main dev to see.
I cannot build the current dockerfile to test. I keep getting errors:
Desktop/GitHub/docker-transmission-openvpn$ docker build - < Dockerfile
[+] Building 0.6s (14/14) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 3.58kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:22.04 0.1s
=> [internal] load metadata for docker.io/library/alpine:3.13 0.0s
=> CACHED [transmissionuis 1/2] FROM docker.io/library/alpine:3.13 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 2B 0.0s
=> CANCELED [stage-1 1/7] FROM docker.io/library/ubuntu:22.04@sha256:672 0.0s
=> => resolve docker.io/library/ubuntu:22.04@sha256:67211c14fa74f070d27c 0.0s
=> => sha256:67211c14fa74f070d27cc59d69a7fa9aeff8e28ea11 1.13kB / 1.13kB 0.0s
=> => sha256:7a57c69fe1e9d5b97c5fe649849e79f2cfc3bf11d10bbd5 424B / 424B 0.0s
=> => sha256:08d22c0ceb150ddeb2237c5fa3129c0183f3cc6f5ee 2.30kB / 2.30kB 0.0s
=> CANCELED [transmissionuis 2/2] RUN apk --no-cache add curl jq && 0.5s
=> CACHED [stage-1 2/7] COPY --from=TransmissionUIs /opt/transmission-ui 0.0s
=> CACHED [stage-1 3/7] RUN apt-get update && apt-get install -y dum 0.0s
=> ERROR [stage-1 4/7] ADD openvpn/ /etc/openvpn/ 0.0s
=> ERROR [stage-1 5/7] ADD transmission/ /etc/transmission/ 0.0s
=> ERROR [stage-1 6/7] ADD scripts /etc/scripts/ 0.0s
=> ERROR [stage-1 7/7] ADD privoxy/scripts /opt/privoxy/ 0.0s
------
> [stage-1 4/7] ADD openvpn/ /etc/openvpn/:
------
------
> [stage-1 5/7] ADD transmission/ /etc/transmission/:
------
------
> [stage-1 6/7] ADD scripts /etc/scripts/:
------
------
> [stage-1 7/7] ADD privoxy/scripts /opt/privoxy/:
------
Dockerfile:44
--------------------
42 | ADD transmission/ /etc/transmission/
43 | ADD scripts /etc/scripts/
44 | >>> ADD privoxy/scripts /opt/privoxy/
45 |
46 | ENV OPENVPN_USERNAME=**None** \
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref moby::ktsoj7sims2xu551qdk2rqvkr: "/privoxy/scripts": not found
I think a feasible fix for 4.0 would be this within my script:
cd /tmp/
git clone https://github.com/haugene/vpn-configs-contrib.git
mv /tmp/vpn-configs-contrib-main/openvpn/ovpn/* /etc/openvpn/ovpn
rm /tmp/vpn-configs-contrib-main/ -R
However, I cannot test this because for some reason there is an issue with the Dockerfile unless I'm totally blind here?
Okay, so I fixed it using GIT which functions fine within the 4.x branch.
https://github.com/haugene/docker-transmission-openvpn/pull/2566
Few useless changes in there but hey if it works why worry about it.
If someone wants to test this, change your image to "derekcentrico/docker-transmission-openvpn". I do not intend to keep this updated as an actual fork. Rather, it's for confirming the various setups are functional while we wait the PR to be merged and a new release to come out.
I see several pulls; just wondering if it works for everyone?
Played around and can only surmise that it has something to do with UNZIP in the new base + something with Github maybe changing how it builds that ZIP for download. Would make sense that a Github change was the cause since it worked fine until out of nowhere without package changes. But, building a docker for 4.x with the latest apt updates doesn't solve it. Looks like we need to use the hacky git workaround.
Thanks @derekcentrico, the script seems to work fine now. Instead, I now keep getting AUTH_FAILED, which I've never had any issues with before. The username/password-file looks fine, tried using custom config downloaded from OVPN directly, changed OVPN password to simple one without special characters, nothing seems to work. Anyone else using OVPN having issues? Using the desktop and mobile app there are no issues.
@TobogganMD only thing I can suggest is removing special characters. I had the same issue ages ago and it was related to special characters and how the ENV variables are parsed from what I guessed. I went insane long with no special characters and no more auth issues.
@derekcentrico Thanks for the reply. Unfortunately, it doesn't seem to matter in my case. I'll try contacting OVPN.
@TobogganMD is this a new issue? mind sharing your config?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Feel free to re-open this issue if you think it deserves another look.
Is there a pinned issue for this?
Is there an existing or similar issue/discussion for this?
Is there any comment in the documentation for this?
Is this related to a provider?
Are you using the latest release?
Have you tried using the dev branch latest?
Docker run config used
transmission-haugene: container_name: transmission-openvpn image: haugene/transmission-openvpn:latest cap_add:
Current Behavior
Recently updated the container for the first time in a while and I believe this was my first encounter with version 4 and the switch from Alpine to Ubuntu. I am running the container on a Raspberry Pi 4, so ARM64. Everything worked fine before the update, after the update the container kept restarting itself due to failures.
Expected Behavior
Normal behavior.
How have you tried to solve the problem?
I downgraded to version 3.0.1, which works fine.
Log output
Starting container with revision: 84941a9ea4663d8b2e1af3db1d50fe4f7fa8736e Creating TUN device /dev/net/tun Using OpenVPN provider: OVPN Running with VPN_CONFIG_SOURCE auto Provider OVPN has a bundled setup script. Defaulting to internal config Executing setup script for ovpn Downloading OpenVPN config bundle into temporary file --2023-03-28 10:44:31-- https://github.com/haugene/vpn-configs-contrib/archive/refs/heads/main.zip Resolving github.com (github.com)... 140.82.121.4 Connecting to github.com (github.com)|140.82.121.4|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://codeload.github.com/haugene/vpn-configs-contrib/zip/refs/heads/main [following] --2023-03-28 10:44:31-- https://codeload.github.com/haugene/vpn-configs-contrib/zip/refs/heads/main Resolving codeload.github.com (codeload.github.com)... 140.82.121.9 Connecting to codeload.github.com (codeload.github.com)|140.82.121.9|:443... connected. HTTP request sent, awaiting response... 200 OK
Extract OpenVPN config bundle into /etc/openvpn/ovpn Archive: /tmp/main.zip 1c8bb78d139f960096a303ed31aeb69d7af1ee5a file #1: bad zipfile offset (local header sig): 7608796 file #2: bad zipfile offset (local header sig): 7608873 file #3: bad zipfile offset (local header sig): 7610784 file #4: bad zipfile offset (local header sig): 7612700 file #5: bad zipfile offset (local header sig): 7614608 file #6: bad zipfile offset (local header sig): 7616521 file #7: bad zipfile offset (local header sig): 7618441 file #8: bad zipfile offset (local header sig): 7620380 file #9: bad zipfile offset (local header sig): 7622290 file #10: bad zipfile offset (local header sig): 7624205 file #11: bad zipfile offset (local header sig): 7626116 file #12: bad zipfile offset (local header sig): 7628032 file #13: bad zipfile offset (local header sig): 7629940 file #14: bad zipfile offset (local header sig): 7631853 file #15: bad zipfile offset (local header sig): 7633761 file #16: bad zipfile offset (local header sig): 7635675 file #17: bad zipfile offset (local header sig): 7637557 file #18: bad zipfile offset (local header sig): 7639444 file #19: bad zipfile offset (local header sig): 7641352 file #20: bad zipfile offset (local header sig): 7643265 file #21: bad zipfile offset (local header sig): 7645171 file #22: bad zipfile offset (local header sig): 7647082 file #23: bad zipfile offset (local header sig): 7648990 file #24: bad zipfile offset (local header sig): 7650903 file #25: bad zipfile offset (local header sig): 7652816 file #26: bad zipfile offset (local header sig): 7654735 file #27: bad zipfile offset (local header sig): 7656648 file #28: bad zipfile offset (local header sig): 7658567 file #29: bad zipfile offset (local header sig): 7660482 file #30: bad zipfile offset (local header sig): 7662403 file #31: bad zipfile offset (local header sig): 7664313 file #32: bad zipfile offset (local header sig): 7666228 file #33: bad zipfile offset (local header sig): 7668142 file #34: bad zipfile offset (local header sig): 7670062 file #35: bad zipfile offset (local header sig): 7671970 file #36: bad zipfile offset (local header sig): 7673884 file #37: bad zipfile offset (local header sig): 7675792 file #38: bad zipfile offset (local header sig): 7677705 file #39: bad zipfile offset (local header sig): 7679613 file #40: bad zipfile offset (local header sig): 7681527 file #41: bad zipfile offset (local header sig): 7683434 file #42: bad zipfile offset (local header sig): 7685346 file #43: bad zipfile offset (local header sig): 7687262 file #44: bad zipfile offset (local header sig): 7689183 file #45: bad zipfile offset (local header sig): 7691088 file #46: bad zipfile offset (local header sig): 7692998 file #47: bad zipfile offset (local header sig): 7694906 file #48: bad zipfile offset (local header sig): 7696820 file #49: bad zipfile offset (local header sig): 7698734 file #50: bad zipfile offset (local header sig): 7700653 file #51: bad zipfile offset (local header sig): 7702574 file #52: bad zipfile offset (local header sig): 7704515 file #53: bad zipfile offset (local header sig): 7706431 file #54: bad zipfile offset (local header sig): 7708353 file #55: bad zipfile offset (local header sig): 7710259 file #56: bad zipfile offset (local header sig): 7712170 file #57: bad zipfile offset (local header sig): 7714090 file #58: bad zipfile offset (local header sig): 7716017 file #59: bad zipfile offset (local header sig): 7717931 file #60: bad zipfile offset (local header sig): 7719850 file #61: bad zipfile offset (local header sig): 7721753 file #62: bad zipfile offset (local header sig): 7723662 file #63: bad zipfile offset (local header sig): 7725567 file #64: bad zipfile offset (local header sig): 7727478 file #65: bad zipfile offset (local header sig): 7729383 file #66: bad zipfile offset (local header sig): 7731293 file #67: bad zipfile offset (local header sig): 7733203 file #68: bad zipfile offset (local header sig): 7735118 file #69: bad zipfile offset (local header sig): 7737028 file #70: bad zipfile offset (local header sig): 7738944 file #71: bad zipfile offset (local header sig): 7740852 file #72: bad zipfile offset (local header sig): 7742765 file #73: bad zipfile offset (local header sig): 7744681 file #74: bad zipfile offset (local header sig): 7746603 file #75: bad zipfile offset (local header sig): 7748516 file #76: bad zipfile offset (local header sig): 7750427 file #77: bad zipfile offset (local header sig): 7752338
HW/SW Environment
Anything else?
I believe the issue is related to the following script: https://github.com/haugene/docker-transmission-openvpn/blob/master/openvpn/ovpn/configure-openvpn.sh And specifically line 46:
unzip /tmp/main.zip "vpn-configs-contrib-main/openvpn/ovpn/*" -d /tmp/
Perhaps this could easily be solved by using a different command than unzip? @derekcentrico
Since version 3 works fine and version 4 does not, I suspect this may be related to the switch to Ubuntu. Perhaps the issue is only present on the arm64 version.
I understand the issue has to do with a provider-related script, but the issue itself may have more to do with the container's environment, so I put it here instead of in the provider repo.