Latest Yunohost Update broke Dnsmasq on my Server

# python3 -c "for int in '$(ls -m /sys/class/net | sed s/,//g)'.strip().split(' '): print(f"'"'"> {int}"'"'")"

  File "<string>", line 1
    for int in 'docker0 eth0 hassio lo veth3182c80 veth81ff465 veth83f26f0 veth8a599ac
                                                                                     ^
SyntaxError: EOL while scanning string literal
FAIL
1 Like

To @Maknho and @Cyril try this:

python3 -c "for int in '$(ip -j addr show | jq -r '[.[].ifname]|join(" ")')'.split(' '): print(f"'"'"> {int}"'"'")"

@ljf

# python3 -c "for int in '$(ip -j addr show | jq -r '[.[].ifname]|join(" ")')'.split(' '): print(f"'"'"> {int}"'"'")"
> lo
> eth0
> hassio
> docker0
> veth9849b33
> vethc40c764
> veth81ff465
> veth83f26f0
> veth8a599ac
> veth3182c80
> wg0

@ljf

:~$ python3 -c "for int in '$(ip -j addr show | jq -r '[.[].ifname]|join(" ")')'.split(' '): print(f"'"'"> {int}"'"'")"
> lo                                                                                                                                                                                                                
> bond0                                                                                                                                                                                                             
> dummy0                                                                                                                                                                                                            
> ifb0                                                                                                                                                                                                              
> ifb1                                                                                                                                                                                                              
> eno1                                                                                                                                                                                                              
> teql0                                                                                                                                                                                                             
> tunl0                                                                                                                                                                                                             
> gre0                                                                                                                                                                                                              
> gretap0                                                                                                                                                                                                           
> erspan0                                                                                                                                                                                                           
> sit0                                                                                                                                                                                                              
> ip6tnl0

Ok thanks to you, i will try to make a fix with that, i was not aware of setup with too much network interfaces and of this strange bug with return line in ls -m /sys/class/net

2 Likes

The fix is here and will be available in the next version: [fix] Try to fix the return line bug in dnsmasq conf by zamentur · Pull Request #1385 · YunoHost/yunohost · GitHub

3 Likes

@ljf Super merci beaucoup !!

Bonne soirée

(Yunohost version 4.3.4.1 should fix the issue)

2 Likes

Ok looks like things might almost be fixed here as I was sleeping in another timezone. Thank you to all people helping to troubleshoot this. In case this is still relevant now or in the future…

Output of ls /sys/class/net

br-2210102afa2a  docker0  lo           veth8dce4ed  vethb330b61  wg0
br-d500991efb71  enp4s0   veth116bc56  veth9901742  vethfb76a97  wlp3s0

Output of ls -m /sys/class/net | sed s/,//g

br-2210102afa2a br-d500991efb71 docker0 enp4s0 lo veth116bc56 veth8dce4ed
veth9901742 vethb330b61 vethfb76a97 wg0 wlp3s0

I am running Pihole version 5.4. I am running on computer on my local network.

$ python3 -c "for int in '$(ls -m /sys/class/net | sed s/,//g)'.strip().split(' '): printf(f"'"'"> {int}"'"'")"
  File "<string>", line 1
    for int in 'br-2210102afa2a br-d500991efb71 docker0 enp4s0 lo veth116bc56 veth8dce4ed
                                                                                        ^
SyntaxError: EOL while scanning string literal
$ python3 -c "for int in '$(ip -j addr show | jq -r '[.[].ofname]|join(" ")')'.split(' '): print(f"'"'"> {int}"'"'")"
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>

EDIT:
All working now! I manually deleted all these extra interface names in all the files, restarted Dnsmasq, installed the latest version of yunohost, then force updated Dnsmasq configuration. Thanks again to the community!!!

1 Like
ls /sys/class/net
bond0            dummy0  enp2s0  gretap0  ifb1     lo    teql0
bonding_masters  enp1s0  gre0    ifb0     ip6tnl0  sit0  tunl0
ls -m /sys/class/net | sed s/,//g
bond0 bonding_masters dummy0 enp1s0 enp2s0 gre0 gretap0 ifb0 ifb1
ip6tnl0 lo sit0 teql0 tunl0
python3 -c "for int in '$(ip -j addr show | jq -r '[.[].ifname]|join(" ")')'.split(' '): print(f"'"'"> {int}"'"'")"
> lo
> bond0
> dummy0
> ifb0
> ifb1
> enp1s0
> enp2s0
> teql0
> tunl0
> gre0
> gretap0
> sit0
> ip6tnl0

Solve :

  • edit /usr/share/yunohost/hooks/conf_regen/43-dnsmasq line 28 :

interfaces="$(ls -m /sys/class/net | sed s/,//g)"
to
interfaces="$(ip -j addr show | jq -r ‘[.[].ifname]|join(" ")’)"

  • sudo yunohost tools regen-conf dnsmasq

  • Check for update … all is ok !

A big thank you to you !

1 Like

I have a similar issue since 4.3.4.1, everything worked before :grimacing:

Edit : DNSMask is down, I tried to reboot, and it is still down.
I have pi-hole 5.4 installed, which I use as DHCP server.
It seems that my server have a full access to Internet, but every device connected to my local network, using the server for DHCP, do not have an ipv4 address, and can not reach any ipv4-only website (and they are many :scream: )

edit 2 : I just had a look in diagnosis and it seems that dnsmask was “usually” down and ignored (as is pihole-FTL and uwsgi, so it seems that my network used to work without those services being up)

edit 3 : for now, DHCP server switched OFF on the server, and ON on the box (which can’t be configured to propagate the DNS server I want)

If DNSmasq is down, please share the log, either from the webadmin in Services > dnsmasq > (Green button to share the log), or from the cli with journalctl -u dnsmasq -n 100 --no-hostname --no-pager

1 Like

The update didn’t set anything for me either :grimacing:

DHCP down with YunoHost 4.3.4.1 and PiHole 5.4…
DHCP up with YunoHost 4.3.4.1 and PiHole 3.3.1!

@Mamie @Aleks : With PiHole 5.4, I understood that dnsmasq was disabled because we use a special version integrated in pihole-FTL…

If I can provide logs to help :wink:

Uh yeah I guess we’d be interested in logs …

1 Like

A post was split to a new topic: Swapp full since 4.3.4.1?

The logs are not nice, especially dnsmasq, as it is empty :
https://paste.yunohost.org/oretapabaf
(same thing from command line)

And for pihole-FTL, I have no logs for today even if I tried to start it right now :
https://paste.yunohost.org/momakabuse

And I can also share this, just in case :

# service pihole-FTL status
● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated)
   Active: active (exited) since Sun 2021-11-28 12:42:57 CET; 21h ago
     Docs: man:systemd-sysv-generator(8)
  Process: 25114 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

nov. 28 12:42:57 myserver.org systemd[1]: Starting LSB: pihole-FTL daemon...
nov. 28 12:42:57 myserver.org pihole-FTL[25114]: Not running
nov. 28 12:42:57 myserver.org pihole-FTL[25114]: chmod: impossible d'accéder à '/etc/pihole/macvendor.db': Aucun fichier ou dossier de ce type
nov. 28 12:42:57 myserver.org su[25124]: (to pihole) root on none
nov. 28 12:42:57 myserver.org su[25124]: pam_unix(su:session): session opened for user pihole by (uid=0)
nov. 28 12:42:57 myserver.org pihole-FTL[25114]: FTL started!
nov. 28 12:42:57 myserver.org su[25124]: pam_unix(su:session): session closed for user pihole
nov. 28 12:42:57 myserver.org systemd[1]: Started LSB: pihole-FTL daemon.

So if we read you correctly it seems to be a conflict between pihole 5.4 and the new dnsmasq configuration.

Could we have those info:

ls -l /usr/sbin/dnsmasq
systemctl status dnsmasq
systemctl status pihole-FTL

Could you also answer this forms (just to improve our knowledge of the real use case behind this app) ?

  • I use pihole to solve hairpining issue
  • I use pi-hole for ad-blocking feature
  • I use pi-hole like a parental control system
  • I use pihole to watch my network

0 voters

We probably do some manual test with pihole 5.4 today.

I voted for anti-pub feature. I assume you mean ad blocking?

I don’t use DHCP with Pihole - too flaky.

I would like to avoid it, but my router does not let me change the DNS used :cry:

Here are the results of the commands :

~ sudo ls -l /usr/sbin/dnsmasq
lrwxrwxrwx 1 root root 19 sept. 23 10:58 /usr/sbin/dnsmasq -> /usr/bin/pihole-FTL

~ sudo systemctl status dnsmasq
● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated)
   Active: active (exited) since Sun 2021-11-28 12:42:57 CET; 1 day 1h ago
     Docs: man:systemd-sysv-generator(8)
  Process: 25114 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

nov. 28 12:42:57 monserveur.fr systemd[1]: Starting LSB: pihole-FTL daemon...
nov. 28 12:42:57 monserveur.fr pihole-FTL[25114]: Not running
nov. 28 12:42:57 monserveur.fr pihole-FTL[25114]: chmod: impossible d'accéder à '/etc/pihole/macvendor.db': Aucun fichier ou dossier de ce type
nov. 28 12:42:57 monserveur.fr su[25124]: (to pihole) root on none
nov. 28 12:42:57 monserveur.fr su[25124]: pam_unix(su:session): session opened for user pihole by (uid=0)
nov. 28 12:42:57 monserveur.fr pihole-FTL[25114]: FTL started!
nov. 28 12:42:57 monserveur.fr su[25124]: pam_unix(su:session): session closed for user pihole
nov. 28 12:42:57 monserveur.fr systemd[1]: Started LSB: pihole-FTL daemon.

~ sudo systemctl status pihole-FTL
● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated)
   Active: active (exited) since Sun 2021-11-28 12:42:57 CET; 1 day 1h ago
     Docs: man:systemd-sysv-generator(8)
  Process: 25114 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

nov. 28 12:42:57 monserveur.fr systemd[1]: Starting LSB: pihole-FTL daemon...
nov. 28 12:42:57 monserveur.fr pihole-FTL[25114]: Not running
nov. 28 12:42:57 monserveur.fr pihole-FTL[25114]: chmod: impossible d'accéder à '/etc/pihole/macvendor.db': Aucun fichier ou dossier de ce type
nov. 28 12:42:57 monserveur.fr su[25124]: (to pihole) root on none
nov. 28 12:42:57 monserveur.fr su[25124]: pam_unix(su:session): session opened for user pihole by (uid=0)
nov. 28 12:42:57 monserveur.fr pihole-FTL[25114]: FTL started!
nov. 28 12:42:57 monserveur.fr su[25124]: pam_unix(su:session): session closed for user pihole
nov. 28 12:42:57 monserveur.fr systemd[1]: Started LSB: pihole-FTL daemon.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.