LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   localhost problem (https://www.linuxquestions.org/questions/linux-newbie-8/localhost-problem-10601/)

wilcsnyder 12-24-2001 09:38 AM

localhost problem
 
My /etc/hosts has

127.0.0.1 localhost.localdomain localhost



When lpd starts on bootup I get:

localho lpd: 2001-12-24-21:44:16.193 Get_local_host: hostname 'localho' bad



If I change hosts to read

127.0.0.1 localhost

I get the same bootup message.



I tried setting up the loopback interface per the Net howto, doing

ifconfig lo 127.0.0.1

rout add -host 127.0.0.1 lo

but it doesn't seem to make a difference.



As I mentioned in an earlier post, when I try to print with lpr I get:



Status Information:

sending job 'ws@localhost+577' to bjc80@localhost

connecting to 'localhost', attempt 1

cannot open connection to localhost - Network is unreachable

Make sure LPD server is running on the server



Also, ppp works fine, but when starting up it gives the message:

_IceTransSocketUNIXConnect: Cannot connect to non-local host localho

Session management error: Could not open network socket



I've been reading what I can find to figure this out, but I really don't understand what's going on, and I can't print. That's critical!



Thanks to anyone who can help.



cheers,

wil snyder

wilcsnyder 12-26-2001 10:21 AM

Never mind, I figured it out.

cheers,
wil snyder

Bernhard 01-11-2002 06:13 AM

How did you solve your lpd-Problem?
 
Hello,
I read your post and may have a similar problem.
How did you solve yours?

Mike Sheets 04-10-2002 08:52 PM

bad hostname with lpr/samba
 
What Will opted to not reply was that newer versions of Redhat and I assume others using the LPRng package may need to have the /etc/hosts file formatted as:

127.0.0.1<tab>localhost.localdomain<tab>localhost

Rather than the old way required by some previous versions:

127.0.0.1<tab>localhost.localdomain
127.0.0.1<tab>localhost

The same holds true for other entries where you have an alias such as:

192.168.1.1<tab>fs1.mydomain.com<tab>fs1

(replace <tab> with actual tab char)

Also... VERY IMPORTANT! The /etc/hosts file needs 744 permissions so that services like lpd can read it.

I found this out the hard way... one of those "it could take 5 minutes or it could take a week" problems where it isn't an obvious problem because it always worked before....

Hope this helps


All times are GMT -5. The time now is 03:04 AM.