Played with hosts, now certain console commands are very slow...
So I played with /etc/hosts, adding a few entries to see if it made a difference in browser performance and to disable certain ad banners, etc. When I did this, I found that if I were to open a console and try to start the midnight commander, it would just sit there for about 15 seconds before responding. During this 15 seconds, as far as I can tell nothing is happening - no cpu consumption, no network bandwith consumption, nothing. It is just sitting there. Fifteen seconds later, mc appears.
I restored my hosts file, reboot, problem still remains. Now I'm lost - I'm not sure why dinkering with the hosts file would cause this, and I'm even less sure why restoring it did not fix it. The only other time I saw this was when I had mounted a network share, and that share became unavailable while it was still mounted. In this case, there are no network shares mounted. How do you troubleshoot something like this? PS: This happens for all users including root. Slackware 14 64 bit. |
Nothing to do with hosts would be my guess. I have used hosts files on all sorts of OS's and never an issue like that. I get the standard one at a windows site.
Could it be that you didn't use or need to use ipv6? Some ipv6 issue. Some other issue is at fault. It may be hard to find too. Try top command and maybe if you have or can install some system load monitor or other tools to graph the resources. I am not too sure but there is an outside chance that some secure linux feature could be involved but I don't know how. |
Quote:
|
I'm going to begin by stating that I'm taking a long shot stab at this, based neither on knowledge nor experience. There was a similar thread recently, unresolved:
https://www.linuxquestions.org/quest...in-4175436131/ and I'm curious as to whether your machine is having difficulty resolving your machine's hostname; iow, does your hosts file properly reflect your hostname, or domain...? cheers, |
SOLVED!
When I restored my hosts file, I left out: 127.0.0.1 ook.ook.org ook I restored that line, and now everything works fine. The question then becomes, why would not having this in the hosts file cause the problem? Midnight Commander must be trying to resolve the machine namae, and without this line it fails and times out. <shrug>.... Edit: I might mention that with this line in hosts, mc starts up in a fraction of a second. Poof, and it is there. |
Quote:
127.0.0.1 localhost have you tried this line too? |
Here's a thing. Slackware almost always includes notes and cautions in configuration files (if they're not already there from the developers); sort of lessons learned during a wasted youth kinds of things. /etc/hosts, straight from the "factory," has this:
Code:
# By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1 Your machine should have a name and an address. The name can be anything you like (the default on Slackware is "darkstar"); just something short and sweet (I name my servers fubar, snafu, pita and other pungent things). The address for a non-public server (not an Internet address) should be something like 192.168.x.y. The x is the subnet address from your router or switch and is, usually but not always, 1. The y is an address you pick, greater than 1 and less than 100, just so it's unique on your network (consisting of one or more Ethernet devices -- computers, printers, etc.) Why 1? Because 1 is usually the gateway address of your router (a lot of them default to 192.168.1.1. Why < 100? Because DHCP starts at 100 by default and you can use a fixed IP address for your machine less that 100 and it won't interfere with DHCP. Remember, we're talking about Slackware here; some other distribution might do things differently (and who cares what some other distribution fiddles around with). Do you have a router? Probably you do -- many of the "modems" you get from your service provider nowadays are a combination modem/router (so you can't conveniently run a web site). So, what does an /etc/hosts file look like? Like this: Code:
# Defining an external server as above means that you avoid hitting a DNS server; /etc/hosts is the first place "looked at" to find an address and, if an address is not found in /etc/hosts, the next places looked at is a DNS server, either BIND (if you're running it) or DNS server addresses in /etc/resolv.conf; e.g., Code:
cat /etc/resolv.conf Now, the trick is that all your local servers are listed in /etc/hosts (and the file is identical on all the servers). The IP address is first, followed by the name and domain of the server; e.g., fubar.com, followed by an alias (fubar). The alias means that your can, say, connect from fubar to snafu with SSH like this: Code:
ssh snaf Your host name is found in /etc/HOSTNAME; e.g., Code:
cat /etc/HOSTNAME Hope this helps some. |
All times are GMT -5. The time now is 03:02 AM. |