Bug 58113
Summary: | lpr won't print: can't install text-only printer | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Need Real Name <ghunter> | ||||
Component: | initscripts | Assignee: | Bill Nottingham <notting> | ||||
Status: | CLOSED NOTABUG | QA Contact: | Brock Organ <borgan> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 7.2 | CC: | rvokal | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2002-01-21 22:39:00 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Need Real Name
2002-01-08 23:02:38 UTC
What does '/sbin/ifconfig lo' say? /sbin/ifconfig lo responds lo Link encap:Local Loopback LOOPBACK MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) And '/sbin/route -n'? /sbin/route -n responds Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface Network problem, not LPRng problem. Reassigning to initscripts (for want of a better place). What does /etc/sysconfig/network-scripts/ifcfg-lo say? Contents of /etc/sysconfig/network-scripts/ifcfg-lo DEVICE=lo IPADDR=127.0.0.1 NETMASK=255.0.0.0 NETWORK=127.0.0.0 # If you're having problems with gated making 127.0.0.0/8 a martian, # you can change this to something else (255.255.255.255, for example) BROADCAST=127.255.255.255 ONBOOT=yes NAME=loopback Created attachment 42694 [details]
installation log
I think I see a possible explanation for this problem. The system is intended for use as a stand alone word processor, with no network connection of any kind. It has therefore been installed with very few network components - perhaps too few. I therefore attach the installation log in case it gives you a clue as to what, if anything, is missing, and why it wasn't picked up by the dependancy checks. I am seeing the behavior you describe when trying to print without a loopback device (your output from ifconfig above shows a loopback device that is not enabled) Can you explicitly bring up the loopback (lo) device successfully, then retry your print job? Here is a sample root session to illustrate what I mean: # ifconfig lo lo Link encap:Local Loopback LOOPBACK MTU:16436 Metric:1 RX packets:3199 errors:0 dropped:0 overruns:0 frame:0 TX packets:3199 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 RX bytes:246400 (240.6 Kb) TX bytes:246400 (240.6 Kb) # lpr /etc/hosts Status Information: sending job 'root@borgan+992' to devel@localhost connecting to 'localhost', attempt 1 cannot open connection to localhost - Connection timed out Make sure LPD server is running on the server # ifup lo; echo $? 0 # lpr /etc/hosts # lpq Printer: devel@borgan (dest /var/spool/lpd/lp0.redhat.com) Queue: no printable jobs in queue Status: job 'cfA100borgan.devel.redhat.com' removed at 10:53:23.384 JetDirect lpd: no entries # As you can see the first lines show the loopback (lo) device as being off, and the print job fails ... then using the "ifup lo" command (and checking that it exited with a 0 value using "echo $?") I turned the loopback (lo) device on, then my print jobs were able to be printed ... what I am interested in is if you are able to print after running the command # if lo; echo $? I'm sorry, I made a typo above, I meant to say the command: # ifup lo; echo $? and not # if lo; echo $? ifup lo; echo$? works! lpr <filename> works, and test printing from printtool appears to work. If I add the ifup command to a start up script, will that provide a satisfactory workaround? Yes, you could add that to a start up script, but try changing the "ONBOOT=" line in the file /etc/sysconfig/network-scripts/ifcfg-lo to "ONBOOT=yes" first ... For example here is my file, and my lo device is started automatically at boot because of the "ONBOOT=" value: $ cat /etc/sysconfig/network-scripts/ifcfg-lo DEVICE=lo IPADDR=127.0.0.1 NETMASK=255.0.0.0 NETWORK=127.0.0.0 BROADCAST=127.255.255.255 ONBOOT=yes NAME=loopback $ I am happy you are able to print now ... not having the loopback device running at startup is an unusual condition, which may be why your problem was not easily diagnosed ... good luck! :) doh! :) I see your ifcfg-lo file DOES have ONBOOT=yes in it ... I'm not sure why your lo device is not starting up automatically at boot, so until that reason is known and can get fixed, putting the ifup command in a start up script will provide a work around ... :) I think I have discovered why lo is not starting automatically at start up. I have (had) the network service disabled because (a) I didn't think I needed it, as I have no network (b) it was slowing the boot process by looking for a non-existant eth0 device. I have now enabled it and lo starts on boot. I cannot get the ifup command to work from a script - it hangs the system with "fork: resource temporarily unavailable" messages. |