ExamNotes.net  -  IT certification portal

ForumsCertResearchTop sitesNewslettersFree email
HomeRegister


Exams Notes
Practice exams
Exam games
Questions by email
Online training
Training videos
College degrees
Boot camps
Book store
Links directory
Tell a friend
For webmasters




General discussions > Public newsgroups > alt.os.linux > Problem with connections to "localhost"

Show a Printable Version
Email This Page to Someone!
Receive updates to this thread



Pages (3): [1] 2 3 »

Author Problem with connections to "localhost"
Koen Vandamme
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Problem with connections to "localhost"

Hello,

I have the following problem:
Whenever I try to make a connection to "localhost",it lasts 20sec before
there is a connection.
This is for every kind of service (telnet, imap,sendmail,ssh,server written
in java).

When I try the same connection to "127.0.0.1" or to "localhost.localdomain",
the connection is made almost immediatly.

So there must be a problem with resolving "localhost" to 127.0.0.1.

Some more info:

* My system:
RH7.3
* /etc/hosts:
127.0.0.1 localhost localhost.localdomain
* /etc/host.conf:
order hosts,bind
* /etc/nsswitch.conf:
hosts: files dns
passwd: files nisplus
shadow: files nisplus
group: files nisplus
bootparams: nisplus [NOTFOUND=return] files
ethers: files
netmasks: files
networks: files
protocols: files nisplus
rpc: files
services: files nisplus
netgroup: files nisplus
publickey: nisplus
automount: files nisplus
aliases: files nisplus

* When I look to the network-activity with ethereal (tethereal -i any -V):
Immediatly after "telnet localhost" there is a dns-query towards the 1st
dnsserver of my provider.
(Query: name=localhost.pandora.be;type=ipv6 addr;class=inet) With an
immedate response: no such name.
Then there is again a dns-query towards the first dnsserver (Query:
name:localhost;type=ipv6 addr;class=inet). There comes no response from dns
on this request.
After 5 secs the last query is resend towards the 2nd dnsserver: no respons.
Again after 5 secs this query is resend to the 1st dnsserver: no respons.
The query is resend again to both dnsservers with a delay of 5 secs: no
respons.
Finally, 20 sec after the telnet-command, i get a connection...


Has anybody ideas what the problem/solution is?
Koen Vandamme

PS: I asked this already in another newsgroup (be.comp.os.linux), they
helped me to specify the problem but they didn't find a solution...


Report this post to a moderator

Old Post 12-05-02 09:24 AM
Reply w/Quote Edit/Delete Message IP: Logged
Paul Lutus
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Re: Problem with connections to "localhost"

On Thu, 05 Dec 2002 09:53:31 +0100, Koen Vandamme wrote:

> Hello,
>
> I have the following problem:
> Whenever I try to make a connection to "localhost",it lasts 20sec before
> there is a connection.
> This is for every kind of service (telnet, imap,sendmail,ssh,server
> written in java).
>
> When I try the same connection to "127.0.0.1" or to
> "localhost.localdomain", the connection is made almost immediatly.
>
> So there must be a problem with resolving "localhost" to 127.0.0.1.


Yes. The following lines MUST appear in your /etc/hosts file, exactly as
shown, not one character changed:

******************************
***************

# Do not remove the following line, or various programs # that require
network functionality will fail.

127.0.0.1 localhost.localdomain localhost

******************************
***************

The words "Do not remove ..." etc. above are not the computer equivalent
of "Do not walk on the grass." They are not an invitation to walk on the
grass.

--
Paul Lutus
www.arachnoid.com


Report this post to a moderator

Old Post 12-05-02 10:24 AM
Reply w/Quote Edit/Delete Message IP: Logged
Joe Fredrickson
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Re: Problem with connections to "localhost"

Thu, 5 Dec 2002 07:53 pm will from hence forward be known as the day Koen
Vandamme blabbered:

> * /etc/hosts:
> 127.0.0.1 localhost localhost.localdomain


Try changing this to
127.0.0.1 localhost

--
remember this is the sequence of events, in no particular order

Registered Linux User 282072
<www.volutin.net -- everything irrelevant>

Report this post to a moderator

Old Post 12-05-02 10:24 AM
Reply w/Quote Edit/Delete Message IP: Logged
dmz17
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Re: Problem with connections to "localhost"

On Thu, 05 Dec 2002 02:11:37 +0000, Paul Lutus wrote:

> On Thu, 05 Dec 2002 09:53:31 +0100, Koen Vandamme wrote:
>
>> Hello,
>>
>> I have the following problem:
>> Whenever I try to make a connection to "localhost",it lasts 20sec before
>> there is a connection.
>> This is for every kind of service (telnet, imap,sendmail,ssh,server
>> written in java).
>>
>> When I try the same connection to "127.0.0.1" or to
>> "localhost.localdomain", the connection is made almost immediatly.
>>
>> So there must be a problem with resolving "localhost" to 127.0.0.1.

>
> Yes. The following lines MUST appear in your /etc/hosts file, exactly as
> shown, not one character changed:
>
> ******************************
***************
>
> # Do not remove the following line, or various programs # that require
> network functionality will fail.
>
> 127.0.0.1 localhost.localdomain localhost
>
> ******************************
***************
>
> The words "Do not remove ..." etc. above are not the computer equivalent
> of "Do not walk on the grass." They are not an invitation to walk on the
> grass.



So, Paul, what you're saying is that the commented lines
must appear, exactly as shown?

Then I must have a bug in my system, because I do very well without
comments.

To the OP:

I suspect you also have an entry looking like this :

::1 localhost ipv6-localhost ipv6-loopback

in your /etc/hosts file.

For some reason, SuSE sets this up as a default. It has an
entry localhost for 127.0.0.1 and an entry localhost for ::1

It also set up an alias loopback for 127.0.0.1 and an alias ipv6-loopback
for ::1

Perhaps what is called in your case it the ::1 alias?

Just guessing here. I am a far cry from being a network guru.

Cheers,

dmz17

Report this post to a moderator

Old Post 12-05-02 10:24 AM
Reply w/Quote Edit/Delete Message IP: Logged
Paul Lutus
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Re: Problem with connections to "localhost"

On Thu, 05 Dec 2002 11:21:39 +0100, dmz17 wrote:

> On Thu, 05 Dec 2002 02:11:37 +0000, Paul Lutus wrote:
>
>> On Thu, 05 Dec 2002 09:53:31 +0100, Koen Vandamme wrote:
>>
>>> Hello,
>>>
>>> I have the following problem:
>>> Whenever I try to make a connection to "localhost",it lasts 20sec before
>>> there is a connection.
>>> This is for every kind of service (telnet, imap,sendmail,ssh,server
>>> written in java).
>>>
>>> When I try the same connection to "127.0.0.1" or to
>>> "localhost.localdomain", the connection is made almost immediatly.
>>>
>>> So there must be a problem with resolving "localhost" to 127.0.0.1.

>>
>> Yes. The following lines MUST appear in your /etc/hosts file, exactly as
>> shown, not one character changed:
>>
>> ******************************
***************
>>
>> # Do not remove the following line, or various programs # that require
>> network functionality will fail.
>>
>> 127.0.0.1 localhost.localdomain localhost
>>
>> ******************************
***************
>>
>> The words "Do not remove ..." etc. above are not the computer equivalent
>> of "Do not walk on the grass." They are not an invitation to walk on the
>> grass.

>
>
> So, Paul, what you're saying is that the commented lines
> must appear, exactly as shown?
>
> Then I must have a bug in my system, because I do very well without
> comments.


The comments are probably the most important part -- for end users.

If you are not a chronic and acute line-deleter, they have no effect.

--
Paul Lutus
www.arachnoid.com


Report this post to a moderator

Old Post 12-05-02 11:24 AM
Reply w/Quote Edit/Delete Message IP: Logged
Floyd Davidson
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Re: Problem with connections to "localhost"

"Paul Lutus" <nospam@nosite.zzz> wrote:
>On Thu, 05 Dec 2002 11:21:39 +0100, dmz17 wrote:
>> On Thu, 05 Dec 2002 02:11:37 +0000, Paul Lutus wrote:
>>>
>>> Yes. The following lines MUST appear in your /etc/hosts file, exactly as
>>> shown, not one character changed:
>>>
>>> ******************************
***************
>>>
>>> # Do not remove the following line, or various programs # that require
>>> network functionality will fail.
>>>
>>> 127.0.0.1 localhost.localdomain localhost
>>>
>>> ******************************
***************
>>>
>>> The words "Do not remove ..." etc. above are not the computer equivalent
>>> of "Do not walk on the grass." They are not an invitation to walk on the
>>> grass.

