LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   nslookup returns "connection timed out" (https://www.linuxquestions.org/questions/linux-networking-3/nslookup-returns-connection-timed-out-860642/)

ahmedb72 02-04-2011 02:38 AM

nslookup returns "connection timed out"
 
Hi,

I am not so experienced with networking in Linux so you'd excuse me if my question looks silly.

I've successfully installed Red Hat Linux Enterprise 5.2 on a VMware host.

When I issued nslookup command, it returns "connection timed out" error as follows:

Code:

[root@rac1 ~]# time nslookup rac1
;; connection timed out; no servers could be reached

real    0m15.038s
user    0m0.000s
sys    0m0.000s

My questions are:
(1) is that error normal?
(2) is there a way to decrease the 15.038s value? rac1 is the local hostname, so why it takes all that time to resolve it.

Following info may help:
Code:

[root@rac1 ~]# hostname
rac1.mydomain.com
[root@rac1 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1      localhost.localdomain  localhost
#eth0 - PUBLIC
192.0.2.100    rac1.mydomain.com      rac1


[root@rac1 ~]# ping -c 4 rac1
PING rac1.mydomain.com (192.0.2.100) 56(84) bytes of data.
64 bytes from rac1.mydomain.com (192.0.2.100): icmp_seq=1 ttl=64 time=0.015 ms
64 bytes from rac1.mydomain.com (192.0.2.100): icmp_seq=2 ttl=64 time=0.029 ms
64 bytes from rac1.mydomain.com (192.0.2.100): icmp_seq=3 ttl=64 time=0.029 ms
64 bytes from rac1.mydomain.com (192.0.2.100): icmp_seq=4 ttl=64 time=0.029 ms

--- rac1.mydomain.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.015/0.025/0.029/0.007 ms


xeleema 02-04-2011 03:31 AM

Greetingz!

That error is normal...if you're unable to query your default Domain Name Server(s) as defined in your /etc/resolv.conf.

Sample /etc/resolv.conf
[code]search example.com
search user.example.com
nameserver 172.16.0.1
nameserver 172.16.0.2
nameserver 172.16.0.3[code]

There is a way to decrease that wait time;
1) Configure it to query the correct DNS server(s).
2) Use a different command "getent hosts hostname" will hit the /etc/hosts file.

If this (or any post helps), please rate that post. If your problem is solved, please use "Thread Tools" to mark the thread [SOLVED].

ahmedb72 02-04-2011 04:11 AM

Thanks for your reply.

I don't have any DNS server. I want to just use the /ect/hosts file. Should I edit /etc/resolv.conf? what shall I put in it?

xeleema 02-04-2011 04:34 AM

Quote:

Originally Posted by ahmedb72 (Post 4248045)
I don't have any DNS server.

Then don't use nslookup.
Quote:

Originally Posted by ahmedb72 (Post 4248045)
I want to just use the /ect/hosts file.

Great, use "getent hosts hostname"
Quote:

Originally Posted by ahmedb72 (Post 4248045)
Should I edit /etc/resolv.conf? what shall I put in it?

No and no.

If this or any other post helps you, make sure you mark that post as "helpful". If your problem gets solved, use "thread tools" at the tippy-top of the page to mark this thread as [SOLVED].

ahmedb72 02-04-2011 04:56 AM

Actually the nlslookup command is used by a software to check the response time. And the software requires a response time less than 15 Seconds. I thought as no nds server is actually used and only the local file /etc/hosts is used, the response time should easily by less than 15 s!

xeleema 02-04-2011 05:00 AM

Maybe if you posted the code we'd get a better understanding of what you're attempting to do.
Don't forget the 'code' tags.

ahmedb72 02-04-2011 05:38 AM

The error displayed by Oracle has nothing to do with Linux.

Anyway, thanks for your helpful reply.

If you're curious, following is the error I got from Oracle
Code:

PRVF-5636 : The DNS response time for an unreachable node exceeded "15000" ms on
following nodes: rac1,rac2 *- Cause:* The DNS response time for an unreachable
node exceeded the value specified on nodes specified. *- Action:* Make sure that
'options timeout', 'options attempts' and 'nameserver' entries in file resolv.conf
 are proper. On HPUX these entries will be 'retrans', 'retry' and 'nameserver'.
On Solaris these will be 'options retrans', 'options retry' and 'nameserver'.


jesenko 02-10-2011 01:50 PM

which version of oracle are you installing ? 11.2.0.2?

ahmedb72 02-12-2011 07:30 AM

yes

jesenko 02-13-2011 01:07 PM

I had the same issue with 11.2.0.2 and I could not find work around since i do not have DNS server, BUT with Oracle 11.2.0.1 and Oracle Linux 5 Update 5 no issues of any kind to build a RAC.
good luck, let me know


All times are GMT -5. The time now is 05:32 PM.