# cups network printing not working: always on queue

## abhichan

I am trying to print a test document over the network and I am getting the following errors in the error_log file

----------------------------------------------------------------------------------

D [07/Nov/2006:12:14:11 -0500] AcceptClient: 5 from localhost:631.

D [07/Nov/2006:12:14:11 -0500] ReadClient: 5 POST / HTTP/1.1

D [07/Nov/2006:12:14:11 -0500] ProcessIPPRequest: 5 status_code=1

D [07/Nov/2006:12:14:11 -0500] ReadClient: 5 POST / HTTP/1.1

D [07/Nov/2006:12:14:11 -0500] ProcessIPPRequest: 5 status_code=1

D [07/Nov/2006:12:14:11 -0500] ReadClient: 5 POST / HTTP/1.1

D [07/Nov/2006:12:14:11 -0500] ProcessIPPRequest: 5 status_code=0

D [07/Nov/2006:12:14:11 -0500] AcceptClient: 7 from localhost:631.

D [07/Nov/2006:12:14:11 -0500] CloseClient: 5

D [07/Nov/2006:12:14:11 -0500] ReadClient: 7 POST /printers/hpnew HTTP/1.1

D [07/Nov/2006:12:14:11 -0500] print_job: auto-typing file...

D [07/Nov/2006:12:14:11 -0500] print_job: request file type is text/plain.

D [07/Nov/2006:12:14:11 -0500] check_quotas: requesting-user-name = 'root'

D [07/Nov/2006:12:14:11 -0500] print_job: requesting-user-name = 'root'

I [07/Nov/2006:12:14:11 -0500] Adding start banner page "none" to job 1.

I [07/Nov/2006:12:14:11 -0500] Adding end banner page "none" to job 1.

I [07/Nov/2006:12:14:11 -0500] Job 1 queued on 'hpnew' by 'root'.

D [07/Nov/2006:12:14:11 -0500] Job 1 hold_until = 0

D [07/Nov/2006:12:14:11 -0500] ProcessIPPRequest: 7 status_code=0

D [07/Nov/2006:12:14:11 -0500] CloseClient: 7

-----------------------------------------------------------------------------------

This are some of the important things in my cupsd.conf file

-----------------------------------------------------------------------------------

#Port 80

#Port 443

Port 631

#Listen 128.0.0.1:631

#Listen 127.0.0.1:631

#Listen 192.168.40.100:631

..................................................

..................................................

..................................................

<Location />

Order Deny,Allow

Deny From All

Allow From 128.46.*

Allow From 68.73.*<Location /admin>

#

# You definitely will want to limit access to the administration functions.

# The default configuration requires a local connection from a user who

# is a member of the system group to do any admin tasks.  You can change

# the group name using the SystemGroup directive.

#

AuthType Basic

AuthClass System

## Restrict access to local domain

Order Deny,Allow

Deny From All

Allow From 68.73.*

Allow From 127.0.0.1

Allow From 128.46.*

#Encryption Required

</Location>

Allow From 127.0.0.1

Allow From 192.168.40.*

</Location>

-----------------------------------------------------------------------------

 and finally my printers.conf file looks like this

------------------------------------------------------------------------------

<DefaultPrinter hpnew>

Info HP PhotoSmart 2600 hpijs

Location

DeviceURI http://68.73.151.68:631/hpnew

State Stopped

Accepting Yes

JobSheets none none

QuotaPeriod 0

PageLimit 0

KLimit 0

</Printer>

-----------------------------------------------------------------------------

Can anybody please help me with this. I have been looking at these forums for quite some time now, but I havent been abel to get a solution to this. Thanks.

----------

## xoomix

Have you tried blowing away your configs yet and pointing your cups server browser to http://127.0.0.1:631 and re-setting it all up?

----------

## xoomix

 *kiosk wrote:*   

> Have you tried blowing away your configs yet and pointing your cups server browser to http://127.0.0.1:631 and re-setting it all up?

 

Of course by 'blowing away' I mean backing up  :Smile: 

----------

## abhichan