>>
>>
>> So, Paul, what you're saying is that the commented lines
>> must appear, exactly as shown?
>>
>> Then I must have a bug in my system, because I do very well without
>> comments.

>
>The comments are probably the most important part -- for end users.
>
>If you are not a chronic and acute line-deleter, they have no effect.


So it is not true that they "must appear".

OK.

--
Floyd L. Davidson <http://www.ptialaska.net/~floyd>
Ukpeagvik (Barrow, Alaska) floyd@barrow.com

Report this post to a moderator

Old Post 12-05-02 12:24 PM
Reply w/Quote Edit/Delete Message IP: Logged
Joe Fredrickson
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Re: Problem with connections to "localhost"

> So it is not true that they "must appear".

A line with nothing on it is whitespace - something for beautification
A line with a # at the start is a comment and is ignored.

The above two can be deleted.

This cannot
A line with a #! is important as it says which shell to execute with.

--
remember this is the sequence of events, in no particular order

Registered Linux User 282072
<www.volutin.net -- everything irrelevant>

Report this post to a moderator

Old Post 12-05-02 01:24 PM
Reply w/Quote Edit/Delete Message IP: Logged
Floyd Davidson
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Re: Problem with connections to "localhost"

Joe Fredrickson <joe@volutin.net> wrote:
>> So it is not true that they "must appear".

>
>A line with nothing on it is whitespace - something for beautification
>A line with a # at the start is a comment and is ignored.
>
>The above two can be deleted.


You are saying that Paul Lutus lied?

>This cannot
>A line with a #! is important as it says which shell to execute with.


That isn't quite true. Such a line only has that significance if
it is the first line, and moreover it only affects execution of
a script. Since the /etc/hosts file that is being discussed is
not a shell script and contains no executable commands, any line
beginning with #! is just another comment, and as with the others
it can be ignored or deleted as desire, Lutus or no Lutus.

--
Floyd L. Davidson <http://www.ptialaska.net/~floyd>
Ukpeagvik (Barrow, Alaska) floyd@barrow.com

Report this post to a moderator

Old Post 12-05-02 03:25 PM
Reply w/Quote Edit/Delete Message IP: Logged
Peter T. Breuer
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Re: Problem with connections to "localhost"

In alt.os.linux Floyd Davidson <floyd@ptialaska.net> wrote:
>>This cannot
>>A line with a #! is important as it says which shell to execute with.


> That isn't quite true. Such a line only has that significance if
> it is the first line, and moreover it only affects execution of
> a script. Since the /etc/hosts file that is being discussed is
> not a shell script and contains no executable commands, any line
> beginning with #! is just another comment, and as with the others
> it can be ignored or deleted as desire, Lutus or no Lutus.


Ahhh, but that's not true. The comment line could be a copyright
claim, or a shrinkwrap licence agreement which forbids you from
altering the file contents in general, and that line in particular.

Peter

Report this post to a moderator

Old Post 12-05-02 05:24 PM
Reply w/Quote Edit/Delete Message IP: Logged
Paul Lutus
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Re: Problem with connections to "localhost"

On Thu, 05 Dec 2002 17:36:25 +0100, Peter T. Breuer wrote:

> In alt.os.linux Floyd Davidson <floyd@ptialaska.net> wrote:
>>>This cannot
>>>A line with a #! is important as it says which shell to execute with.

>
>> That isn't quite true. Such a line only has that significance if
>> it is the first line, and moreover it only affects execution of
>> a script. Since the /etc/hosts file that is being discussed is
>> not a shell script and contains no executable commands, any line
>> beginning with #! is just another comment, and as with the others
>> it can be ignored or deleted as desire, Lutus or no Lutus.


Now I remember why I have you killfiled. I had almost forgotten.

--
Paul Lutus
www.arachnoid.com


Report this post to a moderator

Old Post 12-05-02 05:24 PM
Reply w/Quote Edit/Delete Message IP: Logged
All times are GMT.
Pages (3): [1] 2 3 » Post new thread   Post reply


Forum Jump:
Rate This Thread:
Forum Rules:
Who Can Read The Forum? Any registered user or guest.
Who Can Post New Topics? Any registered user.
Who Can Post Replies? Any registered user.
Changes: Messages can be edited by their author.
Posts: HTML code is OFF. Smilies are ON. vB code is ON. [IMG] code is OFF.
 

ExamNotes forum archive


Powered by: vBulletin 2.2.8
Copyright ©2000, Jelsoft Enterprises Limited.

  Free Braindumps | mcse braindumps