binhex / arch-qbittorrentvpn

Docker build script for Arch Linux base with qBittorrent, Privoxy and OpenVPN
GNU General Public License v3.0
397 stars 46 forks source link

Issue: /root/tools.sh: line 129: drill: command not found #230

Closed vikawarez closed 3 weeks ago

vikawarez commented 2 months ago

Hi there!

I am facing the issue below which is preventing qbittorrentvpn from running. Could you please help me resolve this issue?

Is there any other information you need?

Thank you!

2024-04-08 16:14:17.645331 [info] System information Linux 25c8c43f352f 6.1.0-rpi4-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.54-1+rpt2 (2023-10-05) aarch64 GNU/Linux

2024-04-08 16:14:17.726940 [info] PUID defined as '1000'

2024-04-08 16:14:17.811409 [info] PGID defined as '1000'

2024-04-08 16:14:17.910282 [info] UMASK defined as '000'

2024-04-08 16:14:17.989108 [info] Permissions already set for '/config'

2024-04-08 16:14:18.070834 [info] Deleting files in /tmp (non recursive)...

2024-04-08 16:14:18.168182 [info] VPN_ENABLED defined as 'yes'

2024-04-08 16:14:18.251391 [info] VPN_CLIENT defined as 'wireguard'

2024-04-08 16:14:18.331552 [info] VPN_PROV defined as 'pia'

2024-04-08 16:14:18.427127 [info] WireGuard config file (conf extension) is located at /config/wireguard/wg0.conf

2024-04-08 16:14:18.538085 [info] VPN_REMOTE_SERVER defined as 'nl-amsterdam.privacy.network'

2024-04-08 16:14:18.618105 [info] VPN_REMOTE_PORT defined as '1337'

2024-04-08 16:14:18.689584 [info] VPN_DEVICE_TYPE defined as 'wg0'

2024-04-08 16:14:18.760669 [info] VPN_REMOTE_PROTOCOL defined as 'udp'

/root/tools.sh: line 129: drill: command not found

/root/tools.sh: line 129: drill: command not found

/root/tools.sh: line 129: drill: command not found

/root/tools.sh: line 129: drill: command not found

/root/tools.sh: line 129: drill: command not found

/root/tools.sh: line 129: drill: command not found

nomisunrider commented 2 months ago

Same here.

Relevant section is:

` # resolve hostname to ip address(es)

note grep -m 8 is used to limit number of returned ip's per host to

                            # 8 to reduce the change of hitting 64 remote options for openvpn
                            vpn_remote_item_dns_answer=$(drill -a -4 "${vpn_remote_server}" | grep -v 'SERVER' | grep -m 8 -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | xargs)

`

Eindride66 commented 2 months ago

I am also getting this same issue now. Anyone found a solution?

Aeptitude commented 2 months ago

Also seeing this issue. I was using TransmissionVPN previously and the drill: command not found error kept appearing there also. Tried out this image, and obviously the same error. If you revert to an older container image, it works. Seems like a bug that has been missed? At a guess whatever process requires use of the drill command? Happening on docker on a raspberry pi 4, if it helps.

nomisunrider commented 2 months ago

Also on rpi 4 docker

anthonyrocom commented 1 month ago

According to the Arch Linux documentation, drill is part of ldns package: https://man.archlinux.org/man/drill.1

You can "docker exec -it qbittorrentvpn bash" and update the package manager database "pacman -Syy" and then "pacman -S ldns" to install drill.

It almost feels like ldns package is missing from the Arch Linux installation.

I was able to resolve the error but have another one. Maybe you guys can confirm what happens after you get past the error. I get this:

/root/tools.sh: line 129: drill: command not found
/root/tools.sh: line 129: drill: command not found
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/5.15.0-1053-raspi
ip6tables v1.8.10 (legacy): can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
2024-05-01 19:52:55.247036 [warn] ip6tables default policies not available, skipping ip6tables drops

That could be becuase IPv6 is not supported. Later on I fail to get the wireguard interface up because of this error:

2024-05-01 19:53:00,057 DEBG 'start-script' stdout output:
[info] Attempting to bring WireGuard interface 'up'...

