qBittorrent won't start automatically, help! Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
pihunt
Posts: 2
Joined: Sat Mar 28, 2020 6:55 pm

qBittorrent won't start automatically, help!

Post by pihunt »

Hi All!
I'm new to DietPi and qBittorrent as well. I used Transmission until now, but I wanted more advanced torrent client for my home media server. So my problem is, when I restart the Pi, the torrent client won't start automatically, which is annoying. How can I make it work?
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: qBittorrent won't start automatically, help!

Post by Joulinar »

Hi,

can you share following directly after reboot

Code: Select all

systemctl status qbittorrent.service
journalctl -u qbittorrent.service
cat /var/log/qbittorrent/qbittorrent.log
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
pihunt
Posts: 2
Joined: Sat Mar 28, 2020 6:55 pm

Re: qBittorrent won't start automatically, help!

Post by pihunt »

Hey!

I've created a service in /etc/systemd/system/qbt.service

This is what it contains:

Code: Select all

[Unit]
Description=qBittorrent client
After=network.target

[Service]
User=root
Type=idle
ExecStart=/usr/bin/qbittorrent
ExecStop=/usr/bin/qbittorrent -kill

[Install]
WantedBy=multi-user.target

This is what I can see from the log:

Code: Select all

sudo systemctl status qbt.service
● qbt.service - qBittorrent client
     Loaded: loaded (/etc/systemd/system/qbt.service; enabled; vendor preset: enabled)
     Active: failed (Result: signal) since Thu 2021-08-19 15:33:41 EDT; 1min 48s ago
    Process: 619 ExecStart=/usr/bin/qbittorrent (code=killed, signal=ABRT)
   Main PID: 619 (code=killed, signal=ABRT)
        CPU: 90ms

Aug 19 15:33:36 DietPi systemd[1]: Started qBittorrent client.
Aug 19 15:33:41 DietPi qbittorrent[619]: qt.qpa.xcb: could not connect to display
Aug 19 15:33:41 DietPi qbittorrent[619]: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
Aug 19 15:33:41 DietPi qbittorrent[619]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Aug 19 15:33:41 DietPi qbittorrent[619]: Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
Aug 19 15:33:41 DietPi systemd[1]: qbt.service: Main process exited, code=killed, status=6/ABRT
Aug 19 15:33:41 DietPi systemd[1]: qbt.service: Failed with result 'signal'.

Code: Select all

root@DietPi:~# systemctl status qbt.service
● qbt.service - qBittorrent client
     Loaded: loaded (/etc/systemd/system/qbt.service; enabled; vendor preset: enabled)
     Active: failed (Result: signal) since Thu 2021-08-19 15:33:41 EDT; 9min ago
    Process: 619 ExecStart=/usr/bin/qbittorrent (code=killed, signal=ABRT)
   Main PID: 619 (code=killed, signal=ABRT)
        CPU: 90ms

Aug 19 15:33:36 DietPi systemd[1]: Started qBittorrent client.
Aug 19 15:33:41 DietPi qbittorrent[619]: qt.qpa.xcb: could not connect to display
Aug 19 15:33:41 DietPi qbittorrent[619]: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
Aug 19 15:33:41 DietPi qbittorrent[619]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Aug 19 15:33:41 DietPi qbittorrent[619]: Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
Aug 19 15:33:41 DietPi systemd[1]: qbt.service: Main process exited, code=killed, status=6/ABRT
Aug 19 15:33:41 DietPi systemd[1]: qbt.service: Failed with result 'signal'.

Code: Select all

root@DietPi:~# journalctl -u qbt.service
-- Journal begins at Thu 2021-08-19 15:33:34 EDT, ends at Thu 2021-08-19 15:40:01 EDT. --
Aug 19 15:33:36 DietPi systemd[1]: Started qBittorrent client.
Aug 19 15:33:41 DietPi qbittorrent[619]: qt.qpa.xcb: could not connect to display
Aug 19 15:33:41 DietPi qbittorrent[619]: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
Aug 19 15:33:41 DietPi qbittorrent[619]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Aug 19 15:33:41 DietPi qbittorrent[619]: Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
Aug 19 15:33:41 DietPi systemd[1]: qbt.service: Main process exited, code=killed, status=6/ABRT
Aug 19 15:33:41 DietPi systemd[1]: qbt.service: Failed with result 'signal'.

