- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Problem after hostname change
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2002 07:03 PM
04-22-2002 07:03 PM
Problem after hostname change
After changing the hostname of the machine (HP-UX11.0), there is an error in /etc/rc.log after reboot.
Configuring all unconfigured software filesets
Output from "/sbin/rc2.d/S120swconfig start":
----------------------------
* Turning off all network based resolving services in
'/etc/nsswitch.conf'
* Setting up temporary hostname in '/etc/hosts'
ERROR: Cannot contact the 'swagentd' daemon because the local hostname
'DNS02' cannot be resolved, therefore no 'swconfig' or 'swremove'
will be executed at this time. The most likely solution is to define
'DNS02' in '/etc/hosts'.
* Restoring '/etc/hosts' to its original contents.
* Removing the temporary '/etc/nsswitch.conf'.
"/sbin/rc2.d/S120swconfig start" FAILED
I changed the hostname in /etc/rc.config.d/netconf, /etc/hosts and all my DNS files, nslookup
Thanks for your help!
Victoria
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2002 07:05 PM
04-22-2002 07:05 PM
Re: Problem after hostname change
To make a thorough change, you should use
# set_parms hostname
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2002 07:09 PM
04-22-2002 07:09 PM
Re: Problem after hostname change
Try to utilise the 'set_parms' script.
# set_parms 'hostname' (without quotes)
There is also a man page for this command. The command is basically a script that calls other binary commands.
HTH
~Michael~
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2002 07:37 PM
04-22-2002 07:37 PM
Re: Problem after hostname change
# cd /var/adm/sw
# mv security security.old
# mkdir security
==>make sure the permission and ownership is the same as the previous "security" directory.
# /sbin/init.d/net stop
# /sbin/init.d/swagentd stop
# /sbin/init.d/net start
# /sbin/init.d/swagentd start
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2002 07:46 PM
04-22-2002 07:46 PM
Re: Problem after hostname change
The command "set_parms hostname" automatically changes your default_realm (hostname settings) in /var/adm/sw/security.
A reboot which is prompted by set_parms is usually the tidiest way to update the change.
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 10:11 PM
04-23-2002 10:11 PM
Re: Problem after hostname change
Thanks for all the information, I have tried using "set_parms", swagentd stop and start, but everytime I give the command "/sbin/init.d/swconfig start" or reboot, there is still the same problem! :(
I am running BIND in the machine, without any /etc/nsswitch.conf files, and I have put the hostname in /etc/hosts already. What else did I miss?
Victoria
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 10:37 PM
04-23-2002 10:37 PM
Re: Problem after hostname change
Can you do the following
======================
# set_parms hostname
# vi /etc/rc.config.d/netconf
Check for the HOSTNAME variable .
if it is right do one more thing.
# vi /sbin/init.d/hostname
insert the following line in seconf or third line
HOSTNAME="newhostname"
# /sbin/init.d/hostname stop
# /sbin/init.d/hostname start
==============================
-Niraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 10:42 PM
04-23-2002 10:42 PM
Re: Problem after hostname change
1) /etc/hosts
==> Make sure a fully qualify hostname is entered, for example
145.120.14.14 mickey.domain.com mickey
2) /etc/rc.config.d
==> The var HOSTNAME must match "uname -a" command output.
3) /etc/nsswitch.conf
==> You mentioned you did nt use this file. If 1&2 does not work for you, lets create this file and the entry should look like ..
hosts: files [NOTFOND=continue] dns
OR
hosts: dns [NOTFOUND=continue] files
That's all I can think of for now ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 10:52 PM
04-23-2002 10:52 PM
Re: Problem after hostname change
If you are using DNS server for name resolution then make sure that the new host name entry is there in dns database.
Otherwise remove /etc/resolv.conf and /etc/nsswitch.conf then try.
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 01:16 AM
04-24-2002 01:16 AM
Re: Problem after hostname change
Thank you very much. But I'm still having problems :(
When I remove /etc/resolv.conf, run /sbin/init.d/named stop, and /etc/nsswitch.conf looks like "hosts: files", I do a nslookup
It seems that nslookup does not look up the names in the hosts files!
I have tried to remove nsswitch.conf as well but it is the same.
What could be the problem?
Victoria
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 01:36 AM
04-24-2002 01:36 AM
Re: Problem after hostname change
# nslookup -swtrace
to really find out how nslookup searches for its info. That way you know where the hiccup is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 02:09 AM
04-24-2002 02:09 AM
Re: Problem after hostname change
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 02:36 AM
04-24-2002 02:36 AM
Re: Problem after hostname change
I know that this was said before... To me it looks like realm and default_realms are not correct. What is the default_realm in /var/adm/sw/security/_OWNER and _ACL file? Have you checked all the files on /var/adm/sw/security if they have correct hostname entry?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 02:56 AM
04-24-2002 02:56 AM
Re: Problem after hostname change
I have checked all the files in /var/adm/sw/security/... the realm and default_realm is correct.
Strange! "nslookup -swtrace" didn't work, it said "invalid option".
Actually, I have 2 servers, and both of them have the same problem after changing the hostname... :(
All "swlist", "swinstall" work, why only "swconfig" has errors???
Victoria
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 03:01 AM
04-24-2002 03:01 AM
Re: Problem after hostname change
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 06:17 PM
04-24-2002 06:17 PM
Re: Problem after hostname change
"/usr/sbin/swconfig \*" is ok without any errors.
Only "/sbin/init.d/swconfig start" has errors. I think when startup, it runs "/sbin/init.d/swconfig start".
I really thank you very much for all your help.... although the problem is not solved yet!
Victoria
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 07:02 PM
04-24-2002 07:02 PM
Re: Problem after hostname change
Can you show us the contents of the startup script /sbin/init.d/swconfig?
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2002 02:22 AM
04-25-2002 02:22 AM
Re: Problem after hostname change
Please find attached the /sbin/init.d/swconfig file. I think that there is a process called "hack_hostname" which causes the error.
Thanks again.
Victoria
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2002 02:31 AM
04-25-2002 02:31 AM
Re: Problem after hostname change
What is the output for the following:
# /usr/bin/nslookup `/usr/bin/hostname`
# nslookup
> policy
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2002 07:00 PM
04-25-2002 07:00 PM
Re: Problem after hostname change
/usr/bin/nslookup `/usr/bin/hostname` works when '/etc/resolv.conf' exists, but not works if the file does not exist.
In resolv.conf, I have put in a DNS. So when startup, this server is not yet ready to connect to the DNS. So it returns error in nslookup.
The problem is why the '/etc/nsswitch.conf' does not work. Maybe I am using an old version of nslookup? It seems that I don't have any option like "policy", "reset", "swtrace" in nslookup...
Please find attached a printout....
Victoria