2024-05-01 19:53:00,098 DEBG 'start-script' stderr output:
Warning: `/config/wireguard/wg0.conf' is world accessible

2024-05-01 19:53:00,124 DEBG 'start-script' stderr output:
[#] ip link add wg0 type wireguard

2024-05-01 19:53:00,135 DEBG 'start-script' stderr output:
[#] wg setconf wg0 /dev/fd/63

2024-05-01 19:53:00,148 DEBG 'start-script' stderr output:
[#] ip -4 address add 10.5.0.2/32 dev wg0

2024-05-01 19:53:00,184 DEBG 'start-script' stderr output:
[#] ip link set mtu 1420 up dev wg0

2024-05-01 19:53:00,197 DEBG 'start-script' stderr output:
[#] resolvconf -a wg0 -m 0 -x

2024-05-01 19:53:00,253 DEBG 'start-script' stderr output:
could not detect a useable init system

2024-05-01 19:53:00,449 DEBG 'start-script' stderr output:
[#] wg set wg0 fwmark 51820

2024-05-01 19:53:00,455 DEBG 'start-script' stderr output:
[#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820

2024-05-01 19:53:00,464 DEBG 'start-script' stderr output:
[#] ip -4 rule add not fwmark 51820 table 51820

2024-05-01 19:53:00,472 DEBG 'start-script' stderr output:
[#] ip -4 rule add table main suppress_prefixlength 0

2024-05-01 19:53:00,491 DEBG 'start-script' stderr output:
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1

2024-05-01 19:53:00,495 DEBG 'start-script' stderr output:
sysctl: permission denied on key "net.ipv4.conf.all.src_valid_mark"

2024-05-01 19:53:00,500 DEBG 'start-script' stderr output:
[#] resolvconf -d wg0 -f

2024-05-01 19:53:00,525 DEBG 'start-script' stderr output:
could not detect a useable init system

2024-05-01 19:53:00,688 DEBG 'start-script' stderr output:
[#] ip -4 rule delete table 51820

2024-05-01 19:53:00,719 DEBG 'start-script' stderr output:
[#] ip -4 rule delete table main suppress_prefixlength 0

2024-05-01 19:53:00,758 DEBG 'start-script' stderr output:
[#] ip link delete dev wg0

2024-05-01 19:53:00,938 DEBG 'start-script' stdout output:
[warn] WireGuard interface failed to come 'up', exit code is '1'
anthonyrocom commented 1 month ago

I just solved my issue. The documentation for this project indicates that you need to replace --cap-add=NET_ADMIN with more elevated parameters:

--cap-add=NET_ADMIN \
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \

That fixed the issue for me after adding ldns using pacman (see above) and now wireguard is working perfectly!

vikawarez commented 1 month ago

According to the Arch Linux documentation, drill is part of ldns package: https://man.archlinux.org/man/drill.1

You can "docker exec -it qbittorrentvpn bash" and update the package manager database "pacman -Syy" and then "pacman -S ldns" to install drill.

It almost feels like ldns package is missing from the Arch Linux installation.

I was able to resolve the error but have another one. Maybe you guys can confirm what happens after you get past the error. I get this:

/root/tools.sh: line 129: drill: command not found
/root/tools.sh: line 129: drill: command not found
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/5.15.0-1053-raspi
ip6tables v1.8.10 (legacy): can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
2024-05-01 19:52:55.247036 [warn] ip6tables default policies not available, skipping ip6tables drops

That could be becuase IPv6 is not supported. Later on I fail to get the wireguard interface up because of this error:

2024-05-01 19:53:00,057 DEBG 'start-script' stdout output:
[info] Attempting to bring WireGuard interface 'up'...

2024-05-01 19:53:00,098 DEBG 'start-script' stderr output:
Warning: `/config/wireguard/wg0.conf' is world accessible

2024-05-01 19:53:00,124 DEBG 'start-script' stderr output:
[#] ip link add wg0 type wireguard

2024-05-01 19:53:00,135 DEBG 'start-script' stderr output:
[#] wg setconf wg0 /dev/fd/63

2024-05-01 19:53:00,148 DEBG 'start-script' stderr output:
[#] ip -4 address add 10.5.0.2/32 dev wg0

2024-05-01 19:53:00,184 DEBG 'start-script' stderr output:
[#] ip link set mtu 1420 up dev wg0

2024-05-01 19:53:00,197 DEBG 'start-script' stderr output:
[#] resolvconf -a wg0 -m 0 -x

2024-05-01 19:53:00,253 DEBG 'start-script' stderr output:
could not detect a useable init system

2024-05-01 19:53:00,449 DEBG 'start-script' stderr output:
[#] wg set wg0 fwmark 51820

2024-05-01 19:53:00,455 DEBG 'start-script' stderr output:
[#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820

2024-05-01 19:53:00,464 DEBG 'start-script' stderr output:
[#] ip -4 rule add not fwmark 51820 table 51820

2024-05-01 19:53:00,472 DEBG 'start-script' stderr output:
[#] ip -4 rule add table main suppress_prefixlength 0

2024-05-01 19:53:00,491 DEBG 'start-script' stderr output:
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1

2024-05-01 19:53:00,495 DEBG 'start-script' stderr output:
sysctl: permission denied on key "net.ipv4.conf.all.src_valid_mark"

2024-05-01 19:53:00,500 DEBG 'start-script' stderr output:
[#] resolvconf -d wg0 -f

2024-05-01 19:53:00,525 DEBG 'start-script' stderr output:
could not detect a useable init system

2024-05-01 19:53:00,688 DEBG 'start-script' stderr output:
[#] ip -4 rule delete table 51820

2024-05-01 19:53:00,719 DEBG 'start-script' stderr output:
[#] ip -4 rule delete table main suppress_prefixlength 0

2024-05-01 19:53:00,758 DEBG 'start-script' stderr output:
[#] ip link delete dev wg0

2024-05-01 19:53:00,938 DEBG 'start-script' stdout output:
[warn] WireGuard interface failed to come 'up', exit code is '1'

Thank you for this!

I think this solved the problem. I didn't need to do this despite using wireguard:

--sysctl="net.ipv4.conf.all.src_valid_mark=1" \

I'm not sure why or if I am doing things right. Will keep everyone posted.

s5n1el commented 1 month ago

do we have a permanent workaroudn for this? exec into the docker container each runtime doesn't seem like it's a sustainable solution for this problem. Testing it out as a tempfix for the time being

anthonyrocom commented 1 month ago

It's already noted as fixed in https://github.com/binhex/arch-qbittorrentvpn/pull/234

s5n1el commented 1 month ago

please forgive my ignorance here - I pulled a fresh image and am still getting the error. the repository shows last upddated 11 days ago on docker.io, while the commit was more recent than that. How can I get this update if it has not been published?

anthonyrocom commented 1 month ago

Hi @s5n1el, the change was made on May 1 in a dependency for this docker build. binhex made a new release of that dependecy and this build 5 days ago. I'm not sure why you're seeing updates from 11 days ago when https://hub.docker.com/r/binhex/arch-qbittorrentvpn/ latest version is from 5 days ago.