WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: (solved) how to make persistent a network printer?  (Read 11305 times)

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
(solved) how to make persistent a network printer?
« on: January 02, 2014, 12:23:35 PM »
hello,
on a raspberry pi server, I have a HP 4110 all-in-one printer connected. It can be accessed by a PC with CUPS and the link
https://192.168.178.50:631/printers/HP_officejet_4100_series
On my notebook asus and ubuntu 12.04 I already installed that network printer.
I am now installing that network printer on my HP7100 with TimyCoreLinux.
How to make that printer persistent accross reboot in TinyCore? (I already achieved the persistence of a local PDF printer.. but not of that printer).
After the installation with the CUPS browser, I dont see any PPD file to backup and the printer is not coming into "gnumeric" or other applications (despite loaded HPLIP extension).
Any help is welcome.
« Last Edit: February 10, 2014, 05:02:41 PM by floppy »
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14740
Re: how to make persistent a network printer?
« Reply #1 on: January 02, 2014, 02:55:51 PM »
If you take a look at the libcups info file, you might not need the cups or hplip extensions at all for printing from apps like gnumeric to a cups print server.

I don't believe you need the hplip extension anyway from a cups client.

You could always try:
Code: [Select]
$ touch mymarker
[install printer on cups client]
$ sudo find / -not -type 'd' -cnewer mymarker | grep -v "\/proc\/" | grep -v "^\/sys\/" | tee files
$ vi files
..and check to see which files were created in order to make the printer installation persistant.
« Last Edit: January 02, 2014, 02:57:38 PM by Juanito »

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: how to make persistent a network printer?
« Reply #2 on: January 03, 2014, 10:23:51 AM »
I deleted the hplip extension. I kept cups because I need a pdf-printer.
There is a progress by installing the "cups-browsed" extension after looking at the cups info files. It seems the network printer is found now. But still no print is possible (see error below). I am searching why. Any idea is welcome.

in http://localhost:631/printers/
1. HP_officejet_4100_series   HP officejet 4100 series   druckerprinterserverraspberrypi.fritz.box   Remote Printer   Idle - "Unable to get printer status."
2. Virtual_PDF_Printer   Virtual PDF Printer   xxxx   Generic CUPS-PDF Printer   Idle

The /var/log/cups/error_log
Code: [Select]
E [04/Jan/2014:17:31:24 +0000] cupsdLoadBanners: Unable to open banner directory "/usr/local/share/cups/banners": No such file or directory
W [04/Jan/2014:17:31:24 +0000] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [04/Jan/2014:17:31:24 +0000] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [04/Jan/2014:17:31:24 +0000] CreateDevice failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
E [04/Jan/2014:17:31:24 +0000] Unable to open listen socket for address [v1.::1]:631 - Address family not supported by protocol.
E [04/Jan/2014:17:31:30 +0000] cupsdLoadBanners: Unable to open banner directory "/usr/local/share/cups/banners": No such file or directory
W [04/Jan/2014:17:31:30 +0000] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [04/Jan/2014:17:31:30 +0000] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [04/Jan/2014:17:31:30 +0000] CreateDevice failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
E [04/Jan/2014:17:31:30 +0000] Unable to open listen socket for address [v1.::1]:631 - Address family not supported by protocol.
« Last Edit: January 04, 2014, 12:39:04 PM by floppy »
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: how to make persistent a network printer?
« Reply #3 on: January 15, 2014, 07:30:40 AM »
HI: Cups and printers are not a walk in park with TinyCore. I spent weeks producing error messages within the log files.
In your case I think it is a driver problem. Cups is a client and a server. The server needs the driver to work with the printer. Once the server sees the printer and can output to the printer, the client can access and print on that server without a driver. (this is when the client is on a remote pc)
So the first thing is get the printer drivers working. This, for me was the hardest part.
As far as I know the hplip extension is just a collection of drivers and your printer must be listed in that extension. If not, drivers will not work.
What I said here must not be 100% accurate but I just trying to help. Have a good day.
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: how to make persistent a network printer?
« Reply #4 on: January 25, 2014, 01:45:43 PM »
the cups errors on the server (due to the client not working) are coming..

Code: [Select]
E [04/Jan/2014:00:17:21 +0100] Unable to open listen socket for address [v1.::]:631 - Address family not supported by protocol.
E [04/Jan/2014:18:28:36 +0100] [cups-deviced] PID 2378 (snmp) stopped with status 1!
E [04/Jan/2014:18:34:17 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:18:34:26 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:18:34:27 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:18:34:28 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:18:34:29 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:18:34:29 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:18:39:58 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:18:40:08 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:18:40:10 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:18:40:10 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:18:40:10 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:18:40:55 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:18:40:55 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:18:40:55 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:18:40:55 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:18:41:09 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:18:41:09 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [04/Jan/2014:23:36:09 +0100] [cups-deviced] PID 2598 (snmp) stopped with status 1!
E [04/Jan/2014:23:36:14 +0100] SSL shutdown failed: Error in the push function.
E [04/Jan/2014:23:37:08 +0100] [cups-deviced] PID 2632 (snmp) stopped with status 1!
E [04/Jan/2014:23:37:23 +0100] SSL shutdown failed: Error in the push function.
E [04/Jan/2014:23:37:37 +0100] [cups-deviced] PID 2658 (snmp) stopped with status 1!
W [04/Jan/2014:23:38:56 +0100] failed to CreateProfile: org.freedesktop.ColorManager.AlreadyExists:profile id 'HP_officejet_4100_series-Gray..' already exists
W [04/Jan/2014:23:38:56 +0100] failed to CreateProfile: org.freedesktop.ColorManager.AlreadyExists:profile id 'HP_officejet_4100_series-RGB..' already exists
W [04/Jan/2014:23:38:56 +0100] failed to CreateDevice: org.freedesktop.ColorManager.AlreadyExists:device id 'cups-HP_officejet_4100_series' already exists
W [04/Jan/2014:23:38:56 +0100] failed to CreateProfile: org.freedesktop.ColorManager.AlreadyExists:profile id 'HP_officejet_4100_series-Gray..' already exists
W [04/Jan/2014:23:38:56 +0100] failed to CreateProfile: org.freedesktop.ColorManager.AlreadyExists:profile id 'HP_officejet_4100_series-RGB..' already exists
W [04/Jan/2014:23:38:56 +0100] failed to CreateDevice: org.freedesktop.ColorManager.AlreadyExists:device id 'cups-HP_officejet_4100_series' already exists
W [04/Jan/2014:23:39:01 +0100] failed to CreateProfile: org.freedesktop.ColorManager.AlreadyExists:profile id 'HP_officejet_4100_series-Gray..' already exists
W [04/Jan/2014:23:39:01 +0100] failed to CreateProfile: org.freedesktop.ColorManager.AlreadyExists:profile id 'HP_officejet_4100_series-RGB..' already exists
W [04/Jan/2014:23:39:01 +0100] failed to CreateDevice: org.freedesktop.ColorManager.AlreadyExists:device id 'cups-HP_officejet_4100_series' already exists
W [04/Jan/2014:23:39:01 +0100] failed to CreateProfile: org.freedesktop.ColorManager.AlreadyExists:profile id 'HP_officejet_4100_series-Gray..' already exists
W [04/Jan/2014:23:39:01 +0100] failed to CreateProfile: org.freedesktop.ColorManager.AlreadyExists:profile id 'HP_officejet_4100_series-RGB..' already exists
W [04/Jan/2014:23:39:01 +0100] failed to CreateDevice: org.freedesktop.ColorManager.AlreadyExists:device id 'cups-HP_officejet_4100_series' already exists
E [04/Jan/2014:23:50:48 +0100] Avahi client failed, closing client to allow a clean restart
E [04/Jan/2014:23:51:07 +0100] Unable to open listen socket for address [v1.::]:631 - Address family not supported by protocol.
E [06/Jan/2014:13:27:28 +0100] Unable to encrypt connection from 192.168.178.23 - A TLS packet with unexpected length was received.
E [06/Jan/2014:22:52:57 +0100] Unable to encrypt connection from 192.168.178.23 - A TLS packet with unexpected length was received.
E [06/Jan/2014:22:52:57 +0100] Unable to encrypt connection from 192.168.178.23 - A TLS packet with unexpected length was received.
E [06/Jan/2014:22:52:57 +0100] Unable to encrypt connection from 192.168.178.23 - A TLS packet with unexpected length was received.
E [06/Jan/2014:22:52:57 +0100] Unable to encrypt connection from 192.168.178.23 - A TLS packet with unexpected length was received.
E [06/Jan/2014:22:52:57 +0100] SSL shutdown failed: Error in the push function.
E [06/Jan/2014:22:57:06 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [06/Jan/2014:22:58:09 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [06/Jan/2014:22:59:05 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [06/Jan/2014:22:59:08 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [06/Jan/2014:23:13:49 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [06/Jan/2014:23:13:53 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [06/Jan/2014:23:56:39 +0100] Avahi client failed, closing client to allow a clean restart
E [06/Jan/2014:23:56:58 +0100] Unable to open listen socket for address [v1.::]:631 - Address family not supported by protocol.
E [11/Jan/2014:19:06:07 +0100] SSL shutdown failed: Error in the push function.
E [12/Jan/2014:00:01:52 +0100] Avahi client failed, closing client to allow a clean restart
E [12/Jan/2014:00:02:12 +0100] Unable to open listen socket for address [v1.::]:631 - Address family not supported by protocol.
E [12/Jan/2014:23:41:36 +0100] Avahi client failed, closing client to allow a clean restart
E [12/Jan/2014:23:41:56 +0100] Unable to open listen socket for address [v1.::]:631 - Address family not supported by protocol.
E [14/Jan/2014:00:00:47 +0100] Avahi client failed, closing client to allow a clean restart
E [14/Jan/2014:00:01:07 +0100] Unable to open listen socket for address [v1.::]:631 - Address family not supported by protocol.
E [18/Jan/2014:17:42:26 +0100] [Job 63] Stopping unresponsive job!
E [18/Jan/2014:22:52:44 +0100] Avahi client failed, closing client to allow a clean restart
E [18/Jan/2014:22:53:03 +0100] Unable to open listen socket for address [v1.::]:631 - Address family not supported by protocol.
E [20/Jan/2014:06:55:47 +0100] Avahi client failed, closing client to allow a clean restart
E [20/Jan/2014:06:56:06 +0100] Unable to open listen socket for address [v1.::]:631 - Address family not supported by protocol.
E [25/Jan/2014:00:49:48 +0100] Avahi client failed, closing client to allow a clean restart
E [25/Jan/2014:00:50:08 +0100] Unable to open listen socket for address [v1.::]:631 - Address family not supported by protocol.
W [25/Jan/2014:17:38:41 +0100] failed to CreateProfile: org.freedesktop.ColorManager.AlreadyExists:profile id 'HP_officejet_4100_series-Gray..' already exists
W [25/Jan/2014:17:38:41 +0100] failed to CreateProfile: org.freedesktop.ColorManager.AlreadyExists:profile id 'HP_officejet_4100_series-RGB..' already exists
W [25/Jan/2014:17:38:41 +0100] failed to CreateDevice: org.freedesktop.ColorManager.AlreadyExists:device id 'cups-HP_officejet_4100_series' already exists
W [25/Jan/2014:17:38:42 +0100] failed to CreateProfile: org.freedesktop.ColorManager.AlreadyExists:profile id 'HP_officejet_4100_series-Gray..' already exists
W [25/Jan/2014:17:38:42 +0100] failed to CreateProfile: org.freedesktop.ColorManager.AlreadyExists:profile id 'HP_officejet_4100_series-RGB..' already exists
W [25/Jan/2014:17:38:42 +0100] failed to CreateDevice: org.freedesktop.ColorManager.AlreadyExists:device id 'cups-HP_officejet_4100_series' already exists
E [25/Jan/2014:17:39:41 +0100] Avahi client failed, closing client to allow a clean restart
E [25/Jan/2014:17:40:00 +0100] Unable to open listen socket for address [v1.::]:631 - Address family not supported by protocol.
E [25/Jan/2014:19:06:33 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [25/Jan/2014:19:06:38 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [25/Jan/2014:19:24:59 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [25/Jan/2014:19:25:00 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [25/Jan/2014:19:25:23 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [25/Jan/2014:19:28:33 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [25/Jan/2014:19:28:41 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [25/Jan/2014:19:28:42 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [25/Jan/2014:19:28:47 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [25/Jan/2014:19:28:47 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [25/Jan/2014:19:28:54 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [25/Jan/2014:19:39:07 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [25/Jan/2014:19:39:10 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [25/Jan/2014:19:39:10 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
E [25/Jan/2014:19:39:10 +0100] Request from "192.168.178.23" using invalid Host: field "druckerprinterserverraspberrypi.fritz.box:631"
I am still searching..
« Last Edit: February 05, 2014, 06:21:18 AM by floppy »
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: how to make persistent a network printer?
« Reply #5 on: February 05, 2014, 06:20:29 AM »
the error_log on the client show:
Code: [Select]
cupsdLoadBanners: Unable to open banner directory "/usr/local/share/cups/banners": No such file or directoryI will search why.
Perhaps should I install the printer driver on the client for making a print on the server working? (like my nc10 netbook with windows7).

Furthermore, a webbrowser to "http://druckerprinterserverraspberrypi.fritz.box:631/printers/HP_officejet_4100_series" on the client says:
Code: [Select]
Firefox can't establish a connection to the server at druckerprinterserverraspberrypi.fritz.box:631That webbrowser on the client find the "https://192.168.178.50:631/printers/HP_officejet_4100_series" which is the same than above.
So, during the linking of the printer on the server to the client (with cups-browsed etc), it seems the "druckerprinterserverraspberrypi.fritz.box:631" is created but the system dont remember by a new boot this is the "https://192.168.178.50:631/printers/HP_officejet_4100_series" ?.
I will further think in that direction.

by looking at the "http://localhost:631/printers/HP_officejet_4100_series?ORDER=asc&QUERY=" the printer is coming:
HP_officejet_4100_series (Idle, Accepting Jobs, Not Shared)
Description:   HP officejet 4100 series
Location:   druckerprinterserverraspberrypi.fritz.box
Driver:   Remote Printer (grayscale)
Connection:   ipp://druckerprinterserverraspberrypi.fritz.box:631/printers/HP_officejet_4100_series
Defaults:   job-sheets={job_sheets_default} media=unknown
but a "admin  modify printer" is not possible because it jumps into "http://druckerprinterserverraspberrypi.fritz.box:631/admin/" with the result of
Code: [Select]
Bad RequestAny Idea is welcome.

I will dig in the direction given here http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530027
ServerAlias
ServerName

parameters seems to be the key for success. So, it seems to be a pure CUPS parameter topic in newer version (due to avahi?). By googling >> Request from using invalid Host: field << some users seems to know the solving. http://www.papercut.com/kb/Main/CupsHostError or http://superuser.com/questions/90857/ubuntu-9-10-cups-server-cupsd-conf ...
I have to implement and to test.
« Last Edit: February 09, 2014, 11:24:31 AM by floppy »
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: how to make persistent a network printer?
« Reply #6 on: February 10, 2014, 05:02:23 PM »
DONE!
In the cupsd.conf of the server, I had to include

#-----------  to be included into the cupsd.conf file of the server -------
# see http://www.cups.org/documentation.php/doc-1.6/ref-cupsd-conf.html?VERSION=1.6&Q=
ServerAlias *
# druckerprinterserverraspberrypi.fritz.box has to be adapted to the name you want
ServerName druckerprinterserverraspberrypi.fritz.box
#-----------------------------------------------------------------------------------------

and it works. So, the cups manual was already indicating the solution.

Now:
- I have a printerserver raspberry pi with an hp4110 connected to it (latops, pcs, win7 pc can print to it via wifi or LAN)
- I have local PDF printers on the PCs
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: (solved) how to make persistent a network printer?
« Reply #7 on: February 18, 2014, 11:58:10 AM »
Update: for the reason my ubuntu asus notebook stopped working, I modified the file below, deleted the printer of the client and re-installed again on the client.
Now it works on my ubuntu asus laptop and hp7110 with tinycore.
The reason? Dont know. Perhaps I should have had deleted and re-installed the network printer on the notebook client. Or perhaps the "ServerAlias *" was not so good for the ubuntu client. The new "ServerAlias ..." works.

#-----------  to be included into the cupsd.conf file of the server -------
# see http://www.cups.org/documentation.php/doc-1.6/ref-cupsd-conf.html?VERSION=1.6&Q=
#ServerAlias * .. to be changed in ..
ServerAlias druckerprinterserverraspberrypi.fritz.box
# druckerprinterserverraspberrypi.fritz.box has to be adapted to the name you want
ServerName druckerprinterserverraspberrypi.fritz.box
#-----------------------------------------------------------------------------------------
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed