/var/cpanel/dnsadmin/sock is still not a local socket after trying to restart dnsadmin error fix

Today noticed, one of our server DNS editor extremely slow, and can not add Addon domain in the cPanel interface. The error log contanin the following rows:

/var/cpanel/dnsadmin/sock is still not a local socket after trying to restart dnsadmin

To fix run this command:

ps x | grep '/usr/local/cpanel/scripts/restartsrv_dnsadmin' | grep -v grep | awk '{print $1}' | xargs --no-run-if-empty kill -9