Operating System - HP-UX
1826424 Members
3366 Online
109692 Solutions
New Discussion

Re: swinstall not working unable to resolve correct IP

 
SOLVED
Go to solution
Adam Noble
Super Advisor

swinstall not working unable to resolve correct IP

Hi,

We have a server which has numerous aliases against lan0 i.e lan0:1, lan0:2. The problem I have is that when I invoke swinstall it attempts to connect to lan0:17 and just hangs. If I do an netstat -i that is the 1st IP referenced. I'm unsure how swinstall is determining which IP to use. How can I force it to use the servers main IP address on lan0

Cheers
7 REPLIES 7
Peter Godron
Honored Contributor

Re: swinstall not working unable to resolve correct IP

Adam,
what does your /etc/rc.config.d/netconf look like ?

Anything extra in:
/var/adm/sw/swinstall.log
/var/adm/sw/swagent.log

Ivan Krastev
Honored Contributor

Re: swinstall not working unable to resolve correct IP

Check also order of entries in /etc/hosts file. Maybe record for lan0:17 is before lan0.

regards,
ivan
Adam Noble
Super Advisor

Re: swinstall not working unable to resolve correct IP

Peter to be honest I don't need to look in the logs as I can see the issue. Swinstall is using the wrong IP address. My netconf file has the correct IP address. There is certainly no reference to the IP being used by swinstall which is on lan0:17
Bob E Campbell
Honored Contributor
Solution

Re: swinstall not working unable to resolve correct IP

When you run swinstall you are actually running two processes. On your screen you will interact directly with the "controller". The controller will call gethostbyname(3N) to find an IP address. At that IP address it causes an agent process to be started. As you might guess the agent then uses gethostbyaddr(3N) to return to an alias.

In your case both are on the same system. Try to run:

# nslookup $(hostname)

and use the IP returned:

# nslookup 192.168.1.1 (or whatever)

Did you get back to where you started?
jkumar
Advisor

Re: swinstall not working unable to resolve correct IP

Hi,

This problem is due to network issue,Chk for the /etc/hosts and if the entries are correct chk the DNS server name and try to resolve the name ,If it resolve swinstall should work properly.

Good luck.

jai...
Adam Noble
Super Advisor

Re: swinstall not working unable to resolve correct IP

Ok well its interesting because I thought the same as you Bob. There is an interesting point here however in that the actual hostname has an IP address which is an alias on the server. So for example the server name is server1 and its actually running on lan0:4. The nslookup works fine but I have never seen a scenario like this before where the hosts address is sitting on an alias.
Bob E Campbell
Honored Contributor

Re: swinstall not working unable to resolve correct IP

Well, I would start with checking for multiple entries in the hosts file. Remember that only one line should have the IP address with aliases trailing the hostname. Check nsswitch.conf to see if NIS might be getting in the way.

My money is on the DNS server. I don't get to play with that in my world, but the server should have a reverse mapping file for the IP address that is probably returning lan0:17.