LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-22-2011, 01:16 PM   #1
brownflamigo1
Member
 
Registered: Jun 2007
Distribution: Ubuntu
Posts: 90

Rep: Reputation: 15
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.
 
Old 04-25-2011, 03:15 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
".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?
 
Old 04-25-2011, 07:14 AM   #3
brownflamigo1
Member
 
Registered: Jun 2007
Distribution: Ubuntu
Posts: 90

Original Poster
Rep: Reputation: 15
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:
Code:
hosts:          files dns
Does it mean that I should change that line on strawberry with dns being first?
 
Old 04-26-2011, 02:38 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 04-26-2011, 04:35 AM   #5
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
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.
 
Old 04-26-2011, 06:48 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 04-27-2011, 08:04 AM   #7
brownflamigo1
Member
 
Registered: Jun 2007
Distribution: Ubuntu
Posts: 90

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jschiwal View Post
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.

Thanks for helping out.
 
Old 04-27-2011, 06:52 PM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Table 'mysql.host' doesn't exist Zac2003 *BSD 7 02-20-2019 09:35 AM
cfengine tunneling lancherider Linux - General 0 04-06-2009 03:05 PM
Configure sudoers with cfengine glowe Linux - Software 2 06-22-2008 03:26 PM
Gentlemen, Start your Cfengine jeremy LQ Articles Discussion 0 04-04-2008 01:04 PM
mysql error (mysql.host doesn't exist) serverul Linux - Server 1 09-07-2007 01:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration