Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Unable to print to network printer [solved]

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
11 posts • Page 1 of 1
Author
Message
alienjon
Veteran
Veteran
User avatar
Posts: 1740
Joined: Wed Feb 09, 2005 4:37 pm

Unable to print to network printer [solved]

  • Quote

Post by alienjon » Mon Mar 10, 2014 1:23 am

I've been fighting with this all day, but here's the gist of it all:

I have an xPrintServer - Home Edition connected to an HP 1200 Laserjet printer. For anyone who isn't familiar with this device, xPrintServer is basically a cell-phone sized print server that runs CUPS. The setup runs fine with everything else in the house (including my dual booted Windows 7 and my laptop that runs Kubuntu). Actually, in checking Kubuntu, the setup is identical to that of my Gentoo box (making me think that it's something not installed correctly in Gentoo as opposed to the printer's literal configuration in CUPS).

These are the details for the printer's setup:
Name: HP_LaserJet_1200_3
Description: HP LaserJet 1200 - xPrintServer
Location: xPrintServer-0080A398AA9F
Connection: ipp://xPrintServer-0080A398AA9F.local:631/printers/HP_LaserJet_1200_3
Driver: Current - Remote Printer

Basically, when CUPS is started (at boot time or if I /etc/init.d/cupsd restart) it is automatically detected (automatically generating the above information). If I try to print a test page, though, I get the following status error message:

Code: Select all

Processing - "Unable to locate printer "xPrintServer-0080A398AA9F.local"."
Here's some system info:

Code: Select all

[ebuild   R    ] net-print/cups-1.7.1  USE="X acl dbus gnutls pam ssl threads usb zeroconf -debug -java -kerberos -lprng-compat -python (-selinux) -static-libs -xinetd" LINGUAS="-ca -es -fr -it -ja -ru" PYTHON_SINGLE_TARGET="python2_7 -python2_6" PYTHON_TARGETS="python2_7 -python2_6" 0 kB
[ebuild   R    ] net-print/hplip-3.14.1  USE="X hpcups kde libnotify (policykit) qt4 snmp -doc -fax -hpijs -libusb0 -minimal -parport -scanner -static-ppds" PYTHON_SINGLE_TARGET="python2_7 -python2_6" PYTHON_TARGETS="python2_7 -python2_6" 0 kB
[ebuild   R    ] net-print/gutenprint-5.2.9  USE="cups foomaticdb gimp gtk nls ppds readline -static-libs" 0 kB

Code: Select all

W [09/Mar/2014:20:55:56 -0400] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [09/Mar/2014:20:55:56 -0400] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [09/Mar/2014:20:55:56 -0400] CreateDevice failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [09/Mar/2014:20:56:23 -0400] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [09/Mar/2014:20:56:23 -0400] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [09/Mar/2014:20:56:23 -0400] CreateDevice failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
A few things I've tried thus far:
1) I made minor changes to cupsd.conf (per a suggestion I'd seen in a thread elsewhere). This may have helped with the autodetection process (which wasn't working before, but it is now).

Code: Select all

Browsing On
BrowseLocalProtocols dnssd
2) Deleting the printer and manually entering the information that I believe to be correct (ie: http://192.168.1.145/printers/HP_LaserJet_1200_3, which is the recommended URL to use from the web-interface for the xPrintServer).
3) Installing gutenprint (in case it was a driver issue).

I also want to note that in the CUPS web interface, the automatically detected printer cannot be opened (ie: if I click any of the links to open the printer, I get a 'page not found' error).

These posts were helpful (and seem close to the mark) but the problem has persisted.

I know that the printer and xPrintServer are working fine and can interact with linux with no problem (as Kubuntu can connect and print). Additionally, the printer WILL print if I plug it into the Gentoo computer directly. It's only the network aspect that seems to glitch on me.
Last edited by alienjon on Thu Mar 20, 2014 1:33 am, edited 1 time in total.
Top
cboldt
Veteran
Veteran
User avatar
Posts: 1046
Joined: Wed Aug 24, 2005 2:54 pm

  • Quote

Post by cboldt » Mon Mar 10, 2014 11:37 am

I take from your description that the printer is connected to a network machine other than your Gentoo box.

Do you have a /etc/cups/client.conf file?

Code: Select all

ServerName xPrintServer's Network device name
Top
alienjon
Veteran
Veteran
User avatar
Posts: 1740
Joined: Wed Feb 09, 2005 4:37 pm

  • Quote

Post by alienjon » Mon Mar 10, 2014 11:17 pm

cboldt wrote:I take from your description that the printer is connected to a network machine other than your Gentoo box.
Yes, the printer is connected to an xPrintServer that runs serves CUPS.
cboldt wrote:Do you have a /etc/cups/client.conf file?
I do, and had actually messed around with it before, but with no luck. I decided to try again and attempted several iterations, though I've found no changes. I've tried both the IP address for the server (192.168.1.145) and the device name (xPrintServer-0080A398AA9F). Both respond to pings, though I noticed that the default address (when I pinged) xPrintServer-0080A398AA9F was an external address, for some reason. I tried updating /etc/hosts such that:

Code: Select all

192.168.1.145   xPrintServer-0080A398AA9F
but that also didn't effect anything. My current /etc/cups/client.oconf file is the default (it only contains the ServerName /run/cups/cups.sock entry) but below are the iterations I tried (With and without the change to /etc/hosts):

Code: Select all

192.168.1.1
192.168.1.145
192.168.1.145/printers
192.168.1.145/printers/HP_LaserJet_1200_3
http://192.168.1.145/printers/HP_LaserJet_1200_3
xPrintServer-0080A398AA9F
xPrintServer-0080A398AA9F/printers
xPrintServer-0080A398AA9F/printers/HP_LaserJet_1200_3
http://xPrintServer-0080A398AA9F/printers/HP_LaserJet_1200_3
For the hell of it, I included *:631* in there a few times for good measure, though little good it did me.

How does CUPS check for the network location of a printer? I wonder if I couldn't replicate the issue or find out exactly what CUPS is looking at when it tries to connect?

One last thing. I tried a combination of removing the 'automatically detected printer' and adding it manually, using ipp://192.168.1.145/printers/HP_LaserJet_1200_3, and a gutenprint PPD and got a 'processing %' leading to a notice that the document was able to render, but now I'm getting a "The configuration is incorrect or the printer no longer exists." for a status message. This feels both like the same error worded differently and progress at the same time.

I wonder if CUPS is having a hard time with the dnss protocol that is automatically detected (I'd seen that noted elsewhere, though from a few year ago, I believe). I'll play with this.
Top
cboldt
Veteran
Veteran
User avatar
Posts: 1046
Joined: Wed Aug 24, 2005 2:54 pm

  • Quote

Post by cboldt » Tue Mar 11, 2014 12:29 am

My network printer is hardcoded, in the client machines not connected to the printer, in /etc/cups/printers.conf. This avoids the need for "browsing."

There are lots of lines in there, many added by cups. The hardcoding of the printer is done by one line:

Code: Select all

DeviceURI ipp://hypoid/printers/HP2100-at-hypoid
The machine that has the printer connected to it is known as "hypoid." The cups installation on that machine names the default printer, also in /etc/cups/printers.conf, but the DeviceURI is the parallel port.

Code: Select all

<DefaultPrinter HP2100-at-hypoid>
...
DeviceURI parallel:/dev/lp0
...
</Printer>
IIRC, hard-coding the IP addy works fine, but from your description, there is no issue with resolving the machine name.

Printer names have to match, too. In my case, "HP2100-at-hypoid."

I'm no "network printing guru," but recently fixed a network won't print issue by adding one-liner client.conf files (which I'd had, then commented out, system kept working, new version of CUPS, followed by no joy printing over the network. Weird error messages, fiddling with printer scripts to track events, and found out both sides of the printer system - client and server - were attempting to prepare printer-ready code).

Can you view log files at the print server?
Top
cboldt
Veteran
Veteran
User avatar
Posts: 1046
Joined: Wed Aug 24, 2005 2:54 pm

  • Quote

Post by cboldt » Tue Mar 11, 2014 12:53 am

The way I understand the way CUPS works, client.conf is optional. The client.conf file in the client machine is a one liner, and I think all it does is shift preparing the page for printing, to the machine named in client.conf. ServerName does not so much tell CUPS where to send the file, as tell it WHAT to send. Took me a while to scope that out.

The DeviceURI line is in printers.conf. Even if you don't have a client.conf, , you can get action on the server machine if the DeviceURI named in the client machine's printers.conf points to an address that the network can resolve and transmit to. You should see action in the server's logs, if DeviceURI points to the correct machine, regardless of having or not having a client.conf file.

DeviceURI (always in printers.conf) is one way for CUPS to "detect" a remote printer.

On the client machine, the DeviceURI (in printers.conf) will point to ipp://MACHINE(or IP)/printers/PRINTERNAME

I noted in your first message, a reference in the logs to "xPrintServer-0080A398AA9F.local" I'd wonder where that "local" appendage came from, and if you were able to get rid of it.
Top
Mistwolf
Apprentice
Apprentice
Posts: 189
Joined: Wed Mar 07, 2007 2:06 am
Location: Edmonton, AB

  • Quote

Post by Mistwolf » Tue Mar 11, 2014 1:51 am

Are you running the cups-browsed daemon?

From the cups ebuild:
CUPS-1.6 no longer supports automatic remote printers or implicit classes via the CUPS, LDAP, or SLP protocols, i.e. \"network browsing\". You will have to find printers using zeroconf/avahi instead, enter the location manually, or run cups-browsed from net-print/cups-filters which re-adds that functionality as a separate daemon.
Hope this helps.
Top
alienjon
Veteran
Veteran
User avatar
Posts: 1740
Joined: Wed Feb 09, 2005 4:37 pm

  • Quote

Post by alienjon » Tue Mar 11, 2014 2:00 am

cboldt wrote:The way I understand the way CUPS works, client.conf is optional. The client.conf file in the client machine is a one liner, and I think all it does is shift preparing the page for printing, to the machine named in client.conf. ServerName does not so much tell CUPS where to send the file, as tell it WHAT to send. Took me a while to scope that out.
Interesting, I hadn't seen that only the one (first?) line of client.conf is read. I did try changing the one line (that before now was pointing to the cups socket) but to no avail. I tried both the URL and xPrintServer-0080A398AA9F (though not the several iterations noted previously - I could if you think this could still be the culprit, but I suspect it may lie elsewhere).
cboldt wrote:The DeviceURI line is in printers.conf. Even if you don't have a client.conf, , you can get action on the server machine if the DeviceURI named in the client machine's printers.conf points to an address that the network can resolve and transmit to. You should see action in the server's logs, if DeviceURI points to the correct machine, regardless of having or not having a client.conf file.
I'm going to post the contents of printers.conf below, in case it is helpful. At first glance it appears to be the same info I've seen elsewhere (in the CUPS web interface and the KDE printers configuration in systemsettings.

Code: Select all

# Printer configuration file for CUPS v1.7.1
# Written by cupsd on 2014-03-10 21:50
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
<Printer CUPS-PDF>
UUID urn:uuid:47660ad4-eefe-34e1-4bf7-4c70d54a6856
Info Virtual PDF Printer
Location Local Printer
MakeModel Generic CUPS-PDF Printer
DeviceURI cups-pdf:/
State Idle
StateTime 1394397809
Type 8450124
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
<Printer HP_LaserJet_1200_3>
UUID urn:uuid:eba4b951-3667-3bd8-465e-9ff170acdb04
Info HP LaserJet 1200 - xPrintServer
Location xPrintServer-0080A398AA9F
DeviceURI ipp://xPrintServer-0080A398AA9F:631/printers/HP_LaserJet_1200_3
State Idle
StateTime 1394502611
Type 6
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
Option cups-browsed true
</Printer>
cboldt wrote:I noted in your first message, a reference in the logs to "xPrintServer-0080A398AA9F.local" I'd wonder where that "local" appendage came from, and if you were able to get rid of it.
I noticed this previously, and wondered how it was added/who added it. I'd guess that this may be related to the xPrintServer piece, as I haven't seen it mentioned anywhere in regards to cups, but I also haven't seen it in any of the configurations for xPrintServer either. For the hell of it I tried removing it from printers.conf (despite the warning) but the result is still the same. Also, in my last post I mentioned pinging both the server's IP and URL and both get a response (though the URL by default returns an external one, interestingly). When I add *.local, however, I get an unknown host.
Top
alienjon
Veteran
Veteran
User avatar
Posts: 1740
Joined: Wed Feb 09, 2005 4:37 pm

  • Quote

Post by alienjon » Tue Mar 11, 2014 2:05 am

Mistwolf wrote:Are you running the cups-browsed daemon?
I am:

Code: Select all

* status: started

Code: Select all

[ebuild   R    ] net-dns/avahi-0.6.31-r2  USE="autoipd dbus gdbm gtk gtk3 howl-compat introspection ipv6 mdnsresponder-compat mono python qt4 utils -bookmarks -doc {-test}" PYTHON_TARGETS="python2_7 -python2_6" 0 kB
[ebuild   R    ] net-print/cups-filters-1.0.43-r1  USE="dbus foomatic jpeg png tiff zeroconf -perl -static-libs" 0 kB
Top
cboldt
Veteran
Veteran
User avatar
Posts: 1046
Joined: Wed Aug 24, 2005 2:54 pm

  • Quote

Post by cboldt » Tue Mar 11, 2014 1:30 pm

Code: Select all

man client.conf
You'll see that multiple lines are allowed, but there is only one instance of ServerName. The presence of the other configuration switches is used to negotiate connection and communication.

IMO, you need a client.conf file on the client machine (but not on the print server), and the ServerName line should point to the hostname-or-ip-address of the print server.

If you hard code the print destination, you don't need the browse-daemon, and any printing issues will be resolved outside of the browse-daemon setup. Browsing is great when the network is big, printers change, etc. You can get network printing to work without browsing, by hard-coding the DeviceURI for the destination printer (in printers.conf).

I've never dug into the details of the browse daemon, so I don't know if it is supposed to run on the server, the client, or has to be running on both. From your post, I infer (maybe incorrectly) you are running the browse-daemon on only the client.

Back to the behavior of CUPS across the network, my recent experience was failure to print from the client, but could print from the print server. By reading logs at the server, I could see that the client was passing SOMETHING to the server, but the server was throwing a print/filter error. That told me that the DeviceURI in printers.conf on the client machine was correct. I had to tinker with the filter scripts to figure out what the difference was between passing a print job from the client, vs. passing exactly the same job from the server. The key to making both jobs appear the same to the server, was to have a client.conf file on the client machine, pointing to the server machine. Now the print job looks the same to the server, no matter if it came from the client, or came from the server.

What does printers.conf on the server machine contain?

What happens when you issue the command `telnet xPrintServer-0080A398AA9F 631`? That is different from a "ping" in that it attempts to connect to port 631 at the hostname.

I don't understand exactly what you did when you "pinged" a URL, nor do I understand what you mean by the URL "returns an external one." You should get the same response when you `telnet hostname 631` as when you `telnet IP-address 631`. If you don't, then your hostname-to-IP-address resolver has an issue - and that is separate from CUPS.
Top
alienjon
Veteran
Veteran
User avatar
Posts: 1740
Joined: Wed Feb 09, 2005 4:37 pm

  • Quote

Post by alienjon » Thu Mar 13, 2014 3:01 am

I feel guilty that I haven't responded sooner and wanted to apologize. I'm doing some renovations in my house right now and the printer and network are somewhat in flux. I'll probably post in a few days when I am able to test out some of your suggestions. Thanks for all the feedback!
Top
alienjon
Veteran
Veteran
User avatar
Posts: 1740
Joined: Wed Feb 09, 2005 4:37 pm

  • Quote

Post by alienjon » Thu Mar 20, 2014 1:33 am

Sorry about the delay. It seems that there is good news all around. Firstly: my wife and I have nice new tile in the kitchen and carpet in the living room. Second: in plugging things back in and - in the process - getting a new router the problem seems to have resolved. Though a new router is in the picture, the only difference is that the print server now has a dynamically assigned address, whereas previously it was statically assigned by the router. I'm not sure why or how this would have caused Gentoo to have a problem with printer assignment, especially when my Kubuntu laptop didn't have the same issue, but it's working well now. Thanks for all the help!
Top
Post Reply

11 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic