You are not logged in.

#1 2016-11-06 21:10:27

Maniaxx
Member
Registered: 2014-05-14
Posts: 738

CUPS - How to reprint jobs?

Hallo,
i want to keep print jobs in CUPS so i can reprint jobs by simply clicking a button in webinterface, As far as i understand this is done by 'PreserveJobFiles' and it is set by default already (1d = 1 day). The webinterface confirms this (sorry for not being in english. I have no clue how to set this).
cupsm4xt2.png

These standard values (500, 1d) are not set in cupsd.conf as they are standard values. If i set them there explicitly they do change in webinterface as well so i guess standard values should be ok.

The problem is it doesn't work. I can see the jobs listed in the 'print job history' with original file size, date, user and such but there is no control button on the right side to print the job (they are very likely not saved). Also, if i look in /var/spool/cups (i guess that's the folder where jobs are saved) there are sequentially named files (with correct count) but they don't seem to contain any print data, just meta and infodata (they are all around 1k in size - too small).

Anyone know why jobs are not saved/preserved properly here? Does it work for anyone?

Also, whenever i try to change config (on the page of the screenshot above) the service dies and i have to restart it manually. Changes are saved properly though. Anyone suffering from that as well?

Nov 06 21:28:01 blue systemd[1]: org.cups.cupsd.service: Main process exited, code=exited, status=1/FAILURE
Nov 06 21:28:01 blue systemd[1]: org.cups.cupsd.service: Unit entered failed state.
Nov 06 21:28:01 blue systemd[1]: org.cups.cupsd.service: Failed with result 'exit-code'.

Linux 4.8.6-1-ARCH x86_64
cups 2.2.1-1
HL-1250 PPD


sys2064

Offline

#2 2016-11-07 14:53:13

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,925

Re: CUPS - How to reprint jobs?

Are you using a DE ?

If so, are system-config-printer and cups-pk-helper installed ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2016-11-07 18:34:09

Maniaxx
Member
Registered: 2014-05-14
Posts: 738

Re: CUPS - How to reprint jobs?

I'm using XFCE. I have none of your mentioned packages installed. CUPS configuration is done via Firefox (http://localhost:631).

Does it work for you?

Edit: I installed the apps.
'system-config-printer' freezes when i try to change that setting. The CUPS service doesn't crash though.

Edit2: These are the last lines of cupsd 'debug' log after crash (by web interface):

D [07/Nov/2016:21:27:18 +0100] [Client 27] Waiting for CGI data.
D [07/Nov/2016:21:27:18 +0100] [Client 27] CGI data ready to be sent.
D [07/Nov/2016:21:27:18 +0100] PID 3087 (/usr/lib/cups/cgi-bin/admin.cgi) exited with no errors.
D [07/Nov/2016:21:27:18 +0100] [Client 27] con->http=0x560cc8d84240
D [07/Nov/2016:21:27:18 +0100] [Client 27] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=3087, file=16
D [07/Nov/2016:21:27:18 +0100] [Client 27] Waiting for CGI data.
D [07/Nov/2016:21:27:18 +0100] [Client 27] Sending 0-length chunk.
D [07/Nov/2016:21:27:18 +0100] [Client 27] Flushing write buffer.
D [07/Nov/2016:21:27:18 +0100] [Client 27] New state is HTTP_STATE_WAITING
D [07/Nov/2016:21:27:18 +0100] [Client 27] Waiting for request.
D [07/Nov/2016:21:27:18 +0100] [Client 27] Closing because Keep-Alive is disabled.
D [07/Nov/2016:21:27:18 +0100] [Client 27] Closing connection.
D [07/Nov/2016:21:27:18 +0100] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
E [07/Nov/2016:21:27:18 +0100] Scheduler shutting down due to program error.
D [07/Nov/2016:21:27:18 +0100] Discarding unused server-stopped event...
D [07/Nov/2016:21:27:18 +0100] Creating keep-alive file "/var/cache/cups/org.cups.cupsd".
I [07/Nov/2016:21:27:18 +0100] Saving job.cache...
D [07/Nov/2016:21:27:18 +0100] cupsdStopSelect()

Last edited by Maniaxx (2016-11-07 20:37:25)


sys2064

Offline

#4 2016-11-09 23:29:50

Maniaxx
Member
Registered: 2014-05-14
Posts: 738

Re: CUPS - How to reprint jobs?

Can someone test these commands? Does it crash the service on your side as well?

cupsctl PreserveJobFiles=31d
systemctl status org.cups.cupsd.service

