1847694 Members
6246 Online
110265 Solutions
New Discussion

RC.LOG FILE ERROR

 
SOLVED
Go to solution
Joseph A. Starkey
Occasional Advisor

RC.LOG FILE ERROR

Hello All,

I am getting errors in my rc.log file upon startup of the system, which is an HP-UX 11 on a k580 with 4 240 mhz processors and 2 gig of ram. All patches are up to date and I am able to ping the host and nslookup comes back correctly. I am also able to start these agents manually. Does anyone have any Ideas of how I can get this corrected and not have the errors in the log rc.log file?


Start Software Distributor agent daemon
Output from "/sbin/rc2.d/S100swagentd start":
----------------------------
ERROR: The 'swagentd' daemon started but the local hostname 'mhzfast1' cannot be resolved, therefore no SD commands will be able to contact it. The most likely solution is to define 'mhzfast1' in '/etc/hosts'.
"/sbin/rc2.d/S100swagentd start" FAILED

Configuring all unconfigured software filesets
Output from "/sbin/rc2.d/S120swconfig start":
----------------------------
ERROR: Cannot contact the 'swagentd' daemon because the local hostname 'mhzfast1' cannot be resolved, therefore no 'swconfig' or 'swremove' will be executed at this time'
The most likely solution is to define 'mhzfast1'in '/etc/hosts'.
"/sbin/rc2.d/S120swconfig start" FAILED
17 REPLIES 17
PVR
Valued Contributor

Re: RC.LOG FILE ERROR

Hope localhost entry is there in /etc/hosts.

have u changed the hostname recently?
Don't give up. Try till success...
Joseph A. Starkey
Occasional Advisor

Re: RC.LOG FILE ERROR

Yes the local host entry is in the /etc/hosts file. The host name has not changed.
Stefan Farrelly
Honored Contributor
Solution

Re: RC.LOG FILE ERROR

I think this is because swagent can start BEFORE things like lan cards or fibre drivers are loaded, so it cant resolve your hostname in dns. To get around this you should have an entry in your /etc/hosts file for your host, with its IP, and in /etc/nsswitch.conf the dns line should look like this;

hosts: files [NOTFOUND=continue] dns

This should fix your errors.

Im from Palmerston North, New Zealand, but somehow ended up in London...
doug mielke
Respected Contributor

Re: RC.LOG FILE ERROR

try nslookup mhzfast1

If you post the results, we can tell you right where to go.

/etc/hosts od nsswitch, for instance.
Bernhard Mueller
Honored Contributor

Re: RC.LOG FILE ERROR

Joseph,

your /etc/hosts should also have a line stating:

127.0.0.1 localhost loopback

Regards,
Bernhard
Joseph A. Starkey
Occasional Advisor

Re: RC.LOG FILE ERROR

I have my loopback and ip for loopback in the hosts file as well as the hostname and ip address as well.

If I buid an nsswitch.conf file what would need to be in that I currently do not have one of those in the /etc directory.
doug mielke
Respected Contributor

Re: RC.LOG FILE ERROR

do you have /etc/resolv.conf? Maybe you're not using DNS all.

Then you'd only have to worry about /etc/hosts.
Joseph A. Starkey
Occasional Advisor

Re: RC.LOG FILE ERROR

I am using the resolv.conf file and there are DNS entries in the table so I am guessing it is starting up before the other items like stefan said and I need to somehow configure an nsswitch.conf file will I only need the one line entry in this file:

hosts: files [NOTFOUND=continue] dns

or is there more to it then just that one line?
Robert-Jan Goossens
Honored Contributor

Re: RC.LOG FILE ERROR

Hi Joseph,

There are examples in the /usr/newconfig/etc

# ls nsswitch.*
nsswitch.compat
nsswitch.hp_defaults
nsswitch.nisplus
nsswitch.files
nsswitch.nis

Hope this helps,
Robert-Jan.
Bernhard Mueller
Honored Contributor

Re: RC.LOG FILE ERROR

There are templates, e.g.
so make a copy
cp /etc/nsswitch.files /etc/nsswitch.conf
And edit the hosts line as per Stefan's reply.

Regards,
Bernhard
Stefan Farrelly
Honored Contributor

Re: RC.LOG FILE ERROR

Have a look in /usr/newconfig/etc for example of the nsswitch.conf file. We use this one;

#
# /etc/nsswitch.hp_defaults:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# uses NIS (YP) in conjunction with files.
#

passwd: files
group: files
hosts: files [NOTFOUND=continue] dns
automount: files
aliases: files

Im from Palmerston North, New Zealand, but somehow ended up in London...
Joseph A. Starkey
Occasional Advisor

Re: RC.LOG FILE ERROR

Once that file is in place and the line for hosts as been added do I then need to reboot the server in order to see if it fixed the problem?
Bernhard Mueller
Honored Contributor

Re: RC.LOG FILE ERROR

just run
swlist
see if it can "contact target" .... and list your sw

Regards,
Bernhard
Robert-Jan Goossens
Honored Contributor

Re: RC.LOG FILE ERROR

You can test it,

# /usr/sbin/swagentd -r
# swlist

Robert-Jan.

Joseph A. Starkey
Occasional Advisor

Re: RC.LOG FILE ERROR

Robert

When Itested it I go this error in the /var/adm/sw/swagentd.log file:

WARNING: Failure registering as Remote Procedure Call server using
protocol sequence "ncacn_ip_tcp" with endpoint "2121". The
endpoint you have specified is in use by another process.
Either another copy of the SD daemon is running or there is a
conflict in choice of endpoints with another application.
Endpoints are specified within square brackets [] in the
"rpc_binding_info=" option.
WARNING: Failure registering as Remote Procedure Call server using
protocol sequence "ncadg_ip_udp" with endpoint "2121". The
endpoint you have specified is in use by another process.
Either another copy of the SD daemon is running or there is a
conflict in choice of endpoints with another application.
Endpoints are specified within square brackets [] in the
"rpc_binding_info=" option.
ERROR: Terminating prematurely - cannot serve RPC requests with any
binding.

======= 11/13/03 15:51:54 WET END swagentd (pid = 8348, startup
error).
Stefan Farrelly
Honored Contributor

Re: RC.LOG FILE ERROR

shutdown swagent first;

/sbin/init.d/swagentd stop

and check its died;
ps -ef|grep -i swagent

If you still see an swagentd process running kill it, then restart it;

/sbin/init.d/swagentd start
Im from Palmerston North, New Zealand, but somehow ended up in London...
Scott Larocque_1
Occasional Advisor

Re: RC.LOG FILE ERROR

I just experienced the same problem and it turned out to be the nslookup version I had installed on the system.

When HPUX runs the /sbin/init.d/swagentd start, it uses nslookup to resolve the IP address of the host. The version of nslookup I had would never use the /etc/hosts file and always go to DNS, which is not running at that point in the boot process.

Verify that your nsswitch.conf has the
hosts: files [NOTFOUND=continue] dns

nslookup mhzfast1

If you do not see Using /etc/hosts, then your nslookup is probably the problem.