ROSbot2 Pro - dnsmasq service error on apt upgrade

When calling $sudo apt upgrade to upgrade packages on our ROSbot2 pro the process completes but there was an error during. This relates to the dnsmasq service.
I don’t know if this service should be running correctly or not. The ROSbot seems to be working okay, but I| am concerned there may be an issue we need to resolve.
Checking the service as follows we get:

husarion@cseerosbot9:~$ systemctl status dnsmasq.service
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
     Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2021-09-14 15:50:42 BST; 43s ago
    Process: 568 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
    Process: 579 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=2)

Sep 14 15:50:41 cseerosbot9 systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Sep 14 15:50:41 cseerosbot9 dnsmasq[568]: dnsmasq: syntax check OK.
Sep 14 15:50:42 cseerosbot9 dnsmasq[579]: dnsmasq: failed to create listening socket for port 53: Address already in use
Sep 14 15:50:42 cseerosbot9 dnsmasq[579]: failed to create listening socket for port 53: Address already in use
Sep 14 15:50:42 cseerosbot9 dnsmasq[579]: FAILED to start up
Sep 14 15:50:42 cseerosbot9 systemd[1]: dnsmasq.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
Sep 14 15:50:42 cseerosbot9 systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
Sep 14 15:50:42 cseerosbot9 systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.

Any guidance will be gratefully received, thank you.

Regards,
Jon.

Hi Jon,
Thanks for logs it makes my work easier :slight_smile: . As in logs is written probably you have some other service listening on port that dnsmasq need to start service so please check with sudo ss -lp "sport = :domain what’s listening on port 53 and disable any services that are running on this port. You can also mask it with sudo systemctl mask <service> to prevent it to auto start (It is probably systemd-resolved).

Best regards,
Karol Konkol
Husarion Team

Hi,

Thank you for your reply. Sadly, I cannot see another service listening on port 53.
I installed Husarion image (ROS Noetic Ubuntu 20) without any additional changes, and I see that dnsmasq service has failed to start also. My conclusion is that this issue is present on the Husarion image and is not caused by other changes we have made.

Please advise what to do. The robot appears to be working okay despite this issue. May be you can release a new image with this issue fixed?

Thank you and kind regards,
Jon.

Hi Jon,
I encountered the same problem while sudo apt upgrade but after this command: sudo ss -lp "sport = :domain" the output was two line long and in process column I had “systemd-resolved”.
I used this commands to fix it:
sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved.service
sudo systemctl restart dnsmasq.service
You can also change port number in /etc/dnsmasq.conf if you don’t want to disable systemd-resolved.

Best regards
Karol Konkol
Husarion Team