after certain time printing to cups stops working
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
LibreOffice |
Invalid
|
Undecided
|
Unassigned | ||
cups (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Precise |
Fix Released
|
Undecided
|
Unassigned | ||
libreoffice (Ubuntu) |
Invalid
|
High
|
Unassigned | ||
Precise |
Invalid
|
Undecided
|
Unassigned |
Bug Description
SRU justification:
[Impact]
* When the CUPS client connects to a remote cupsd over TCP, the server
closes an idle connection after 5 minutes and the client does not reconnect.
* LibreOffice is affected because it keeps a CUPS connection open. The
effect is that printing to a remote cupsd is no longer possible after
LibreOffice has been open for 5 minutes.
[Test Case]
* This can be reproduced on a desktop system. You don't need a separate
CUPS server.
* You need at least one print queue in CUPS. If you don't have a
printer, install "cups-pdf".
* Optional, configure CUPS with a shorter timeout for testing:
sudo cupsctl Timeout=30 # seconds
sudo restart cups
* Configure the CUPS client to use a TCP socket:
mkdir ~/.cups
echo ServerName 127.0.0.1 > ~/.cups/client.conf
* Open LibreOffice. Press Ctrl-P to open the Print dialog. Press Esc to
dismiss the dialog. Wait long enough for the timout to elapse (5
minutes by default, or as per the Timeout setting).
* Try to print. With cups in precise, the job simply vanishes and is
never seen by the server. With the proposed patch, printing works
normally.
[Regression Potential]
* The patch changes a library linked by many programs. An incorrect
change might result in those programs misbehaving or crashing.
* The patch is minimal, only adding a branch to handle a case that was
previously not handled. The behaviour in other cases should be
unchanged.
[Other Info]
* A workaround is to set the cupsd Timeout to a high value such as 8
hours. This works on a server with few users, but on a busy server
more and more connections are opened and eventually cupsd isn't able
to accept new clients.
Original description:
== Problem ==
In our institution we are running only printers through a cups server. while freshly opened document prints well, after some time (few minutes) clicking "print file directly" and menu item "print" do not work any more. after close and open again, thing prints correctly. i have checked what exactly is going on in such cases and logs on the cups server don't show any submissions and/or errors so that the thing is obviously stopped at the level of libreoffice.
== Analysis ==
LibreOffice loses it's TCP connection to CUPS after exactly 5 minutes of inactivity and does not manage to reconnect. To reproduce: print something (to a real printer or cups-pdf), wait 6 minutes not printing anything, and print again. Then, nothing is printed. You can watch the TCP connection using
netstat -tpn | grep soffice
While it's working, it looks like this:
tcp 0 0 127.0.0.1:48810 127.0.0.1:631 ESTABLISHED 13976/soffice.bin
After 5 minutes, that connection is gone permanently.
WORKAROUND: To set the timeout to 24 hours add this line to the top of /etc/cups/
Timeout 62400
Changed in df-libreoffice: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in libreoffice (Ubuntu): | |
status: | Incomplete → New |
Changed in df-libreoffice: | |
status: | Confirmed → Invalid |
Changed in df-libreoffice: | |
status: | Invalid → Confirmed |
Changed in libreoffice (Ubuntu): | |
importance: | Undecided → High |
Changed in df-libreoffice: | |
status: | Confirmed → Invalid |
Changed in df-libreoffice: | |
importance: | Unknown → Medium |
status: | Unknown → New |
description: | updated |
Changed in libreoffice (Ubuntu Precise): | |
status: | New → Invalid |
tags: | added: patch |
Changed in cups (Ubuntu Precise): | |
status: | New → Confirmed |
description: | updated |
Changed in cups (Ubuntu Precise): | |
status: | Fix Committed → In Progress |
Problem description:
Steps to reproduce: client. conf to use it remote cups server
1. Use a remote cups server to print, no a local one.
2. Set /etc/cups/
3. Open writer or calc.
4. Open a document.
5. Go to File -> Print, and you'll see the printers.
6. Keep open libreoffice for 20 minutes.
7. Go to File -> Print, and all printers disappears.
8. Close libreoffice.
9. Start libreoffice again, and go to File -> Print, and you'll see the printers ok.
Current behavior:
The printers disappears when you keep open libreoffice for 20 min. If you close a re-open it, the printers appears again.
I think the problem is related with the fact of libreoffice open a connection with the cups server when it's starts, and its connections is closed a minutes later (i don't know why). Its seem like a libreoffice don't detect this connection lost.
May be libreoffice should open the conection with the cups server when the user open the print dialog, and not when its start.
Platform
Kubuntu 12.04, in a LTSP-Cluster Infraestructure.
PD: Sorry for my english.