I tried that but that did not seem to work...any other ideas?..i am new to this, so I am sort of stuck now...thanks..

----------

## xoomix

Mine looks like this:

<DefaultPrinter LJ-4250>

Info Monochrome

Location Jeff's Office

DeviceURI socket://134.20.32.28:9100

State Idle

Accepting Yes

JobSheets none none

QuotaPeriod 0

PageLimit 0

KLimit 0

</Printer>

Are you correct with your DeviceURI being http:// and not socket:// -- is it not on the LAN ?

----------

## abhichan

I actually dont know what the difference between using a socket option and an http option is. But i tried both and that did not seem to fix the problem.The printer is connected using a network cable.

----------

## abhichan

Alo lpq command says that hpnew (my printer's name) is not ready. I dont know if this helps...

----------

## xoomix

Have you tried yet putting in a socket setting like mine, with the port info as well? Can you ping the printer JetDirect card by IP?

----------

## abhichan

Yes, i did use the socket setting exactly like yours and it did not help...How do you ping  the printer directly..i mean the computer itself is on the network, because I could ping that particular IP address..but how to ping the printer directly...

----------

## xoomix

Well, let me get this straight - is this printer actually being shared out by someone over the network, and you are trying to access their share, or is this printer sitting in a cube somewhere with just a JetDirect card and a network cable hooked up to it?

----------

## abhichan

okay..so this is a printer connected to my home computer ...i am connected to my home machine thru ssh from my laptop at work and I am trying to print a test document on my home computer...

----------

## abhichan

sorry...forgot to mention that the printer is connected to my home computer thru the network...

----------

## xoomix

Ok - so the setup at home works ok? PC at home (Linux I assume) - has printer attached, can print at home just fine, now you are ssh'd into the home pc and want to print - now are you trying to print from the home pc to the printer (that already works at home) or are you trying to get your computer at work to print to the home printer? And if that is so - is the printer supposedly accessible via internet?

----------

## wynn

 *abhichan wrote:*   

> okay..so this is a printer connected to my home computer ...i am connected to my home machine thru ssh from my laptop at work and I am trying to print a test document on my home computer...

 In your first post, printers.conf has "State Stopped" which "Specifies the initial state of the printer (Idle or Stopped)" so you won't be able to print to it â perhaps it's out of paper or jammed: in the default setup, CUPS will stop a printer in this state.

kiosk's suggestion to blow away .. ahem backing up your configs (cupsd.conf and printers.conf) and redoing them seems the best idea.

The printer is a local printer and, as you are ssh'ing into the box, you don't need to allow any access except from localhost.

The simplest default cupsd.conf and the printers.conf you get by adding the 2600 as a locally connected printer should be quite enough.

Any logged in user, including ssh'd in users, can print without any further todo.

----------

## abhichan

my home computer is a linux system and the printer is connected to it thru a network cable...the printer DOES NOT work from my home computer as well...right now since I am at work I am just using my work laptop to test it..thats all...I have connected to my home computer by ssh now....

----------

## xoomix

 *abhichan wrote:*   

> my home computer is a linux system and the printer is connected to it thru a network cable...the printer DOES NOT work from my home computer as well...right now since I am at work I am just using my work laptop to test it..thats all...I have connected to my home computer by ssh now....

 

Ok so if this printer is connected via network cable the printer must have a JetDirect device with an IP address. If you use the control panel on the printer and go to Configuration Menu - Print Configuration - can you see what the TCP/IP IP address is? After that, can you ping it from the system there at home?

----------

## abhichan

So I found the IP address of the printer and I tried pinging it from home and from my work laptop..I was not getting any response...Doesnt that mean that the printer is not on the network...Wonder why???Because the printer is connected and everything properly...Dont know what to do now....

----------

## xoomix

 *abhichan wrote:*   

> So I found the IP address of the printer and I tried pinging it from home and from my work laptop..I was not getting any response...Doesnt that mean that the printer is not on the network...Wonder why???Because the printer is connected and everything properly...Dont know what to do now....

 

Please show us your 'ifconfig eth0' output, 'route -n' output, as well as the IP addressing info for your printer - IP, subnet mask, gateway, etc.

----------

## abhichan

ifconfig

eth0      Link encap:Ethernet  HWaddr 00:11:2F:C6:24:84  

          inet addr:192.168.40.2  Bcast:192.168.40.255  Mask:255.255.255.0

          inet6 addr: fe80::211:2fff:fec6:2484/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:1373068 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1186157 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:1177380892 (1122.8 Mb)  TX bytes:175441883 (167.3 Mb)

          Interrupt:10 Memory:fac00000-0 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:155104 errors:0 dropped:0 overruns:0 frame:0

          TX packets:155104 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:21727363 (20.7 Mb)  TX bytes:21727363 (20.7 Mb)

------------------------------------------------------------------------------------------------

route -n

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use      Iface

192.168.40.0    0.0.0.0          255.255.255.0   U     0        0         0       eth0

127.0.0.0         0.0.0.0          255.0.0.0          U     0        0         0         lo

0.0.0.0          192.168.40.1    0.0.0.0            UG    0        0         0        eth0

----------

## abhichan

route -n

Kernel IP routing table

Destination              Gateway         Genmask         Flags         Metric          Ref    Use      Iface

192.168.40.0           0.0.0.0          255.255.255.0       U               0              0        0        eth0

127.0.0.0                0.0.0.0             255.0.0.0           U               0               0        0         lo

0.0.0.0               192.168.40.1           0.0.0.0           UG              0               0        0        eth0

----------

## xoomix

And the printer ip info? With netmask, etc. ?

----------

## abhichan

This is the IP address..but what do u mean by netmask...

169.254.179.139

----------

## timeBandit

Something doesn't make sense here. You've stated that your printer is connected to your home computer via a "network cable." This implies a network interface card in your computer is connected directly to the printer.

You've also stated you are logged in to your home PC via SSH from your office. This implies a network interface card in your computer is connected to a broadband modem and/or router, to receive your incoming connection. Unless you only have a dial-up connection to the internet?

A single network card cannot be connected to both the printer and a modem. Your ifconfig output shows only one network interface. Is there a router in the picture, and are the printer and computer both connected to that?

EDIT: That IP address is on a different subnet, your computer likely can't see it. You need to change the printer's address to an unused adddress on the 192.168.40.x subnet.

----------

## abhichan

Okay, the printer and computer are connected to the network thru a router...Now how do i assign the IP address 192.* to the printer....

----------

## xoomix

Through the printer's control panel.

----------

## timeBandit

Setting the IP address should be outlined in the printer manual. Download it from HP if you don't have a copy. I'm not familiar with that printer model, and while I'm willing to help I won't go that far.   :Smile:  If possible, it might be easiest to configure the printer to get its address from the router via DHCP.

There is another poblem awaiting you, in your CUPS configuration for the printer:

```
DeviceURI http://68.73.151.68:631/hpnew 
```

That address is also not on your local network. How did you/CUPS find it? To me, it looks like the external address of your broadband modem--that is, your ISP's address for your modem/router.

Once you can ping the printer, you should reconfigure CUPS to get the proper address of the printer.

----------

## abhichan

Okay, lets say I can change the IP address...do i need to change the 'subnet mask' and 'default gateway' settings...if so what will i change it to

----------

## xoomix

Basic networking - it'll have to be the same as your Linux server's settings.

----------

## abhichan

okay so i changed the ip address of my printer to 192.68.40.100 and changed the default gateway and subnet mask settings as well...but I am not still not able to ping to my printer....

----------

## xoomix

If you're subnet mask and gateway are the same as your PC's, and you still can't ping it, then you're looking at a possible:

1. Bad JetDirect Card on the printer (or simply not plugged into the slot fully, etc. - Might want to try to do a factory reset of the card and then re-configure with proper network settings. You also usually have to turn TCP/IP to *ON* in the printer menu

2. Bad cabling 

3. Bad switch/hub/router

4. Incorrect gateway setting on pc/printer or both - make sure at least your pc can ping it's own gateway that is set up

----------

