Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https-dns-proxy: service stopping on boot #23567

Closed
g055s00 opened this issue Mar 1, 2024 · 8 comments · Fixed by #23571
Closed

https-dns-proxy: service stopping on boot #23567

g055s00 opened this issue Mar 1, 2024 · 8 comments · Fixed by #23571
Assignees

Comments

@g055s00
Copy link

g055s00 commented Mar 1, 2024

Maintainer: @stangri
Environment: mt7621, 23.05.2

Description:
At device startup, the dnsmasq configuration reverts to the backup due to https-dns-proxy service stopping. To update the configuration, https-dns-proxy needs to be manually restarted.

The status of https-dns-proxy and dnsmasq after reboot:

# logread -e https-dns-proxy
Fri Mar  1 15:43:20 2024 user.notice https-dns-proxy: Starting service instances on_boot ✓
Fri Mar  1 15:43:20 2024 user.notice https-dns-proxy: Updating dnsmasq config ✓
Fri Mar  1 15:43:26 2024 user.notice https-dns-proxy: Restarting dnsmasq on_config_update ✓
Fri Mar  1 15:43:31 2024 user.notice https-dns-proxy: Stopping service on_boot ✓
# service https-dns-proxy status
running
# logread -e dnsmasq
Fri Mar  1 15:43:11 2024 user.notice dnsmasq: DNS rebinding protection is active, will discard upstream RFC1918 responses!
Fri Mar  1 15:43:11 2024 user.notice dnsmasq: Allowing 127.0.0.0/8 responses
Fri Mar  1 15:43:11 2024 daemon.info dnsmasq[1]: started, version 2.89 cachesize 1000
Fri Mar  1 15:43:11 2024 daemon.info dnsmasq[1]: DNS service limited to local subnets
Fri Mar  1 15:43:11 2024 daemon.info dnsmasq[1]: compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-nftset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile
Fri Mar  1 15:43:11 2024 daemon.info dnsmasq[1]: UBus support enabled: connected to system bus
Fri Mar  1 15:43:11 2024 daemon.info dnsmasq[1]: using nameserver 9.9.9.9#53
Fri Mar  1 15:43:11 2024 daemon.info dnsmasq[1]: using nameserver 149.112.112.112#53
Fri Mar  1 15:43:11 2024 daemon.info dnsmasq[1]: using only locally-known addresses for test
Fri Mar  1 15:43:11 2024 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Fri Mar  1 15:43:11 2024 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Fri Mar  1 15:43:11 2024 daemon.info dnsmasq[1]: using only locally-known addresses for local
Fri Mar  1 15:43:11 2024 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Fri Mar  1 15:43:11 2024 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Fri Mar  1 15:43:11 2024 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Fri Mar  1 15:43:11 2024 daemon.info dnsmasq[1]: read /etc/hosts - 12 names
Fri Mar  1 15:43:11 2024 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 0 names
Fri Mar  1 15:43:20 2024 user.notice https-dns-proxy: Updating dnsmasq config ✓
Fri Mar  1 15:43:21 2024 daemon.info dnsmasq[1]: exiting on receipt of SIGTERM
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq[1]: started, version 2.89 cachesize 1000
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq[1]: DNS service limited to local subnets
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq[1]: compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-nftset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq[1]: UBus support enabled: connected to system bus
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq-dhcp[1]: DHCP, IP range 192.168.1.100 -- 192.168.1.249, lease time 12h
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq[1]: using nameserver 127.0.0.1#5053
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq[1]: using only locally-known addresses for test
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq[1]: using only locally-known addresses for local
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq[1]: read /etc/hosts - 12 names
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 4 names
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c.2105 - 0 names
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq[1]: read /tmp/hosts/odhcpd - 0 names
Fri Mar  1 15:43:24 2024 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
Fri Mar  1 15:43:26 2024 user.notice https-dns-proxy: Restarting dnsmasq on_config_update ✓
Fri Mar  1 15:43:28 2024 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan)
Fri Mar  1 15:43:28 2024 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan)
Fri Mar  1 15:43:28 2024 daemon.info dnsmasq[1]: exiting on receipt of SIGTERM
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq[1]: started, version 2.89 cachesize 1000
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq[1]: DNS service limited to local subnets
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq[1]: compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-nftset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq[1]: UBus support enabled: connected to system bus
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq-dhcp[1]: DHCP, IP range 192.168.1.100 -- 192.168.1.249, lease time 12h
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq[1]: using nameserver 9.9.9.9#53
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq[1]: using nameserver 149.112.112.112#53
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq[1]: using only locally-known addresses for test
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq[1]: using only locally-known addresses for local
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq[1]: read /etc/hosts - 12 names
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 4 names
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq[1]: read /tmp/hosts/odhcpd - 0 names
Fri Mar  1 15:43:31 2024 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
...

https-dns-proxy restart:

