How to run cups commands inside a snap

I’m using this CUPS snap version:

cups 2.4.6-1 962 latest/stable openprinting** -

This is the very latest one.

This is an excerpt of your posted error_log. Have a look at the third line of it (Unable to ...). This seems to be a bug in libsnapd-glib, in the client code for a snapped application to talk with snapd. It seems to have appeared in newer libsnapd-glib versions as they come with core22, the snapd of core20 was working correctly here. I have observed the same bug when I recently updated the CUPS Snap still before switching to core20 but using a too new libsnapd-glib. After using the correct libsnapd-glib the bug went away, and then some days ago I switched to core22 and now the bug shows up again.

@drcoccodrillus, could you please switch the “cups” Snap to the Edge channel and let it update to 2.4.6-2 (will arrive in the Snap Store in around 15 min, at least for amd64).

Do

sudo snap refresh --edge cups

Check the version via

snap list | grep cups

Once on the CUPS Snap 2.4.6-2 please repeat the test of

snap connect printer-admin:cups-control cups:cups-server

Does your app (and all steps I asked for) now work?

Here I am.

I installed the new cups snap from the edge channel.

This is the output when running snap list | grep cups

cups 2.4.6-2 965 latest/edge openprinting** -

Now my printer-admin snap seems working fine. In fact, I see the result of lpinfo -v appearing in my log file:

cat /var/snap/gaap-utils/common/printer_init.log

Tue Jun 27 14:01:05 CEST 2023 - usb://C56/Thermal%20Printer?serial=<UNUSED> - printer initiated

The above printer URI in the log file is coming from lpinfo. For what I see, I believe that things are working now.

Furthermore, from /var/snap/cups/current/var/log/error_log now I see nice things:

