vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| BismillahirRehmanirRahim Hi Admins, i am facing a strange problem in one of our SunFire v215 Servers. the ping to the hostname of the Server and ping to the hostname of any other server in /etc/hosts fail. but if you ping with IP_Adress it get success. i.e. hostname=mytest ; IP=10.54.23.1 , hostname2=mydev ; IP2=10.54.23.2 ping mytest [ failed ] ping 10.54.23.1 [success] ping mydev [ failed ] ping 10.54.23.2 [ success] I dont know why its unable to resolve hostname from /etc/hosts. i didnt find any error in /var/adm/messages its very urgent, hope to hear soon from you. Your Junior Salman |
| |||
| Salman wrote: > BismillahirRehmanirRahim > > Hi Admins, > > i am facing a strange problem in one of our SunFire v215 Servers. > > the ping to the hostname of the Server and ping to the hostname of any > other server in /etc/hosts fail. > > but if you ping with IP_Adress it get success. i.e. > > hostname=mytest ; IP=10.54.23.1 , hostname2=mydev ; IP2=10.54.23.2 What is this supposed to do? > > ping mytest > [ failed ] > > ping 10.54.23.1 > [success] > > ping mydev > [ failed ] > > ping 10.54.23.2 > [ success] > > I dont know why its unable to resolve hostname from /etc/hosts. > > i didnt find any error in /var/adm/messages > > its very urgent, hope to hear soon from you. > > Your Junior > Salman > How about posting the contents of /etc/hosts? Also, check /etc/nsswitch.conf. Does it have "hosts files" or "hosts files,dns"? |
| |||
| Well I am getting a bit long in the tooth (Solaris 7) but it sounds like you might have an error in /etc/nsswitch.conf Do you have a line which says: hosts: files dns ....etc? If this is the case, the system should check the hosts file for name resolution first. If the "files" bit is missing, it won't check it. Les. "Salman" <hudamuslim@gmail.com> wrote in message news:1185993436.721496.85810@q75g2000hsh.googlegro ups.com... > BismillahirRehmanirRahim > > Hi Admins, > > i am facing a strange problem in one of our SunFire v215 Servers. > > the ping to the hostname of the Server and ping to the hostname of any > other server in /etc/hosts fail. > > but if you ping with IP_Adress it get success. i.e. > > hostname=mytest ; IP=10.54.23.1 , hostname2=mydev ; IP2=10.54.23.2 > > ping mytest > [ failed ] > > ping 10.54.23.1 > [success] > > ping mydev > [ failed ] > > ping 10.54.23.2 > [ success] > > I dont know why its unable to resolve hostname from /etc/hosts. > > i didnt find any error in /var/adm/messages > > its very urgent, hope to hear soon from you. > > Your Junior > Salman > |
| |||
| On Aug 1, 7:37 pm, Salman <hudamus...@gmail.com> wrote: > BismillahirRehmanirRahim > > Hi Admins, > > i am facing a strange problem in one of our SunFire v215 Servers. > > the ping to the hostname of the Server and ping to the hostname of any > other server in /etc/hosts fail. What does getent hosts hostname print for one of the hosts of interest? If it does not print the IP address then you have a name resolution problem. Look at /etc/ nsswitch.conf to see what it is. |
| |||
| BismillahirRehmanirRahim Hi Admins, Thanks for prompt replies. I dont have access to the Server now. but i am sure that the entries in /etc/nsswitch.conf will be hosts: files dns as default , i didnt change it. just wanted to know if anyone face such problem ever ? and how critical it is ? Your Junior Salman |
| |||
| On Wed, 01 Aug 2007 21:55:19 -0700, Salman wrote: > I dont have access to the Server now. but i am sure that the entries in > /etc/nsswitch.conf will be > > hosts: files dns > > as default , i didnt change it. That is not the default. Copy /etc/nsswitch.dns over /etc/nsswitch.conf to get what you need. Then ensure that your hosts files are populated and correct and that /etc/resolv.conf contains the correct nameserver entry. > just wanted to know if anyone face such problem ever ? Many times. > and how critical it is ? Depends on how critically you need to resolve names and addresses. |
| |||
| On Aug 2, 12:29 am, Dave Uhring <daveuhr...@yahoo.com> wrote: > On Wed, 01 Aug 2007 21:55:19 -0700, Salman wrote: > > I dont have access to the Server now. but i am sure that the entries in > > /etc/nsswitch.conf will be > > > hosts: files dns > > > as default , i didnt change it. > > That is not the default. Copy /etc/nsswitch.dns over /etc/nsswitch.conf > to get what you need. Then ensure that your hosts files are populated > and correct and that /etc/resolv.conf contains the correct nameserver > entry. > > > just wanted to know if anyone face such problem ever ? > > Many times. > > > and how critical it is ? > > Depends on how critically you need to resolve names and addresses. Also check your /etc/inet/ipnodes file. Usually I just cp /etc/hosts to /etc/inet/ipnodes since I am not using ip6. But Sol10 checks ipnodes first before hosts. That is stated in the nsswitch.conf file. |
| ||||
| BismillahirRehmanirRahim Hi All, Just wanted to update you all about the status of this problem. Alhumdolillaah, its working fine now. All i did is to add the /etc/inet/hosts files entries in /etc/inet/ ipnodes. previously ipnodes file was as below: ------------------------------------------------ [root@prod-01 /]# more /etc/inet/ipnodes # # Internet host table # ::1 localhost 127.0.0.1 localhost ------------------------------------------------ I checked the ipnodes of other SunFire Servers they are same as above. and they are able to ping other hosts mentioned in /etc/hosts using their hostname. So Still i am not sure what was the actual problem. The O/s is Solaris 9: SunOS prod-01 5.9 Generic_118558-28 The /etc/nsswitch.conf file is as follow: ------------------------------------------------------------------------------ # /etc/nsswitch.dns: # # An example file that could be copied over to /etc/nsswitch.conf; it uses # DNS for hosts lookups, otherwise it does not use any other naming service. # # "hosts:" and "services:" in this file are used only if the # /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports. passwd: files group: files # You must also set up the /etc/resolv.conf file for DNS name # server lookup. See resolv.conf(4). hosts: files dns ipnodes: files ----------------------------------------------------------------------------- The output of getent hosts host_name was okay. If anyone get some clue regarding this issue then let me know. Special thanks to Tinman for his post. Thanks for all who tried to help me out. i really appreciate them. Your Junior Admin Salman On Aug 3, 6:00 pm, tinman <adam.richa...@gmail.com> wrote: > On Aug 2, 12:29 am, Dave Uhring <daveuhr...@yahoo.com> wrote: > > > > > > > On Wed, 01 Aug 2007 21:55:19 -0700, Salman wrote: > > > I dont have access to the Server now. but i am sure that the entries in > > > /etc/nsswitch.conf will be > > > > hosts: files dns > > > > as default , i didnt change it. > > > That is not the default. Copy /etc/nsswitch.dns over /etc/nsswitch.conf > > to get what you need. Then ensure that your hosts files are populated > > and correct and that /etc/resolv.conf contains the correct nameserver > > entry. > > > > just wanted to know if anyone face such problem ever ? > > > Many times. > > > > and how critical it is ? > > > Depends on how critically you need to resolve names and addresses. > > Also check your /etc/inet/ipnodes file. Usually I just cp /etc/hosts > to /etc/inet/ipnodes since I am not using ip6. But Sol10 checks > ipnodes first before hosts. That is stated in the nsswitch.conf file.- Hide quoted text - > > - Show quoted text - |
| Thread Tools | |
| Display Modes | |
|
|