Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
We have a client host under cfengine called strawberry, and it is not the only client for cfengine. Everything was running smooth, before one day I started to receive the following message:
Quote:
System Events
=-=-=-=-=-=-=
Apr 22 20:00:36 cook cfservd[21704]: Unable to lookup hostname (strawberry.local) or cfengine service: Name or service not known
It is now looking for a "host.local", that is strawberry.local.
The message is exactly the same in the /var/log/syslog. I cannot remember if and what modifications into config files or into the networking setup I introduced, but I dug through all config files I could think of and compare the network setup of strawberry to other clients, but could not find the problem. Does anyone have an idea of how should I proceed to establish the source of the ".local" addition?
I can execute 'cfrun' on te server side and there are no complaints about strawberry.
I can also execute 'cfagent -q -K' on the client side.
Last edited by brownflamigo1; 04-22-2011 at 01:25 PM.
Make sure you have the libraries, libnss_files and libnss_dns in /lib/ or /lib64/.
Does "getent hosts strawberry.at.our-domain.de" return an IP address?
Check if the strawberry host is listed in the dns server.
I'm assuming that you use cfengine to configure a number of hosts and strawberry is the only one with a problem. I think that cfengine couldn't resolve the hostname and tried hostname.local as a fall back, to use Zeroconf. You don't use mdns (zeroconf) so this failed. I think the real problem is why it didn't resolve normally before strawberry.local was tried.
If other hosts not in /etc/hosts resolve OK, then the problem may be elsewhere and not on the server. You could add strawberry to /etc/hosts in the meantime so cfengine updates it.
It maybe completely unrelated: is there an entry 127.0.0.2 in /etc/hosts for the system - I hit a similar effect with GridEngine as this entry was suddenly added to /etc/hosts until I removed it again.
Using "find" one could search for altered config files in /etc/ or for cf-engine dated between when there wasn't a problem, and when it started, according to the logs.
Using "find" one could search for altered config files in /etc/ or for cf-engine dated between when there wasn't a problem, and when it started, according to the logs.
Thank you. Will do that now.
Meanwhile, I modified the following line on the client side from
Code:
hosts: files dns mdns
to
Code:
hosts: dns files
and no further "strawberry.local" messages were received.
In the past, I had noted that I could find a local host on my LAN, not in /etc/hosts, by adding .local, but when I just tried it yesterday it didn't work. Reading the manpage for avahi_dns or msdns, it says that it only uses the link local (zeroconf) address range, so you would never use it anyway. Removing msdns or msdns_minimal from nsswitch.conf won't do any harm. Only hosts on the LAN that don't use DHCP or have an IP address configured would have such IP address.
If the strawberry host is being configured by cfengine, I think you got it licked.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.