Operating System - HP-UX
1821470 Members
2793 Online
109633 Solutions
New Discussion юеВ

Re: hostname: ping unknown host sa1

 
SOLVED
Go to solution
Manuales
Super Advisor

hostname: ping unknown host sa1

hi,,
i have 2 servers
server a
server b

if i do a ping from server a to b is respondig o.k but if i do a ping from server b to a not tresponding ...

why?

i already verified hosts file and is o.k

Thanks, Manuales.
12 REPLIES 12
Geoff Wild
Honored Contributor
Solution

Re: hostname: ping unknown host sa1

unknown host - dns resolver issue - what is in /etc/nsswitch.conf?

Should have something like:

hosts: files [NOTFOUND=CONTINUE] dns

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Manuales
Super Advisor

Re: hostname: ping unknown host sa1


Hi:
not exist etc/nsswitch.conf

must i create it?

Thanks, Manuales.
Geoff Wild
Honored Contributor

Re: hostname: ping unknown host sa1

Yes - you should have a template in:

cp /usr/newconfig/etc/nsswitch.files /etc/nsswitch.conf

then vi it and add the DNS part from above...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Manuales
Super Advisor

Re: hostname: ping unknown host sa1


i already create nsswitch on /etc folder in server A and server B

they are:
hosts: dns nis files
services: nis files
protocols: nis files
networks: nis files
rpc: nis files
netgroup: nis files


and now?
Geoff Wild
Honored Contributor

Re: hostname: ping unknown host sa1

on server b:

nslookup servera

If it resolves, try your ping.

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Raj D.
Honored Contributor

Re: hostname: ping unknown host sa1

Hi Manuales ,

A standard /etc/nsswitch.conf looks like following:

aliases: files [NOTFOUND=return UNAVAIL=continue]
automount: files [NOTFOUND=return UNAVAIL=continue]
group: files [NOTFOUND=return UNAVAIL=continue]
hosts: files [NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]
netgroup: files [NOTFOUND=return UNAVAIL=continue]
networks: files [NOTFOUND=return UNAVAIL=continue]
passwd: files [NOTFOUND=return UNAVAIL=continue]
protocols: files [NOTFOUND=return UNAVAIL=continue]
publickey: files[NOTFOUND=return UNAVAIL=continue]
rpc: files [NOTFOUND=return UNAVAIL=continue]
services: files [NOTFOUND=return UNAVAIL=continue]
-----------------------------------------
Check for ping after you check both the files /etc/nsswitch.conf and /etc/resolv.conf.

Also check /etc/hosts file of server B , to make sure hostname and IP mentioned correctly.

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Manuales
Super Advisor

Re: hostname: ping unknown host sa1

Hi !!
thanks, now i can execute correctly ping command with new nsswitch.conf

Now this problem was because when i wanted
to mount a NFS (filesystem from another server)i had problem about hostname with /etc/hosts.

look next:

server a has a filesystem /usr/user1
server b nedds see filesystem /usr/user1 from server a, this is with NFS, i had configured nfs in server a and server b but when i tryied to mount NFS filesystem from server a can not mout it

this is the message:

sa1:/sbin/init.d->./nfs.core start
starting NFS CORE networking

starting up the portmapper
/usr/sbin/portmap
sa1:/sbin/init.d->./nfs.client start
starting NFS CLIENT networking

starting up the portmapper
portmap already started, using pid: 22815
starting up the BIO daemons
/usr/sbin/biod 4
Reading in /etc/exports
starting up the Status Monitor daemon
rpc.statd already started, using pid: 1102
starting up the Lock Manager daemon
rpc.lockd already started, using pid: 1108
starting up the Automount daemon
/usr/sbin/automount -f /etc/auto_master
mounting remote NFS file systems ...
sa1:: RPC_PROG_NOT_REGISTERED

FAILURE CODE: 1
Mount failed! Possible local filesystem mount.
If local filesystem, then nfs.server will mount it.

Why is happening this??

Thanks, Manuales.
Manuales
Super Advisor

Re: hostname: ping unknown host sa1

help please !!!

Manuales.
Geoff Wild
Honored Contributor

Re: hostname: ping unknown host sa1

Is nfs running on both servers?

You should start in this order (reverse to stop):

nfs.core start
nfs.server start
nfs.client start

Also check /etc/rc.config.d/nfsconf

Server should be set to 1

Also - you are trying to automount - what is in /etc/auto_master and auto.direct?

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: hostname: ping unknown host sa1

Here's a good doc on configuring NFS:

http://docs.hp.com/en/5991-1154/ch02.html

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Raj D.
Honored Contributor

Re: hostname: ping unknown host sa1

Hi Manuales ,

In short , you have to put the filesystem that you are sharing on /etc/exports and do # exportfs -a

And mount it on the other server , using :

# mkdir /mount_point

# mount
exportsever_name:/filesystem /mount_pont


Also check /etc/rc.config.d/nfsconf
and check this:

NFS_CLIENT=1
AUTOMOUNT=1
START_MOUNTD=1
AUTOFS=1
--------------


Cheers ,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Chan 007
Honored Contributor

Re: hostname: ping unknown host sa1

Add to the NFS server's /etc/exports the mount point your are Exporting.

Run exportfs -a

Check that your NFS is running on the target system

Mount the source_server:/ to your local directory...

007