Created 04-04-2024 07:12 AM
Good morning Community,
i'm suffering of DNS resolution getting the following fatalistic view every time I access to CM:
I'm reading a lot but not getting any robust conclussion of what is the test that concludes in "DNS resolution error".
it checks "host's hostname and canonical name" but, what does it means? is it the hostname? the name in the /etc/hosts?
In my case, having
[root@master1 ~]# hostname
master1
[root@master1 ~]# python -c "import socket; print socket.getfqdn(); print socket.gethostbyname(socket.getfqdn())"
master1.domain.net
192.168.0.90
does it means the discrepancy between hostname and socket.getfqdn()?
I can see how many people is getting this error but not a consistent response, could anyone give the solution here? for trying to understand this common issue?
Many thanks in advance.
Created 04-06-2024 10:25 PM
Hello @Juanes
Thank you for reaching out on this
Can you please confirm what OS version are you using?
Check the output of the following command and see if hostname is the correct one
# hostname -f
If hostname -f is not returning the complete FQDN then please set the FQDN correct and restart the cloudera-scm-agent and you should be good
You might want to check the below discussion
Created 04-07-2024 10:23 AM
Hello all,
Finally found the root cause...
/Etc/hosts
192.168.0.10 master1.customerdomain.com
# Hostname
Master1
This is the discrepancy, setting the hostname to the same as shown in /etc/hosts, the issue was solved.
Command used: # hostnamectl set-hostname master1.customerdomain.com
Then restarted the agent daemon and services in the cluster.
Many thanks to the community for so many clues.
Created 04-06-2024 10:25 PM
Hello @Juanes
Thank you for reaching out on this
Can you please confirm what OS version are you using?
Check the output of the following command and see if hostname is the correct one
# hostname -f
If hostname -f is not returning the complete FQDN then please set the FQDN correct and restart the cloudera-scm-agent and you should be good
You might want to check the below discussion
Created 04-07-2024 08:37 AM
Hello,
It seems the hostname is not enough, the hostname -f is showing the full name wth fqdn, will continue investigating, tanks
Created 04-07-2024 02:40 AM
Hi, @Juanes this might also be coming from the DNS side, check the agent logs for any DNS test failures and try to do nslookup from another node to this node IP address and then HQDN and check whether the DNS server is resolving the hostname and IP address correctly or not.
as @upadhyayk04 suggested try the #hostname -f or #hostnamectl commands to get the correct FQDN.
# nslookup <IP-address>/FQDN - if this is not resolving correctly then you may need to check the DNS server whats happening.
Created 04-07-2024 09:16 AM
Hello, im using rhel8.4 but still the same.
The etc/sysconfig/network file is empty but the network still working, im using the etc/hosts wth ips, fqdn and aliases.
The nslookup is not working, do i must to have a dns server?? I mean, in a local network configuring etc/hosts don't thik so...
Anybody knows how this works and what is the exact commands used for this test? This shouldn't be so difficult, I've read the topics and followed the recommendations but nothing.
Many thanks for your help
Created 04-07-2024 10:23 AM
Hello all,
Finally found the root cause...
/Etc/hosts
192.168.0.10 master1.customerdomain.com
# Hostname
Master1
This is the discrepancy, setting the hostname to the same as shown in /etc/hosts, the issue was solved.
Command used: # hostnamectl set-hostname master1.customerdomain.com
Then restarted the agent daemon and services in the cluster.
Many thanks to the community for so many clues.
Created 04-07-2024 09:30 AM
Hello,
Thank you for your update
Can you please elaborate more on nslookup not working? Do you mean nslookup command is not available or the command is not returning any output?
There is no mandate to have an external DNS server, the entries in /etc/hosts should be enough. What about hostname -f is it working?