Bug 58113 - lpr won't print: can't install text-only printer
lpr won't print: can't install text-only printer
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2002-01-08 18:02 EST by Need Real Name
Modified: 2014-03-16 22:24 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-01-21 17:39:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
installation log (5.70 KB, text/plain)
2002-01-17 09:40 EST, Need Real Name
no flags Details

  None (edit)
Description Need Real Name 2002-01-08 18:02:38 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.08 [en] (WinNT; U ;Nav)

Description of problem:
The command
                                  lpr /etc/hosts produces the error message
                                     "sending job 'root@localhost+13@ to TextOnly@localhost
                                     connecting to localhost, attempt 1
                                     cannot open connection to localhost - Network is unreachable
                                     Make sure LPD server is running on the server"
    and lpd is indeed running. 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.install text-only printer
2.print test message (fails - detects an error)
3.lpr <filename>

Actual Results:  1. "lpd sucessfully restarted"
2. "an error ocurred"
3. error message as in description

Expected Results:  2. no error message, and a test file printed
3.  the specified file printed

Additional info:

  See service request 196845 for more details
Comment 1 Tim Waugh 2002-01-09 02:37:26 EST
What does '/sbin/ifconfig lo' say?
Comment 2 Need Real Name 2002-01-09 16:47:35 EST
/sbin/ifconfig lo


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)
Comment 3 Tim Waugh 2002-01-10 04:24:31 EST
And '/sbin/route -n'?
Comment 4 Need Real Name 2002-01-10 12:21:44 EST
/sbin/route -n 


Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
Comment 5 Tim Waugh 2002-01-10 12:24:04 EST
Network problem, not LPRng problem.  Reassigning to initscripts (for want of a 
better place).
Comment 6 Bill Nottingham 2002-01-10 19:28:05 EST
What does /etc/sysconfig/network-scripts/ifcfg-lo say?
Comment 7 Need Real Name 2002-01-11 12:13:03 EST
Contents of  /etc/sysconfig/network-scripts/ifcfg-lo 

# If you're having problems with gated making a martian,
# you can change this to something else (, for example)
Comment 8 Need Real Name 2002-01-17 09:40:00 EST
Created attachment 42694 [details]
installation log
Comment 9 Need Real Name 2002-01-17 09:40:51 EST
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.
Comment 10 Brock Organ 2002-01-21 10:59:46 EST
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 

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
          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 $?
# lpr /etc/hosts
# lpq
Printer: devel@borgan (dest /var/spool/lpd/lp0@printer.devel.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 $?

Comment 11 Brock Organ 2002-01-21 11:36:39 EST
I'm sorry, I made a typo above, I meant to say the command:

# ifup lo; echo $?

and not

# if lo; echo $?
Comment 12 Need Real Name 2002-01-21 17:38:55 EST
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?
Comment 13 Brock Organ 2002-01-22 08:49:50 EST
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 

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! :)

Comment 14 Brock Organ 2002-01-22 08:55:07 EST
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 ... :)

Comment 15 Need Real Name 2002-02-02 03:54:13 EST
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.

Note You need to log in before you can comment on or make changes to this bug.