Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Connections to localhost responding very slowly

Posted on 2006-06-06
11
Medium Priority
?
360 Views
Last Modified: 2010-03-18
I'm running slackware-current and I have an odd problem where it takes about 10 or 15 seconds for anything to establish a connection with my machine. But once the connection is established, it works normally. For example when I get on another computer and try to mount my samba share, it takes 15 seconds, but once it mounts i can browse it with no problems. It also happens when I try connecting to my web server at localhost or 127.0.0.1. The same thing happened to my laptop which also runs slackware-current. So I tried reinstalling all my packages and even downgrading all my packages to 10.2, but it still happened. I tried creating a new user in case I had a bad config file, but no luck. I tried compiling a new kernel too. Pinging localhost still works normally. Is it possible that one of the packages in slackware-current broke something that didn't get fixed by reverting to 10.2 (which had worked before)?
0
Comment
Question by:walmartshopper
10 Comments
 
LVL 14

Expert Comment

by:pablouruguay
ID: 16842438
check in the /etc/hosts the line 127.0.0.1 localhost

and check if in your dns dont have a name called localhost.
0
 
LVL 16

Expert Comment

by:The--Captain
ID: 16847085
Initial network delays followed by normal functionality is indicative of resolver problems (DNS, /etc/hosts, etc) 99.99 percent of the time (as pablo is getting at).

Pablo is correct about needing that line in /etc/hosts - also, make sure you have reachable and working DNS servers configured in /etc/resolv.conf.

Cheers,
-Jon

P.S.  Your nick is not exactly endearing, at least to me.
0
 
LVL 2

Expert Comment

by:mjdme
ID: 16847746
Try this tweak in the smb.conf file:

[global]

# 5. Browser Control and Networking Options:
# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 SO_KEEPALIVE






0
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 

Author Comment

by:walmartshopper
ID: 16850373
My /etc/hosts and /etc/resolv.conf are both ok.  They are the exact same as they were before the problem started happening.  I added the tweak to my smb.conf and still no luck.  I don't think it is limited to samba.  It happens with any type of connection and from any computer.  It happens with samba, ssh, and apache, the only 3 servers I'm running on it.  The same thing is happening when I log into ssh from any other computer, it's not limited to localhost.  I've tried connecting by host name and IP.  So I don't think it could be a dns problem.

I'm running firestarter 1.0.3, but the problem occurs whether the firewall is on or off.  And I'm using the same configuration that I was using before when it worked.

Thanks for the comments.  Any other ideas?
0
 
LVL 16

Expert Comment

by:The--Captain
ID: 16855568
>I've tried connecting by host name and IP.  So I don't think it could be a dns problem

Doesn't matter how you try to connect if you have something (probably TCP wrappers) that are trying to do reverse lookups on the source IP on incoming connections - this could easily cause your problem.

So, if your resolver is OK, you probably need to configure your system to stop trying to do reverse DNS lookups for every connection.

Cheers,
-Jon
0
 

Author Comment

by:walmartshopper
ID: 16888700
As far as i know, it's not doing reverse lookups for every connection.  I've never set it up to do that or even seen that option in any config file or network config app, and I don't see why it would be on by default.  But I won't make any assumptions, so I'll double check on that... which I'm not exactly sure how to do.  How would I go about enabling or disabling reverse lookups for every connection on slackware?

0
 

Author Comment

by:walmartshopper
ID: 16888865
Something I forgot to mention is that it only seems to affect connection-oriented stuff.  UDP seems to work fine.  For example, when I connect to ssh on this machine, the pre-connection stuff is very quick.  It responds instantly asking for a username and password.  Then as soon as I send the password, which I believe is when it starts trying to establish a connection, it takes 10-15 seconds before the command prompt appears.  And once the connection is established and I'm logged in, there is no more delay.

It may seem like just a minor annoyance because I just have to wait a few extra seconds to connect, but it gets frustrating when I'm trying to use phpMyAdmin with Apache.  I have to wait 15 seconds every time I click on something, making it useless for serious work.  I've been using mysql-query-browser to manage the database, but I'd really like to get this fixed so I can use phpMyAdmin again.

Thanks for help so far!
0
 
LVL 16

Expert Comment

by:The--Captain
ID: 16899903
> For example, when I connect to ssh on this machine, the pre-connection stuff is very quick.  
>It responds instantly asking for a username and password.  Then as soon as I
>send the password, which I believe is when it starts trying to establish a
>connection, it takes 10-15 seconds before the command prompt appears.  
>And once the connection is established and I'm logged in, there is no more delay

OK, those details seem to rule out my previous suggestions - this is where I usually break out the sniffer...

Cheers,
-Jon
 
0
 

Author Comment

by:walmartshopper
ID: 16901553
Well, I downloaded Vista Beta 2 and installed it on another partition.  Same problem.  I tried the nforce4 network port (which had never worked in linux) and the problem was solved.  The Marvell Yukon port and/or controller must be dying, which explains why nothing worked.  And it turns out that my laptop's port just happened to be dying at the same time and barely works anymore.
0
 

Accepted Solution

by:
RomMod earned 0 total points
ID: 16970517
Question closed - 500 points refunded.

Best regards,
RomMod
Experts Exchange
Community Support Moderator
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses
Course of the Month13 days, 5 hours left to enroll

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question