Try as root (sudo cupsctl) if as regular user doesn't work.

Restart service (if necessary):

sudo systemctl restart org.cups.cupsd.service

Last edited by Maniaxx (2016-11-09 23:32:02)


sys2064

Offline

#5 2016-11-10 15:33:36

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,925

Re: CUPS - How to reprint jobs?

Eveything in cups /localhost works for me , but i'm not booting with systemd so not using those services .

I can think of a few things to narrow down possible causes though :

- try a different browser
- start another environment then xfce , preferably a windowmanager one instead of a full-blown DE and check if cups works there.

- parts of cups web-interface need root rights, do you have gksu or kdesu installed ?

Last edited by Lone_Wolf (2016-11-10 15:35:16)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2016-11-11 15:55:06

Maniaxx
Member
Registered: 2014-05-14
Posts: 738

Re: CUPS - How to reprint jobs?

That's interesting because the bug has been confirmed on a second system.
Just to make completely sure. The command above (cupsctl) does work for you on 2.2.1 without crashing the service getting the '/usr/bin/cupsd' daemon killed?
https://bugs.archlinux.org/task/51774

Last edited by Maniaxx (2016-11-11 15:59:15)


sys2064

Offline

#7 2016-11-12 16:36:03

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,925

Re: CUPS - How to reprint jobs?

No errors, but that's without any systemd stuff running .


# ps -aux | grep cups
root      1893  0.0  0.0  86392  7080 ?        Ss   12:54   0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf -s /etc/cups/cups-files.conf
root      4691  0.0  0.0  12356  2272 pts/0    S+   17:27   0:00 grep cups

# cupsctl
_debug_logging=0
_remote_admin=0
_remote_any=0
_share_printers=0
_user_cancel_any=0
BrowseLocalProtocols=dnssd
DefaultAuthType=Basic
JobPrivateAccess=default
JobPrivateValues=default
MaxLogSize=0
PreserveJobFiles=31d
SubscriptionPrivateAccess=default
SubscriptionPrivateValues=default
SystemGroup=sys root
WebInterface=Yes

# cupsctl PreserveJobFiles=28d

# cupsctl
_debug_logging=0
_remote_admin=0
_remote_any=0
_share_printers=0
_user_cancel_any=0
BrowseLocalProtocols=dnssd
DefaultAuthType=Basic
JobPrivateAccess=default
JobPrivateValues=default
MaxLogSize=0
PreserveJobFiles=28d
SubscriptionPrivateAccess=default
SubscriptionPrivateValues=default
SystemGroup=sys root
WebInterface=Yes

# ps -aux | grep cups
root      1893  0.0  0.0  86436  7208 ?        Ss   12:54   0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf -s /etc/cups/cups-files.conf
root      4697  0.0  0.0  12356  2284 pts/0    S+   17:28   0:00 grep cups
#

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#8 2016-11-12 17:49:05

Maniaxx
Member
Registered: 2014-05-14
Posts: 738

Re: CUPS - How to reprint jobs?

Please try this:

cupsctl PreserveJobFiles=28d
ps -aux | grep cups

The single command 'cupsctl' would revive the daemon.


sys2064

Offline

#9 2016-11-13 11:39:42

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,925

Re: CUPS - How to reprint jobs?

# ps -aux | grep cups
root      1902  0.0  0.0  86320  6804 ?        Ss   11:31   0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf -s /etc/cups/cups-files.conf
root      3327  0.0  0.0  12356  2216 pts/0    S+   12:36   0:00 grep cups
# cupsctl PreserveJobFiles=27d
# ps -aux | grep cups
root      1902  0.0  0.0  86364  7248 ?        Ss   11:31   0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf -s /etc/cups/cups-files.conf
root      3332  0.0  0.0  12356  2280 pts/0    S+   12:37   0:00 grep cups
#

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#10 2016-11-13 13:14:08

Maniaxx
Member
Registered: 2014-05-14
Posts: 738

Re: CUPS - How to reprint jobs?

That's CUPS v2.2.1?
What version is this exactly? Which source/patches?


sys2064

Offline

#11 2016-11-14 16:30:16

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,925

Re: CUPS - How to reprint jobs?

it's the stock cups-2.2.1-1 from [extra] .

My booting with openrc means 99.9% of systemd doesn'twork ,including all service/socket relatedthings.
It also means i don't have a valid logind/polkit user sesssion .

To mimic that behaviour on a system with systemd as PID 1, I suggest you disable any cups related systemd services.
Start cupsd as root , startX and use cupsctl .
The result should help to narrow down possible causes .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB