Kabe0 / deluge-windscribe

To provide an isolated VPN layer with Deluge
23 stars 6 forks source link

Cannot change WEB_PORT #19

Open OC-Rookier opened 3 years ago

OC-Rookier commented 3 years ago

I expect this to be chalked up to user error, but I'll give a quick description of the issue.

I've been attempting to set containers on a macvlan network off and on for about two weeks now. Some containers (eg. qbittorrent and pihole) work perfectly with little to no tinkering. Other containers, such as this one and Portainer, just don't. I'm more focused on the former because I don't care about the latter right now. Anyway, the point is when I go to set the WEB_PORT environment variable, it doesn't change anything, even after adjusting the exposed ports to match.

Docker run command (no macvlan funny business): docker run \ -v /home/pi/test/config:/config \ -v /home/pi/test/downloads:/downloads \ -p 80:80 \ -e WEB_PORT=80 \ -p 58846:58846 \ --dns 9.9.9.9 \ --cap-add=NET_ADMIN \ --device /dev/net/tun:/dev/net/tun \ --name deluge-windscribe \ kabe0/deluge-windscribe

Docker run command (with macvlan) docker run \ -v /home/pi/test/config:/config \ -v /home/pi/test/downloads:/downloads \ -p 80:80 \ -p 58846:58846 \ --dns 9.9.9.9 \ --cap-add=NET_ADMIN \ --network macvlan \ -e WEB_PORT=80 \ --ip "192.168.220.132" \ --device /dev/net/tun:/dev/net/tun \ --name deluge-windscribe \ kabe0/deluge-windscribe:1.8.9

The logs aren't any help, and they are identical on both versions of the Docker run command. When I go to the IP address of the container after running the latter command, it tells me that I was unable to connect. Adding a :80, :8112, etc. doesn't change anything. Using nmap on a separate computer reveals that all the ports on this container are closed.

Unable to initialize gettext/locale! 'ngettext' Traceback (most recent call last): File "/usr/lib/python3/dist-packages/deluge/i18n/util.py", line 118, in setup_translation builtins.__dict__['_n'] = builtins.__dict__['ngettext'] KeyError: 'ngettext' This is apparently normal, and is a deluge issue and not specific to this image. A few miscellaneous details to wrap this up: the default way of accessing to container via the host's IP and the port 8112 works fine. Using docker-compose gives the same issue as what I am describing. This issue is occurring on a Raspberry Pi 4 with the latest version of Raspbian. This symptom also occurs on at least the latest version as well as 1.8.9 of this image.

If anyone knows if I'm missing anything, please let me know!

Kabe0 commented 3 years ago

Just to clarify, you want your docker container to run on port 80? The WEB_PORT should work, but if your running into problems you could try keeping the WEB_PORT set to 8112, and just use docker to convert the port. For example...

docker run \ -v /home/pi/test/config:/config \ 
  -v /home/pi/test/downloads:/downloads \ 
  -p 80:8112 \ 
  -p 58846:58846 \ 
  --dns 9.9.9.9 \ 
  --cap-add=NET_ADMIN \ 
  --device /dev/net/tun:/dev/net/tun \ 
  --name deluge-windscribe \ 
  kabe0/deluge-windscribe

I have found some issues with Raspberry Pi based OS's. If you run into permission issues, adding --privileged will fix it for now.

OC-Rookier commented 3 years ago

Just to clarify, you want your docker container to run on port 80?

Yes, but on the macvlan network I have, which gives the container its own IP address rather than accessing it via the host and a port. Using your example works fine (other than a minor formatting issue which was throwing docker off), and I can access the Deluge WebUI by just typing in the host's IP address into my browser. However, trying to add the container to the macvlan network (as described in the second docker run command of the original post) does not work. I cannot access the container at all, and nmap shows all ports as closed. Running as privileged also does not fix the issue.

Current docker run