LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-04-2011, 02:38 AM   #1
ahmedb72
Member
 
Registered: Jan 2006
Location: Sydney
Distribution: RHEL
Posts: 72

Rep: Reputation: 15
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
 
Old 02-04-2011, 03:31 AM   #2
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 254Reputation: 254Reputation: 254
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].
 
Old 02-04-2011, 04:11 AM   #3
ahmedb72
Member
 
Registered: Jan 2006
Location: Sydney
Distribution: RHEL
Posts: 72

Original Poster
Rep: Reputation: 15
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?
 
Old 02-04-2011, 04:34 AM   #4
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 254Reputation: 254Reputation: 254
Quote:
Originally Posted by ahmedb72 View Post
I don't have any DNS server.
Then don't use nslookup.
Quote:
Originally Posted by ahmedb72 View Post
I want to just use the /ect/hosts file.
Great, use "getent hosts hostname"
Quote:
Originally Posted by ahmedb72 View Post
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].

Last edited by xeleema; 02-04-2011 at 04:35 AM.
 
1 members found this post helpful.
Old 02-04-2011, 04:56 AM   #5
ahmedb72
Member
 
Registered: Jan 2006
Location: Sydney
Distribution: RHEL
Posts: 72

Original Poster
Rep: Reputation: 15
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!
 
Old 02-04-2011, 05:00 AM   #6
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 254Reputation: 254Reputation: 254
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.
 
Old 02-04-2011, 05:38 AM   #7
ahmedb72
Member
 
Registered: Jan 2006
Location: Sydney
Distribution: RHEL
Posts: 72

Original Poster
Rep: Reputation: 15
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'.
 
Old 02-10-2011, 01:50 PM   #8
jesenko
LQ Newbie
 
Registered: Feb 2011
Posts: 2

Rep: Reputation: 0
which version of oracle are you installing ? 11.2.0.2?
 
Old 02-12-2011, 07:30 AM   #9
ahmedb72
Member
 
Registered: Jan 2006
Location: Sydney
Distribution: RHEL
Posts: 72

Original Poster
Rep: Reputation: 15
yes
 
Old 02-13-2011, 01:07 PM   #10
jesenko
LQ Newbie
 
Registered: Feb 2011
Posts: 2

Rep: Reputation: 0
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection timed out during "ftp put" process bret Linux - Networking 3 12-17-2009 07:16 PM
Mysql "connection timed out" error immortaltechnique Linux - Software 0 09-03-2007 06:52 AM
Error: "Could not connect data socket, Connection timed out." tigerflag Linux - Software 5 01-17-2006 01:26 AM
nslookup gives "connection timed out; no server could be reached" hello321_1999 Linux - Networking 3 11-26-2004 11:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration