How to remove dnsmasq

I have been using Bind for years with no trouble until this morning. This morning I find nothing is able to resolve outside addresses, a check of the server shows that named is not running.
systemctl status named
● named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2020-08-29 09:45:08 UTC; 3h 35min ago
Main PID: 1844 (code=exited, status=0/SUCCESS)

Aug 29 09:45:08 *************************** named[16673]: binding TCP socket: address in use
Aug 29 09:45:08 *************************** named[16673]: listening on IPv4 interface eth0, 192.168.0.7#53
Aug 29 09:45:08 *************************** named[16673]: binding TCP socket: address in use
Aug 29 09:45:08 *************************** named[16673]: unable to listen on any configured interfaces
Aug 29 09:45:08 *************************** named[16673]: loading configuration: failure
Aug 29 09:45:08 *************************** named[16673]: exiting (due to fatal error)
Aug 29 09:45:08 *************************** systemd[1]: named.service: control process exited, code=exited status=1
Aug 29 09:45:08 *************************** systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Aug 29 09:45:08 *************************** systemd[1]: Unit named.service entered failed state.
Aug 29 09:45:08 *************************** systemd[1]: named.service failed.

When I attempt to restart I find the port is in use, and that it is in use by dnsmasq. This tells me that the system update installed a service I can’t use and stopped a service I require and then started a service that was not configured correctly (dnsmasq) resulting in the network being unable to resolve outside addresses.

How do I remove dnsmasq safely and prevent it from being installed in future updates or is this going to be another ongoing battle like nodejs? (ps. fixed nodejs by replacing the executables with blank files and setting the permissions to 000 now I no longer have 100% cpu usage for hours on end)

What does “yum remove dnsmasq“ get you?

Then systemctl enable named?

move into /etc/rc3.d, changed the S49dnsmasq to K49dnsmasq, mv S49dnsmasq K49dnsmasq, after that, when you restart, it won’t. The S start, the K kill.

When we build servers it’s not unusual for us to load a service, using 2 or 3 similar softwares, then disable the ones we don’t need. The others are there, just in case the s hits the fan down the road, and updates are no longer available.

1 Like

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