Linux - Server This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
04-22-2011, 01:16 PM
|
#1
|
Member
Registered: Jun 2007
Distribution: Ubuntu
Posts: 90
Rep:
|
cfengine looking for a host that does not exist
Hello,
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.
|
|
|
04-25-2011, 03:15 AM
|
#2
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
".local" is used by avahi for the mdns service. How is strawberry listing in the cfengine config files. Is it listed in /etc/hosts?
What is the hosts: line in /etc/nsswitch?
|
|
|
04-25-2011, 07:14 AM
|
#3
|
Member
Registered: Jun 2007
Distribution: Ubuntu
Posts: 90
Original Poster
Rep:
|
Quote:
How is strawberry listing in the cfengine config files.
|
It is listed in /etc/cfengine/cfrun.hosts as: strawberry.at.our-domain.de
Quote:
Is it listed in /etc/hosts?
|
No, it is not listed on the server side's /etc/hosts.
Quote:
What is the hosts: line in /etc/nsswitch?
|
This is how it looks on strawberry:
Code:
hosts: files dns mdns
This is how it looks on the server side:
Does it mean that I should change that line on strawberry with dns being first?
|
|
|
04-26-2011, 02:38 AM
|
#4
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
The hosts: entry looks ok. Both should be tried.
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.
Last edited by jschiwal; 04-26-2011 at 02:40 AM.
|
|
|
04-26-2011, 04:35 AM
|
#5
|
Senior Member
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339
|
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.
|
|
|
04-26-2011, 06:48 PM
|
#6
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
04-27-2011, 08:04 AM
|
#7
|
Member
Registered: Jun 2007
Distribution: Ubuntu
Posts: 90
Original Poster
Rep:
|
Quote:
Originally Posted by jschiwal
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
and no further "strawberry.local" messages were received.
Thanks for helping out.
|
|
|
04-27-2011, 06:52 PM
|
#8
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
All times are GMT -5. The time now is 07:18 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|