qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
27.08k stars 3.9k forks source link

Unable to change WebUI port from the WebUI #14774

Closed davkastheranger19 closed 3 years ago

davkastheranger19 commented 3 years ago

qBittorrent version and Operating System

qBittorrent v4.3.4.1 & Ubuntu 20.04

If on linux, libtorrent-rasterbar and Qt version

libtorrent-rasterbar10 Version 1.2.13+git20210323.34a979720b-1ppa1~20.04

What is the problem

Can't change the WebUI port to 443 in the WebUI and if I change the port to 443 in the service and config file, the service won't start. If I try to save the port change in the WebUI, I get the error "Unable to save program preferences, qBittorrent is probably unreachable." and then I get logged out of the webpage.

What is the expected behavior

Changing the port to 443 is works.

Steps to reproduce

Login to web UI and try to change the port to 443 after specifying the Certificate path.

Extra info(if any)

I have a wildcard certificate for my domain that is valid and is correctly pathed and works and is showing correctly on the webpage as secured. I can change the port to anything but 443. I've checked the server and nothing else is using 443 and nothing is bound to it.

This is the error I get after reloading the daemon and restarting the service.

● qbittorrent-nox.service - qBittorrent Command Line Client Loaded: loaded (/etc/systemd/system/qbittorrent-nox.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2021-04-12 00:43:46 UTC; 145ms ago Process: 1087591 ExecStart=/usr/bin/qbittorrent-nox -d --webui-port=443 (code=exited, status=0/SUCCESS) Main PID: 1087592 (code=exited, status=1/FAILURE)

Apr 12 00:43:46 pocketnet systemd[1]: qbittorrent-nox.service: Scheduled restart job, restart counter is at 5. Apr 12 00:43:46 pocketnet systemd[1]: Stopped qBittorrent Command Line Client. Apr 12 00:43:46 pocketnet systemd[1]: qbittorrent-nox.service: Start request repeated too quickly. Apr 12 00:43:46 pocketnet systemd[1]: qbittorrent-nox.service: Failed with result 'exit-code'.

This issue also exists in version 4.3.3 and 4.3.4

glassez commented 3 years ago

AFAIK, ports 0-1023 is "well-known" or "system" ports. On Unix-like systems the process should be running as root to be able to use one of them.

FranciscoPombal commented 3 years ago

@davkastheranger19 Please try a port > 1024 (recommended), or running qBittorrent as root (not recommended).

davkastheranger19 commented 3 years ago

@davkastheranger19 Please try a port > 1024 (recommended), or running qBittorrent as root (not recommended).

If I have to run the service as root to get 443 to work, then I will just use a reverse proxy. Thanks. You can close the ticket.