binhex / arch-delugevpn

Docker build script for Arch Linux base with Deluge, Privoxy and OpenVPN
GNU General Public License v3.0
702 stars 111 forks source link

Unable to access web panel when vpn is enabled #323

Open RobCod opened 2 years ago

RobCod commented 2 years ago

I recently installed this on a ubuntu server based vm, and I can't access the webUI on my pc. When I'm connected via ssh and run docker exec -it containerID bash and then curl ifconfig.io I get a different ip than my own(means it is connecting to the vpn correctly). I am using -p 8112:8112 as the docs suggest.

I also cannot access the webUI when VPN_ENABLED=no

This is the command i used to install the docker container.

docker run -d \
    --cap-add=NET_ADMIN \
    -p 8112:8112 \
    -p 8118:8118 \
    -p 58846:58846 \
    -p 58946:58946 \
    --name=binhex-delugevpn \
    -v /media/share/Downloads:/data \
    -v /media/share/Downloads/config:/config \
    -v /etc/localtime:/etc/localtime:ro \
    -e VPN_ENABLED=yes \
    -e VPN_USER={redacted} \
    -e VPN_PASS={redacted} \
    -e VPN_PROV=custom \
    -e VPN_CLIENT=openvpn \
    -e VPN_OPTIONS= \
    -e STRICT_PORT_FORWARD=yes \
    -e ENABLE_PRIVOXY=no \
    -e LAN_NETWORK=192.168.0.0/24 \
    -e NAME_SERVERS=84.200.69.80,37.235.1.174,1.1.1.1,37.235.1.177,84.200.70.40,1.0.0.1 \
    -e DELUGE_DAEMON_LOG_LEVEL=info \
    -e DELUGE_WEB_LOG_LEVEL=info \
    -e VPN_INPUT_PORTS= \
    -e VPN_OUTPUT_PORTS= \
    -e DEBUG=false \
    -e UMASK=000 \
    -e PUID=PUID \
    -e PGID=PGID \
    binhex/arch-delugevpn
RobCod commented 2 years ago

when i view the supervisord.log this is at the bottom of it

2022-08-28 19:31:45,500 DEBG 'watchdog-script' stderr output:
cat: /config/deluged.log: No such file or directory

2022-08-28 19:32:30,760 DEBG 'watchdog-script' stdout output:
[info] Deluge listening interface IP 0.0.0.0 and VPN provider IP 10.8.2.10 different, marking for reconfigure

2022-08-28 19:32:30,763 DEBG 'watchdog-script' stdout output:
[info] Deluge not running

2022-08-28 19:32:30,765 DEBG 'watchdog-script' stdout output:
[info] Deluge Web UI not running

2022-08-28 19:32:30,766 DEBG 'watchdog-script' stdout output:
[info] Attempting to start Deluge...
[info] Removing deluge pid file (if it exists)...

2022-08-28 19:32:30,952 DEBG 'watchdog-script' stdout output:
[info] Deluge configuration file /config/core.conf does not exist, exiting Python script config_deluge.py...

2022-08-28 19:32:31,130 DEBG 'watchdog-script' stdout output:
[info] Deluge configuration file /config/core.conf does not exist, exiting Python script config_deluge.py...

2022-08-28 19:32:31,392 DEBG 'watchdog-script' stderr output:
Traceback (most recent call last):
  File "/usr/bin/deluged", line 33, in <module>
    sys.exit(load_entry_point('deluge==2.1.1', 'gui_scripts', 'deluged')())
  File "/usr/lib/python3.10/site-packages/deluge/core/daemon_entry.py", line 84, in start_daemon

2022-08-28 19:32:31,394 DEBG 'watchdog-script' stderr output:
    options = parser.parse_args()
  File "/usr/lib/python3.10/site-packages/deluge/argparserbase.py", line 247, in parse_args
    return self._handle_ui_options(options)
  File "/usr/lib/python3.10/site-packages/deluge/argparserbase.py", line 293, in _handle_ui_options
    deluge.log.setup_logger(
  File "/usr/lib/python3.10/site-packages/deluge/log.py", line 151, in setup_logger
    handler = handler_cls(filename, mode=filemode, encoding='utf-8')
  File "/usr/lib/python3.10/logging/handlers.py", line 475, in __init__
    logging.FileHandler.__init__(self, filename, mode=mode,
  File "/usr/lib/python3.10/logging/__init__.py", line 1169, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python3.10/logging/__init__.py", line 1201, in _open
    return open_func(self.baseFilename, self.mode,
PermissionError: [Errno 13] Permission denied: '/config/deluged.log'

2022-08-28 19:32:42,505 DEBG 'watchdog-script' stdout output:
[warn] Wait for Deluge process to start aborted, too many retries
[info] Showing output from command before exit...

2022-08-28 19:32:42,744 DEBG 'watchdog-script' stderr output:
Traceback (most recent call last):
  File "/usr/bin/deluged", line 33, in <module>
    sys.exit(load_entry_point('deluge==2.1.1', 'gui_scripts', 'deluged')())
  File "/usr/lib/python3.10/site-packages/deluge/core/daemon_entry.py", line 84, in start_daemon

2022-08-28 19:32:42,746 DEBG 'watchdog-script' stderr output:
    options = parser.parse_args()
  File "/usr/lib/python3.10/site-packages/deluge/argparserbase.py", line 247, in parse_args
    return self._handle_ui_options(options)
  File "/usr/lib/python3.10/site-packages/deluge/argparserbase.py", line 293, in _handle_ui_options
    deluge.log.setup_logger(
  File "/usr/lib/python3.10/site-packages/deluge/log.py", line 151, in setup_logger
    handler = handler_cls(filename, mode=filemode, encoding='utf-8')
  File "/usr/lib/python3.10/logging/handlers.py", line 475, in __init__
    logging.FileHandler.__init__(self, filename, mode=mode,
  File "/usr/lib/python3.10/logging/__init__.py", line 1169, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python3.10/logging/__init__.py", line 1201, in _open
    return open_func(self.baseFilename, self.mode,
PermissionError: [Errno 13] Permission denied: '/config/deluged.log'

2022-08-28 19:32:42,777 DEBG 'watchdog-script' stderr output:
cat: /config/deluged.log: No such file or directory

So I created the deluged.log file manually and restarted the container this is what appears in deluged.log

19:54:36 [INFO    ][deluge.configmanager:49  ] Setting config directory to: /config
19:54:37 [INFO    ][deluge.core.daemon            :91  ] Deluge daemon 2.1.1
19:54:37 [WARNING ][deluge.core.core              :333 ] Unable to load /config/session.state: [Errno 2] No such file or directory: '/config/session.state'
19:54:37 [WARNING ][deluge.core.core              :333 ] Unable to load /config/session.state.bak: [Errno 2] No such file or directory: '/config/session.state.bak'
19:54:37 [WARNING ][deluge.config                 :400 ] Unable to open config file /config/core.conf: [Errno 2] No such file or directory: '/config/core.conf'
19:54:37 [INFO    ][deluge.core.alertmanager      :138 ] Alert Queue Size set to 10000
19:54:37 [ERROR   ][deluge.core.daemon_entry      :129 ] Unable to start deluged: [Errno 13] Permission denied: '/config/plugins'
19:54:37 [INFO    ][deluge.core.daemon_entry      :134 ] Exiting...
RobCod commented 2 years ago

got the webui working by changing the config file away from my smb storage