D [27/Jun/2023:14:20:49 +0200] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [27/Jun/2023:14:20:49 +0200] [Client 405] Server address is "/var/snap/cups/common/run/cups.sock".
D [27/Jun/2023:14:20:49 +0200] [Client 405] Accepted from localhost (Domain)
D [27/Jun/2023:14:20:49 +0200] [Client 405] Waiting for request.
D [27/Jun/2023:14:20:49 +0200] Expiring subscriptions...
D [27/Jun/2023:14:20:49 +0200] [Client 405] POST / HTTP/1.1
D [27/Jun/2023:14:20:49 +0200] cupsdSetBusyState: newbusy="Active clients", busy="Active clients"
D [27/Jun/2023:14:20:49 +0200] [Client 405] Read: status=200, state=6
D [27/Jun/2023:14:20:49 +0200] [Client 405] No authentication data provided.
D [27/Jun/2023:14:20:49 +0200] [Client 405] 2.0 CUPS-Get-Devices 1
D [27/Jun/2023:14:20:49 +0200] CUPS-Get-Devices
D [27/Jun/2023:14:20:49 +0200] cupsdIsAuthorized: username=""
D [27/Jun/2023:14:20:49 +0200] [Client 405] Returning HTTP Unauthorized for CUPS-Get-Devices (no URI) from localhost
D [27/Jun/2023:14:20:49 +0200] [Client 405] cupsdSendHeader: code=401, type="text/html", auth_type=0
D [27/Jun/2023:14:20:49 +0200] [Client 405] WWW-Authenticate: Basic realm=\"CUPS\", PeerCred, Local trc=\"y\"
D [27/Jun/2023:14:20:49 +0200] [Client 405] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
D [27/Jun/2023:14:20:49 +0200] [Client 405] Closing connection.
D [27/Jun/2023:14:20:49 +0200] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
D [27/Jun/2023:14:20:49 +0200] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [27/Jun/2023:14:20:49 +0200] [Client 406] Server address is "/var/snap/cups/common/run/cups.sock".
D [27/Jun/2023:14:20:49 +0200] [Client 406] Accepted from localhost (Domain)
D [27/Jun/2023:14:20:49 +0200] [Client 406] Waiting for request.
D [27/Jun/2023:14:20:49 +0200] cupsdSetBusyState: newbusy="Active clients", busy="Active clients"
D [27/Jun/2023:14:20:49 +0200] [Client 407] Server address is "/var/snap/cups/common/run/cups.sock".
D [27/Jun/2023:14:20:49 +0200] [Client 407] Accepted from localhost (Domain)
D [27/Jun/2023:14:20:49 +0200] [Client 407] Waiting for request.
D [27/Jun/2023:14:20:49 +0200] [Client 406] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
D [27/Jun/2023:14:20:49 +0200] [Client 406] Closing connection.
D [27/Jun/2023:14:20:49 +0200] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
D [27/Jun/2023:14:20:49 +0200] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [27/Jun/2023:14:20:49 +0200] [Client 408] Server address is "/var/snap/cups/common/run/cups.sock".
D [27/Jun/2023:14:20:49 +0200] [Client 408] Accepted from localhost (Domain)
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for request.
D [27/Jun/2023:14:20:49 +0200] [Client 407] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
D [27/Jun/2023:14:20:49 +0200] [Client 407] Closing connection.
D [27/Jun/2023:14:20:49 +0200] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
D [27/Jun/2023:14:20:49 +0200] [Client 408] POST / HTTP/1.1
D [27/Jun/2023:14:20:49 +0200] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [27/Jun/2023:14:20:49 +0200] [Client 408] Read: status=200, state=6
D [27/Jun/2023:14:20:49 +0200] [Client 408] Authorized as root using PeerCred.
D [27/Jun/2023:14:20:49 +0200] [Client 408] 2.0 CUPS-Get-Devices 1
D [27/Jun/2023:14:20:49 +0200] CUPS-Get-Devices
D [27/Jun/2023:14:20:49 +0200] cupsdIsAuthorized: username="root"
D [27/Jun/2023:14:20:49 +0200] [Client 408] AppArmor profile is 'snap.printer-admin.printer-init'.
D [27/Jun/2023:14:20:49 +0200] [Client 408] Snap with cups-control plug - allowed.
D [27/Jun/2023:14:20:49 +0200] [CGI] argv[0] = "/snap/cups/965/lib/cups/daemon/cups-deviced"
D [27/Jun/2023:14:20:49 +0200] [CGI] argv[1] = "1"
D [27/Jun/2023:14:20:49 +0200] [CGI] argv[2] = "0"
D [27/Jun/2023:14:20:49 +0200] [CGI] argv[3] = "15"
D [27/Jun/2023:14:20:49 +0200] [CGI] argv[4] = "584788"
D [27/Jun/2023:14:20:49 +0200] [CGI] argv[5] = "requested-attributes=all"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[0] = "CUPS_CACHEDIR=/var/snap/cups/965/var/cache"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[1] = "CUPS_DATADIR=/snap/cups/965/share/cups"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[2] = "CUPS_DOCROOT=/snap/cups/965/share/cups/doc"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[3] = "CUPS_REQUESTROOT=/var/snap/cups/965/var/spool"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[4] = "CUPS_SERVERBIN=/snap/cups/965/lib/cups"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[5] = "CUPS_SERVERROOT=/var/snap/cups/common/etc/cups"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[6] = "CUPS_STATEDIR=/var/snap/cups/965/var/run"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[7] = "HOME=/var/snap/cups/965/var/spool/tmp"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[8] = "LD_LIBRARY_PATH=/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void:/snap/cups/965/lib:/snap/cups/965/usr/lib:/snap/cups/965/lib/x86_64-linux-gnu:/snap/cups/965/usr/lib/x86_64-linux-gnu"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[9] = "PATH=/snap/cups/965/lib/cups/filter:/snap/cups/965/usr/sbin:/snap/cups/965/usr/bin:/snap/cups/965/sbin:/snap/cups/965/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[10] = "SERVER_ADMIN=root@ubuntu"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[11] = "SOFTWARE=CUPS/2.4.6"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[12] = "TMPDIR=/var/snap/cups/965/var/spool/tmp"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[13] = "USER=root"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[14] = "CUPS_MAX_MESSAGE=2047"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[15] = "CUPS_SERVER=/run/cups/cups.sock"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[16] = "CUPS_ENCRYPTION=IfRequested"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[17] = "IPP_PORT=631"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[18] = "AUTH_TYPE=PeerCred"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[19] = "LANG=en.UTF8"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[20] = "REDIRECT_STATUS=1"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[21] = "GATEWAY_INTERFACE=CGI/1.1"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[22] = "SERVER_NAME=localhost"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[23] = "SERVER_PORT=631"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[24] = "REMOTE_ADDR=localhost"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[25] = "REMOTE_HOST=localhost"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[26] = "SCRIPT_NAME=/"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[27] = "SCRIPT_FILENAME=/snap/cups/965/share/cups/doc/"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[28] = "REMOTE_USER=root"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[29] = "SERVER_PROTOCOL=HTTP/1.1"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[30] = "HTTP_USER_AGENT=CUPS/2.4.1 (Linux 5.15.0-75-generic; x86_64) IPP/2.0"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[31] = "REQUEST_METHOD=POST"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[32] = "CONTENT_LENGTH=72"
D [27/Jun/2023:14:20:49 +0200] [CGI] envp[33] = "CONTENT_TYPE=application/ipp"
D [27/Jun/2023:14:20:49 +0200] cupsdAddCert: Adding certificate for PID 22039
D [27/Jun/2023:14:20:49 +0200] [CGI] Started /snap/cups/965/lib/cups/daemon/cups-deviced (PID 22039)
I [27/Jun/2023:14:20:49 +0200] [Client 408] Started "/snap/cups/965/lib/cups/daemon/cups-deviced" (pid=22039, file=26)
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Started backend /snap/cups/965/lib/cups/backend/beh (PID 22040)
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Started backend /snap/cups/965/lib/cups/backend/dnssd (PID 22041)
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Started backend /snap/cups/965/lib/cups/backend/driverless (PID 22042)
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Started backend /snap/cups/965/lib/cups/backend/driverless-fax (PID 22043)
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Started backend /snap/cups/965/lib/cups/backend/http (PID 22044)
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Started backend /snap/cups/965/lib/cups/backend/https (PID 22045)
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Started backend /snap/cups/965/lib/cups/backend/implicitclass (PID 22046)
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Started backend /snap/cups/965/lib/cups/backend/ipp (PID 22047)
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Started backend /snap/cups/965/lib/cups/backend/ipps (PID 22048)
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Started backend /snap/cups/965/lib/cups/backend/lpd (PID 22049)
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Started backend /snap/cups/965/lib/cups/backend/parallel (PID 22050)
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Started backend /snap/cups/965/lib/cups/backend/proxy (PID 22051)
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Started backend /snap/cups/965/lib/cups/backend/serial (PID 22052)
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Started backend /snap/cups/965/lib/cups/backend/snmp (PID 22053)
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Started backend /snap/cups/965/lib/cups/backend/socket (PID 22054)
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Started backend /snap/cups/965/lib/cups/backend/usb (PID 22056)
D [27/Jun/2023:14:20:49 +0200] [Client 408] CGI data ready to be sent.
D [27/Jun/2023:14:20:49 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=2147483647, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [Client 408] Script header: Content-Type: application/ipp
D [27/Jun/2023:14:20:49 +0200] [Client 408] Script header:
D [27/Jun/2023:14:20:49 +0200] [Client 408] Sending status 200 for CGI.
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdSendHeader: code=200, type="(null)", auth_type=0
D [27/Jun/2023:14:20:49 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [CGI] Flushed attributes...
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Found device \"beh\"...
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] PID 22040 (beh) exited with no errors.
D [27/Jun/2023:14:20:49 +0200] [CGI] /snap/cups/965/lib/cups/backend/driverless-fax: 14: //lib/cups/backend/driverless: not found
E [27/Jun/2023:14:20:49 +0200] [cups-deviced] PID 22043 (driverless-fax) stopped with status 127!
D [27/Jun/2023:14:20:49 +0200] [CGI] Unable to create Avahi client.
D [27/Jun/2023:14:20:49 +0200] [Client 408] CGI data ready to be sent.
D [27/Jun/2023:14:20:49 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [CGI] Flushed attributes...
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Found device \"https\"...
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] PID 22041 (dnssd) exited with no errors.
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] PID 22045 (https) exited with no errors.
D [27/Jun/2023:14:20:49 +0200] [Client 408] CGI data ready to be sent.
D [27/Jun/2023:14:20:49 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [CGI] Flushed attributes...
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Found device \"ipps\"...
D [27/Jun/2023:14:20:49 +0200] [Client 408] CGI data ready to be sent.
D [27/Jun/2023:14:20:49 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [CGI] Flushed attributes...
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Found device \"socket\"...
D [27/Jun/2023:14:20:49 +0200] [Client 408] CGI data ready to be sent.
D [27/Jun/2023:14:20:49 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [CGI] Flushed attributes...
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Found device \"ipp\"...
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] PID 22051 (proxy) exited with no errors.
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] PID 22048 (ipps) exited with no errors.
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] PID 22047 (ipp) exited with no errors.
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] PID 22054 (socket) exited with no errors.
D [27/Jun/2023:14:20:49 +0200] [Client 408] CGI data ready to be sent.
D [27/Jun/2023:14:20:49 +0200] [CGI] Flushed attributes...
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Found device \"lpd\"...
D [27/Jun/2023:14:20:49 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [Client 408] CGI data ready to be sent.
D [27/Jun/2023:14:20:49 +0200] [CGI] Flushed attributes...
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Found device \"http\"...
D [27/Jun/2023:14:20:49 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] PID 22046 (implicitclass) exited with no errors.
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] PID 22044 (http) exited with no errors.
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] PID 22049 (lpd) exited with no errors.
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] PID 22050 (parallel) exited with no errors.
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] PID 22052 (serial) exited with no errors.
D [27/Jun/2023:14:20:49 +0200] [CGI] Loading USB quirks from \"/snap/cups/965/share/cups/usb\".
D [27/Jun/2023:14:20:49 +0200] [CGI] Loaded 119 quirks.
D [27/Jun/2023:14:20:49 +0200] [CGI] list_devices
D [27/Jun/2023:14:20:49 +0200] [CGI] libusb_get_device_list=5
D [27/Jun/2023:14:20:49 +0200] [CGI] Started ippfind (PID 22059)
D [27/Jun/2023:14:20:49 +0200] [Client 408] CGI data ready to be sent.
D [27/Jun/2023:14:20:49 +0200] [CGI] Flushed attributes...
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] Found device \"usb://C56/Thermal%20Printer?serial=<UNUSED>\"...
D [27/Jun/2023:14:20:49 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:49 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:49 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:49 +0200] [cups-deviced] PID 22056 (usb) exited with no errors.
D [27/Jun/2023:14:20:49 +0200] [CGI] ippfind: Unable to use Bonjour: Daemon not running
E [27/Jun/2023:14:20:49 +0200] [CGI] ippfind (PID 22059) stopped with status 2!
E [27/Jun/2023:14:20:49 +0200] [cups-deviced] PID 22042 (driverless) stopped with status 2!
D [27/Jun/2023:14:20:50 +0200] Expiring subscriptions...
D [27/Jun/2023:14:20:51 +0200] [cups-deviced] PID 22053 (snmp) exited with no errors.
D [27/Jun/2023:14:20:51 +0200] [Client 408] CGI data ready to be sent.
D [27/Jun/2023:14:20:51 +0200] Expiring subscriptions...
D [27/Jun/2023:14:20:51 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:51 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:51 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:51 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:51 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:51 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:51 +0200] [Client 408] CGI data ready to be sent.
D [27/Jun/2023:14:20:51 +0200] PID 22039 (/snap/cups/965/lib/cups/daemon/cups-deviced) exited with no errors.
D [27/Jun/2023:14:20:51 +0200] [Client 408] con->http=0x555e4babd880
D [27/Jun/2023:14:20:51 +0200] [Client 408] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=22039, file=26
D [27/Jun/2023:14:20:51 +0200] [Client 408] Waiting for CGI data.
D [27/Jun/2023:14:20:51 +0200] [Client 408] Sending 0-length chunk.
D [27/Jun/2023:14:20:51 +0200] [Client 408] Flushing write buffer.
D [27/Jun/2023:14:20:51 +0200] [Client 408] New state is HTTP_STATE_WAITING
D [27/Jun/2023:14:20:51 +0200] [Client 408] Waiting for request.
D [27/Jun/2023:14:20:51 +0200] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
D [27/Jun/2023:14:20:51 +0200] [Client 408] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
D [27/Jun/2023:14:20:51 +0200] [Client 408] Closing connection.
D [27/Jun/2023:14:20:51 +0200] cupsdSetBusyState: newbusy="Not busy", busy="Not busy"
D [27/Jun/2023:14:20:52 +0200] Expiring subscriptions...

I will keep developing other features of my snap based on cups admin utilities.

2 Likes

One important note: I have renamed the plugs and slots for the cups-control interfaces of the CUPS Snap in the --edge channel. The slot is now named cups-control, so the manual connection command changes to

snap connect printer-admin:cups-control cups:cups-control

This renaming is to improve interface intuitiveness and consistency for users of client Snaps.

1 Like

The actual solution of this problem will be discussed in this thread. Please continue discussion there. Thanks.

1 Like