Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle Listener cannot understand hostname

Praveen Bezawada
Respected Contributor

Oracle Listener cannot understand hostname

Hi
In the listener.ora, if the hostname is used the listener is failing to get started, whereas if we use the IP address of the machine it is working fine.
Also getip `hostname` does not give any output when executed as oracle user.
Is there any problem with machine hostname configuration. Everything seems to be fine with /etc/hosts and /etc/rc.config.d/netconf
Are we missing something.
Br
Praveen
6 REPLIES
A. Clay Stephenson
Acclaimed Contributor

Re: Oracle Listener cannot understand hostname

Hi Praveen,

If getip will not work then you definitely have a problem with hostname resolution. When you say that user getip fails as user oracle does that mean that it does work with other users? Don't just try it as root; also try as another regular users. We're looking for permission problems.

Check the permissions on /etc/hosts (should be 644 owned by root). If you are running DNS,
check both the contents and permissions of /etc/resolv.conf and test with nslookup.
If you are running NIS, make sure that ypcat hosts works. Also, check /etc/nsswitch.conf and make sure that it is set correctly.

One of these should point you in the right direction.

Clay
If it ain't broke, I can fix that.
Uday_S_Ankolekar
Honored Contributor

Re: Oracle Listener cannot understand hostname

Praveen,

Check these things
1. /etc/nsswitch.conf ( Check fr hosts entry weather it's looks for DNS the local file.)
2.Check resolv.conf in /etc
3. Try running with nslookup whether it resolves the address with IP or by name

It seems this is a DNS issue here.

..USA..
Good Luck..
Wodisch
Honored Contributor

Re: Oracle Listener cannot understand hostname

Hello Praveen,

have you checked the permissions of your "/etc/hosts",
"/etc/resolv.conf", and "/etc/nsswitch.conf"?
Your problems will occur if only root has read permissions
there...

HTH,
Wodisch
vikrantl
Advisor

Re: Oracle Listener cannot understand hostname

This syntax might help.
cat /etc/nsswitch.conf

hosts: files [NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]

OR
Check traceroute hostname
and correct any router settings.
vikrantl
Praveen Bezawada
Respected Contributor

Re: Oracle Listener cannot understand hostname

in nsswitch.conf the configuration for hosts is

hosts: files [NOTFOUND=continue] dns

and /etc/hosts has 444 bin:bin ...
this seems to be OK...???
Praveen Bezawada
Respected Contributor

Re: Oracle Listener cannot understand hostname

HI
I had missed out nsswitch.conf, the permissions were not set right.
Now everything is working fine. Thanks everyone.