Code: Select all

root@DietPi:~# cat /var/log/qbittorrent/qbittorrent.log
(N) 2021-08-19T15:34:32 - qBittorrent v4.2.5 started
(N) 2021-08-19T15:34:32 - Using config directory: /home/qbittorrent/.config/qBittorrent/
(I) 2021-08-19T15:34:32 - Trying to listen on: 0.0.0.0:6881,[::]:6881
(N) 2021-08-19T15:34:32 - Peer ID: -qB4250-
(N) 2021-08-19T15:34:32 - HTTP User-Agent is 'qBittorrent/4.2.5'
(I) 2021-08-19T15:34:32 - DHT support [ON]
(I) 2021-08-19T15:34:32 - Local Peer Discovery support [ON]
(I) 2021-08-19T15:34:32 - PeX support [ON]
(I) 2021-08-19T15:34:32 - Anonymous mode [OFF]
(I) 2021-08-19T15:34:32 - Encryption support [FORCED]
(I) 2021-08-19T15:34:32 - UPnP / NAT-PMP support [ON]
(I) 2021-08-19T15:34:33 - IP geolocation database loaded. Type: DBIP-Country-Lite. Build time: Sat Jul 31 20:15:10 2021.
(N) 2021-08-19T15:34:33 - Using built-in Web UI.
(N) 2021-08-19T15:34:33 - Web UI translation for selected locale (en) has been successfully loaded.
(N) 2021-08-19T15:34:33 - Web UI: Now listening on IP: *, port: 1340
(I) 2021-08-19T15:34:33 - Successfully listening on IP: 127.0.0.1, port: TCP/6881
(I) 2021-08-19T15:34:33 - Successfully listening on IP: 127.0.0.1, port: UDP/6881
(I) 2021-08-19T15:34:33 - Successfully listening on IP: 192.168.1.5, port: TCP/6881
(I) 2021-08-19T15:34:33 - Successfully listening on IP: 192.168.1.5, port: UDP/6881
(I) 2021-08-19T15:34:33 - Successfully listening on IP: xxxxx, port: TCP/6881
(I) 2021-08-19T15:34:33 - Successfully listening on IP: xxxxx, port: UDP/6881
(I) 2021-08-19T15:34:33 - Successfully listening on IP: xxxxxxxx, port: TCP/6881
(I) 2021-08-19T15:34:33 - Successfully listening on IP: xxxxxxxx, port: UDP/6881
(I) 2021-08-19T15:34:33 - Detected external IP: xxxxxx
(C) 2021-08-19T15:37:08 - UPnP/NAT-PMP: Port mapping failure, message: could not map port using UPnP: no router found
(C) 2021-08-19T15:37:08 - UPnP/NAT-PMP: Port mapping failure, message: could not map port using UPnP: no router found
(C) 2021-08-19T15:37:08 - UPnP/NAT-PMP: Port mapping failure, message: could not map port using UPnP: no router found
(C) 2021-08-19T15:37:08 - UPnP/NAT-PMP: Port mapping failure, message: could not map port using UPnP: no router found
(C) 2021-08-19T15:37:08 - UPnP/NAT-PMP: Port mapping failure, message: could not map port using UPnP: no router found
(C) 2021-08-19T15:37:08 - UPnP/NAT-PMP: Port mapping failure, message: could not map port using UPnP: no router found
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: qBittorrent won't start automatically, help!

Post by Joulinar »

Can I ask a question? How did you install qbittorrent? Because I did not understand why you created an own service. Did you user dietpi-software?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: qBittorrent won't start automatically, help!

Post by Joulinar »

That one seems not to be installed via dietpi-software but probably the result of apt install qbittorrent, which is not an ideal package for a server system. dietpi-software installs the qbittorrent-nox package which does not come with the GUI stuff but can be controlled via web interface instead.

Not sure where the service is coming from, as the above package does not ship one and also the location is one of a custom install, but it is not our service.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply