google / cloud-print-connector

Google Cloud Print Connector
BSD 3-Clause "New" or "Revised" License
764 stars 184 forks source link

Printers are already in sync; there are 0 #399

Open david-sitsky opened 6 years ago

david-sitsky commented 6 years ago

I've read the entry in https://github.com/google/cloud-print-connector/wiki/Common-problems about the "Printers are already in sync; there are 0" message which I indeed see on my Raspberry PI (Linux pi1 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux) every minute from my /tmp/cloud-print-connector log:

I [12/Feb/2018:04:44:37 +0000] Synchronizing printers, stand by
I [12/Feb/2018:04:44:37 +0000] Printers are already in sync; there are 0
I [12/Feb/2018:04:45:37 +0000] Synchronizing printers, stand by
I [12/Feb/2018:04:45:38 +0000] Printers are already in sync; there are 0
I [12/Feb/2018:04:46:38 +0000] Synchronizing printers, stand by
I [12/Feb/2018:04:46:38 +0000] Printers are already in sync; there are 0
I [12/Feb/2018:04:47:38 +0000] Synchronizing printers, stand by
I [12/Feb/2018:04:47:38 +0000] Printers are already in sync; there are 0

The associated entries in /var/log/cups/error_log have:

D [12/Feb/2018:04:47:38 +0000] [Client 19] Accepted from localhost (Domain)
D [12/Feb/2018:04:47:38 +0000] [Client 19] Waiting for request.
D [12/Feb/2018:04:47:38 +0000] Report: clients=3
D [12/Feb/2018:04:47:38 +0000] Report: jobs=49
D [12/Feb/2018:04:47:38 +0000] Report: jobs-active=0
D [12/Feb/2018:04:47:38 +0000] Report: printers=1
D [12/Feb/2018:04:47:38 +0000] Report: stringpool-string-count=16141
D [12/Feb/2018:04:47:38 +0000] Report: stringpool-alloc-bytes=4024
D [12/Feb/2018:04:47:38 +0000] Report: stringpool-total-bytes=372232
D [12/Feb/2018:04:47:38 +0000] cupsd is not idle any more, canceling shutdown.
D [12/Feb/2018:04:47:38 +0000] [Client 19] OPTIONS * HTTP/1.1
D [12/Feb/2018:04:47:38 +0000] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [12/Feb/2018:04:47:38 +0000] [Client 19] No authentication data provided.
D [12/Feb/2018:04:47:38 +0000] [Client 19] Encrypting connection.
D [12/Feb/2018:04:47:38 +0000] Connection from localhost now encrypted.
D [12/Feb/2018:04:47:38 +0000] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
D [12/Feb/2018:04:47:38 +0000] cupsd is not idle any more, canceling shutdown.
D [12/Feb/2018:04:47:38 +0000] [Client 19] POST / HTTP/1.1
D [12/Feb/2018:04:47:38 +0000] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [12/Feb/2018:04:47:38 +0000] [Client 19] No authentication data provided.
D [12/Feb/2018:04:47:38 +0000] [Client 19] 2.0 CUPS-Get-Printers 17
D [12/Feb/2018:04:47:38 +0000] CUPS-Get-Printers
D [12/Feb/2018:04:47:38 +0000] [Client 19] Returning IPP successful-ok for CUPS-Get-Printers (no URI) from localhost
D [12/Feb/2018:04:47:38 +0000] [Client 19] Content-Length: 1767
D [12/Feb/2018:04:47:38 +0000] cupsd is not idle any more, canceling shutdown.
D [12/Feb/2018:04:47:38 +0000] [Client 19] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=1767, response=0x551b8710(IPP_IDLE), pipe_pid=0, file=-1
D [12/Feb/2018:04:47:38 +0000] [Client 19] Writing IPP response, ipp_state=DATA, old wused=0, new wused=0
D [12/Feb/2018:04:47:38 +0000] [Client 19] bytes=0, http_state=0, data_remaining=0
D [12/Feb/2018:04:47:38 +0000] [Client 19] Waiting for request.
D [12/Feb/2018:04:47:38 +0000] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
D [12/Feb/2018:04:47:38 +0000] cupsd is not idle any more, canceling shutdown.
D [12/Feb/2018:04:47:39 +0000] cupsd is not idle any more, canceling shutdown.
D [12/Feb/2018:04:47:39 +0000] [Client 19] HTTP_STATE_WAITING Closing on EOF
D [12/Feb/2018:04:47:39 +0000] [Client 19] Closing connection.
D [12/Feb/2018:04:47:39 +0000] SSL shutdown successful!
D [12/Feb/2018:04:47:39 +0000] cupsdSetBusyState: newbusy="Not busy", busy="Not busy"
D [12/Feb/2018:04:47:39 +0000] [Client 19] Waiting for socket close.
D [12/Feb/2018:04:47:39 +0000] cupsd is not idle any more, canceling shutdown.
D [12/Feb/2018:04:47:39 +0000] [Client 19] HTTP_STATE_WAITING Closing on EOF
D [12/Feb/2018:04:47:39 +0000] [Client 19] Closing connection.
D [12/Feb/2018:04:47:39 +0000] cupsdSetBusyState: newbusy="Not busy", busy="Not busy"
D [12/Feb/2018:04:47:39 +0000] cupsd is not idle any more, canceling shutdown.
D [12/Feb/2018:04:47:40 +0000] cupsd is not idle any more, canceling shutdown.

I do have my printer shared:

Brother_MFC-7340 (Idle, Accepting Jobs, Shared, Server Default)

And I have sharing enabled on my CUPS server too. Both "Share printers connected to this system" and "Allow printing from the Internet" are enabled.

Any ideas?

david-sitsky commented 6 years ago

By complete chance on the mailing list today this same issue was mentioned: https://groups.google.com/forum/#!topic/cloud-print-connector/5uRd_SoDxz0.

I discovered there is an option cups_ignore_raw_printers which by default is set to true and indeed I have a raw printer. I have set this to "false" and now I get:

[19/Feb/2018:03:34:27 +0000] [Printer Brother_MFC-7340] Failed to call cupsGetPPD3(): 1030 Not Found

I don't believe the drivers are supported out of the box for the PI which is why I had this set to RAW (which works fine for normal printing).

Is there a way around this?

kanreki commented 6 years ago

supply a PPD file to CUPS? (as I mentioned in the other thread, failing to do that was the blunder that I had made)

david-sitsky commented 6 years ago

I tried that, but I got this:

Idle - "File "/usr/lib/cups/filter/brlpdwrapperMFC7340" not available: No such file or directory"

Basically it is because there is no printer driver available out of the box for the MFC-7340 for the PI. So I had to use the RAW printer driver which works fine locally.

It is just the cloud print connector doesn't seem to support it.

On Tue, Feb 20, 2018 at 12:16 PM, kanreki notifications@github.com wrote:

supply a PPD file to CUPS? (as I mentioned in the other thread, failing to do that was the blunder that I had made)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/google/cloud-print-connector/issues/399#issuecomment-366840175, or mute the thread https://github.com/notifications/unsubscribe-auth/AEXRAan9BBRi163mofkhJugzRymj-21oks5tWhzhgaJpZM4SBsZQ .