You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Cups scheduler crashing when using lpadmin -p PRINTERNAME -o port-monitor=none on RAW queue #2639
I have writen my own port Monitor called pkpgcounter.
If i write it directli to printers.conf all is working fine.
But if i try to enable it or disable it with the command
lpadmin -p P012 -o port-monitor=none
or
lpadmin -p P012 -o port-monitor=pkpgcounter
The cups process is died.
As a sideinfo i have only raw queues, and the filter is
counting pages using the python pkpgcounter on the raw streams,
(please don't say portmonitor's aren't supportet on raw queues,
i need this feature! and it's working if i enable it on printers.conf)
but it doesnt matter if the command is called whit my own filter
or with none or one of the standard filter.
If i try to enalbe it on a normal queue (with ppd file),
the lpadmin the comment is
lpadmin: Bad port-monitor "pkpgcounter"!
Here the output from my command:
lpadmin -p P012 -o port-monitor=none
lpadmin: Unknown
Here the relevant log cups/error_log with loglevel debug:
D [20/Dec/2007:09:36:22 +0100] [Job 367314] Loading from cache...
D [20/Dec/2007:09:36:22 +0100] [Job 367315] Loading from cache...
D [20/Dec/2007:09:36:22 +0100] [Job 367316] Loading from cache...
I [20/Dec/2007:09:36:22 +0100] Full reload complete.
I [20/Dec/2007:09:36:22 +0100] Cleaning out old temporary files in "/var/spool/cups/tmp"...
I [20/Dec/2007:09:36:22 +0100] Listening to 0.0.0.0:631 on fd 3...
E [20/Dec/2007:09:36:22 +0100] Unable to open listen socket for address :::631 - Address family not supported by protocol.
I [20/Dec/2007:09:36:22 +0100] Listening to /var/run/cups/cups.sock on fd 4...
I [20/Dec/2007:09:36:22 +0100] Resuming new connection processing...
D [20/Dec/2007:09:36:31 +0100] cupsdAcceptClient: 7 from localhost (Domain)
D [20/Dec/2007:09:36:31 +0100] cupsdReadClient: 7 POST / HTTP/1.1
D [20/Dec/2007:09:36:31 +0100] cupsdAuthorize: No authentication data provided.
D [20/Dec/2007:09:36:31 +0100] Get-Printer-Attributes ipp://localhost/printers/P012
D [20/Dec/2007:09:36:31 +0100] cupsdProcessIPPRequest: 7 status_code=0 (successful-ok)
D [20/Dec/2007:09:36:31 +0100] cupsdAcceptClient: 9 from localhost (Domain)
D [20/Dec/2007:09:36:31 +0100] cupsdReadClient: 9 POST / HTTP/1.1
D [20/Dec/2007:09:36:31 +0100] cupsdAuthorize: No authentication data provided.
D [20/Dec/2007:09:36:31 +0100] Get-Printer-Attributes ipp://localhost/printers/P012
D [20/Dec/2007:09:36:31 +0100] cupsdProcessIPPRequest: 9 status_code=0 (successful-ok)
D [20/Dec/2007:09:36:31 +0100] cupsdReadClient: 9 GET /printers/P012.ppd HTTP/1.1
D [20/Dec/2007:09:36:31 +0100] cupsdAuthorize: No authentication data provided.
D [20/Dec/2007:09:36:31 +0100] cupsdSendError: 9 code=404 (Not Found)
D [20/Dec/2007:09:36:31 +0100] cupsdCloseClient: 9
D [20/Dec/2007:09:36:31 +0100] cupsdReadClient: 7 POST /admin/ HTTP/1.1
D [20/Dec/2007:09:36:31 +0100] cupsdAuthorize: No authentication data provided.
D [20/Dec/2007:09:36:31 +0100] CUPS-Add-Modify-Printer ipp://localhost/printers/P012
D [20/Dec/2007:09:36:31 +0100] cupsdIsAuthorized: username=""
E [20/Dec/2007:09:36:31 +0100] CUPS-Add-Modify-Printer: Unauthorized
D [20/Dec/2007:09:36:31 +0100] cupsdSendError: 7 code=401 (Unauthorized)
D [20/Dec/2007:09:36:31 +0100] cupsdSendHeader: WWW-Authenticate: Basic realm="CUPS"
D [20/Dec/2007:09:36:31 +0100] cupsdCloseClient: 7
D [20/Dec/2007:09:36:31 +0100] cupsdAcceptClient: 7 from localhost (Domain)
D [20/Dec/2007:09:36:31 +0100] cupsdReadClient: 7 POST /admin/ HTTP/1.1
D [20/Dec/2007:09:36:31 +0100] cupsdAuthorize: Authorized as root using Local
D [20/Dec/2007:09:36:31 +0100] CUPS-Add-Modify-Printer ipp://localhost/printers/P012
D [20/Dec/2007:09:36:31 +0100] cupsdIsAuthorized: username="root"
I confirm the Version, it's the newes CUPS 1.3.5
on gentoo linux.
Plese see this output:
chsfsr00048 ~ # cups-config --version
1.3.5
And as i written, the crash ocus on raw queues.
And lpadmin shuld look on the monitor directory,
on non raw queues it say's:
chsfsr00048 ~ # lpadmin -p chsfspr0687 -o port-monitor=pkpgcounter
lpadmin: Bad port-monitor "pkpgcounter"!
But if i eneble it manuali on printers.conf,
it's working fine.
Port monitors are purposely only supported for queues with PPD files.
While we definitely want to fix the raw queue issue, we will not be supporting port monitors with raw queues. If you want a filter for a "raw" queue, create an interface script or a dummy PPD that runs the filter for all file types.
Activity
michaelrsweet commentedon Dec 20, 2007
CUPS.org User: mike
Please confirm the version - this issue should have been fixed in CUPS 1.3.5.
michaelrsweet commentedon Dec 21, 2007
CUPS.org User: nerve
I confirm the Version, it's the newes CUPS 1.3.5
on gentoo linux.
Plese see this output:
chsfsr00048 ~ # cups-config --version
1.3.5
And as i written, the crash ocus on raw queues.
And lpadmin shuld look on the monitor directory,
on non raw queues it say's:
chsfsr00048 ~ # lpadmin -p chsfspr0687 -o port-monitor=pkpgcounter
lpadmin: Bad port-monitor "pkpgcounter"!
But if i eneble it manuali on printers.conf,
it's working fine.
Thank's for looking.
Daniel
michaelrsweet commentedon Dec 21, 2007
CUPS.org User: mike
Port monitors are purposely only supported for queues with PPD files.
While we definitely want to fix the raw queue issue, we will not be supporting port monitors with raw queues. If you want a filter for a "raw" queue, create an interface script or a dummy PPD that runs the filter for all file types.
michaelrsweet commentedon Jan 8, 2008
CUPS.org User: mike
Fixed in Subversion repository.
michaelrsweet commentedon Jan 8, 2008
"str2639.patch":
Index: scheduler/ipp.c
--- scheduler/ipp.c (revision 7178)
+++ scheduler/ipp.c (working copy)
@@ -2407,12 +2407,15 @@
{
send_ipp_status(con, IPP_NOT_POSSIBLE, _("Bad port-monitor "%s"!"),
attr->values[0].string.text);