Fri Mar  1 16:07:29 2024 user.notice https-dns-proxy: Updating dnsmasq config ✓
Fri Mar  1 16:07:29 2024 daemon.info dnsmasq[1]: exiting on receipt of SIGTERM
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq[1]: started, version 2.89 cachesize 1000
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq[1]: DNS service limited to local subnets
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq[1]: compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-nftset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq[1]: UBus support enabled: connected to system bus
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq-dhcp[1]: DHCP, IP range 192.168.1.100 -- 192.168.1.249, lease time 12h
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq[1]: using nameserver 127.0.0.1#5053
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq[1]: using only locally-known addresses for test
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq[1]: using only locally-known addresses for local
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq[1]: read /etc/hosts - 12 names
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 4 names
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq[1]: read /tmp/hosts/odhcpd - 0 names
Fri Mar  1 16:07:33 2024 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
Fri Mar  1 16:07:33 2024 user.notice https-dns-proxy: Restarting dnsmasq on_config_update ✓
@stangri
Copy link
Member

stangri commented Mar 1, 2024

Thank you for providing logs. I'm failing to see what the issue is.

@g055s00
Copy link
Author

g055s00 commented Mar 1, 2024

This relates to the comment made in another issue regarding the functioning of https-dns-proxy, which only seems to work after a manual restart.

@g055s00
Copy link
Author

g055s00 commented Mar 1, 2024

Thank you for providing logs. I'm failing to see what the issue is.

Here's the problem: resolveip is not listed as a dependency, so the service is stopping on boot.

is_resolver_working() { resolveip -t 3 one.one.one.one >/dev/null 2>&1; }

is_resolver_working || { rc_procd stop_service 'on_boot' && service_stopped 'on_boot'; }

@stangri
Copy link
Member

stangri commented Mar 1, 2024

Are you saying you don't have resolveip on your OpenWrt install?

@stangri
Copy link
Member

stangri commented Mar 1, 2024

This relates to the comment made in another issue regarding the functioning of https-dns-proxy, which only seems to work after a manual restart.

In the non-working-after-restart state, please provide the output of:

logread -ehttps
service https-dns-proxy status

@g055s00
Copy link
Author

g055s00 commented Mar 1, 2024

Are you saying you don't have resolveip on your OpenWrt install?

Yes, that's correct. I didn't have this package. After installing it, everything works fine now.

@g055s00
Copy link
Author

g055s00 commented Mar 1, 2024

Are you saying you don't have resolveip on your OpenWrt install?

Should it be there? This package is not listed in the manifest file.

@g055s00 g055s00 changed the title https-dns-proxy: After reboot, a backup dnsmasq configuration is loaded https-dns-proxy: service stopping on boot Mar 1, 2024
@stangri
Copy link
Member

stangri commented Mar 1, 2024

Are you saying you don't have resolveip on your OpenWrt install?

Should it be there? This package is not listed in the manifest file.

My understanding is that it's included with all systems, but you're right, there should be a dependency, I'll push a fix this weekend!

Thank you for pretty much solving the issue and presenting the solution!

stangri added a commit to stangri/packages that referenced this issue Mar 2, 2024
* Fixes openwrt#23567
* Also minor update for failed healthcheck logging

Signed-off-by: Stan Grishin <stangri@melmac.ca>
stangri added a commit to stangri/packages that referenced this issue Mar 2, 2024
* update to upstream 2023-11-19
  (changes: aarond10/https_dns_proxy@489c57e)
* bugfix: include resolveip dependency in Makefile
  (fixes openwrt#23567)
* minor update for failed healthcheck logging

Signed-off-by: Stan Grishin <stangri@melmac.ca>
stangri added a commit to stangri/packages that referenced this issue Mar 2, 2024
* update to upstream 2023-11-19
  (changes: aarond10/https_dns_proxy@489c57e)
* bugfix: include resolveip dependency in Makefile
  (fixes openwrt#23567)
* minor update for failed healthcheck logging

Signed-off-by: Stan Grishin <stangri@melmac.ca>
stangri added a commit to stangri/packages that referenced this issue Mar 2, 2024
* update to upstream 2023-11-19
  (changes: aarond10/https_dns_proxy@489c57e)
* bugfix: include resolveip dependency in Makefile
  (fixes openwrt#23567)
* minor update for failed healthcheck logging

Signed-off-by: Stan Grishin <stangri@melmac.ca>
stangri added a commit to stangri/packages that referenced this issue Mar 2, 2024
* update to upstream 2023-11-19
  (changes: aarond10/https_dns_proxy@489c57e)
* bugfix: include resolveip dependency in Makefile
  (fixes openwrt#23567)
* minor update for failed healthcheck logging

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit bd501dd)
stangri added a commit to stangri/packages that referenced this issue Mar 2, 2024
* update to upstream 2023-11-19
  (changes: aarond10/https_dns_proxy@489c57e)
* bugfix: include resolveip dependency in Makefile
  (fixes openwrt#23567)
* minor update for failed healthcheck logging

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit bd501dd)
@stangri stangri self-assigned this Mar 2, 2024
db260179 pushed a commit to db260179/openwrt-packages that referenced this issue Mar 16, 2024
* update to upstream 2023-11-19
  (changes: aarond10/https_dns_proxy@489c57e)
* bugfix: include resolveip dependency in Makefile
  (fixes openwrt#23567)
* minor update for failed healthcheck logging

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit bd501dd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants