Summary: | Okular cannot print to remote cups server | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | lp <paulatz> |
Component: | printing | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | m.weghorn, paulatz |
Priority: | NOR | ||
Version: | 1.5.0 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | strace -o /tmp/log -f okular --print xanes.pdf |
Description
lp
2018-09-11 09:53:44 UTC
Created attachment 114895 [details]
strace -o /tmp/log -f okular --print xanes.pdf
I have gzipped the strace as it was over 4000k
Thanks for your report. A few more questions: A) Does printing work when you enable "Force rasterization" in the PDF options in the print dialog (this should make Okular use the "default" Qt way of printing). B) Do other Qt/KDE applications work? And if so, how much works there? (e.g. I'd usually expect that printing itself should mostly to the same extent as with "Force rasterization" in Okular, and the greyed out options are probably always the same?) c) What Qt version are you using? (There were quite some improvements to the Qt print dialog in Qt 5.11). I giving the informations you requested below, however I solved the problem and it is a concurrency of problematic server configuration and maybe problematic printing client behaviour. So. I inherited this server I can admin it but I have no idea how I was set up. I noticed in the server log that I was getting a lot messages like: E [12/Sep/2018:03:42:14 +0200] Request from "134.157.17.66" using invalid Host: field "rutile1.impmc.jussieu.fr:631" 134.157.189.14 - - [12/Sep/2018:04:31:30 +0200] "POST / HTTP/1.1" 200 418 Create-Printer-Subscription client-error-not-possible Which made me realize that the printing server is associated with two host names (rutile1 and printers1) on the same IP, but that the cups server was explicitly bound only to printers1. For some reason, even if I've put "printers1" in client.conf, the call to the connection to the server was done by IP, that was interpreted by the server as being on the other hostname (rutile1) and refused. I've added a ServerAlias with the other host name in cupsd.conf and now everything seems to work. I'm not closing the issue directly, I'd rather let you decide if this is a bug in the printing library or not. Thank you for you assistance! 1. No: I don't get the error from lpr, but the job does not get in the queue, this is what I get in the strace (I had to use a different printer because the other broke down): 858 setsockopt(19, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 858 setsockopt(19, SOL_SOCKET, SO_REUSEPORT, [1], 4) = 0 858 setsockopt(19, SOL_TCP, TCP_NODELAY, [1], 4) = 0 858 fcntl(19, F_SETFD, FD_CLOEXEC) = 0 858 fcntl(19, F_GETFL) = 0x2 (flags O_RDWR) 858 fcntl(19, F_SETFL, O_RDWR|O_NONBLOCK) = 0 858 connect(19, {sa_family=AF_INET, sin_port=htons(631), sin_addr=inet_addr("134.157.17.150")}, 16) = -1 EINPROGRESS (Operation now in progress) 858 fcntl(19, F_SETFL, O_RDWR) = 0 858 poll([{fd=19, events=POLLIN|POLLOUT}], 1, 250) = 1 ([{fd=19, revents=POLLOUT}]) 858 getpeername(19, {sa_family=AF_INET, sin_port=htons(631), sin_addr=inet_addr("134.157.17.150")}, [256->16]) = 0 858 gettimeofday({tv_sec=1536738525, tv_usec=215459}, NULL) = 0 858 getpid() = 858 858 openat(AT_FDCWD, "/tmp/0035a5b9c0e80", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600) = 20 858 sendto(19, "GET /printers/leduc.ppd HTTP/1.1"..., 137, 0, NULL, 0) = 137 858 poll([{fd=19, events=POLLIN}], 1, 60000) = 1 ([{fd=19, revents=POLLIN}]) 858 recvfrom(19, "HTTP/1.1 400 Bad Request\r\nDate: "..., 2048, 0, NULL, NULL) = 555 858 close(20) = 0 858 unlink("/tmp/0035a5b9c0e80") = 0 858 close(19) 2. Neither, this was printing from kwrite, the strace is very similar: socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 18 setsockopt(18, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 setsockopt(18, SOL_SOCKET, SO_REUSEPORT, [1], 4) = 0 setsockopt(18, SOL_TCP, TCP_NODELAY, [1], 4) = 0 fcntl(18, F_SETFD, FD_CLOEXEC) = 0 fcntl(18, F_GETFL) = 0x2 (flags O_RDWR) fcntl(18, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(18, {sa_family=AF_INET, sin_port=htons(631), sin_addr=inet_addr("134.157.17.150")}, 16) = -1 EINPROGRESS (Operation now in progress) fcntl(18, F_SETFL, O_RDWR) = 0 poll([{fd=18, events=POLLIN|POLLOUT}], 1, 250) = 1 ([{fd=18, revents=POLLOUT}]) getpeername(18, {sa_family=AF_INET, sin_port=htons(631), sin_addr=inet_addr("134.157.17.150")}, [256->16]) = 0 gettimeofday({tv_sec=1536739185, tv_usec=653086}, NULL) = 0 getpid() = 1051 openat(AT_FDCWD, "/tmp/0041b5ba2be8f", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600) = 19 sendto(18, "GET /printers/leduc.ppd HTTP/1.1"..., 137, 0, NULL, 0) = 137 poll([{fd=18, events=POLLIN}], 1, 60000) = 1 ([{fd=18, revents=POLLIN}]) recvfrom(18, "HTTP/1.1 400 Bad Request\r\nDate: "..., 2048, 0, NULL, NULL) = 555 close(19) = 0 unlink("/tmp/0041b5ba2be8f") = 0 close(18) 3. Version 5.11.5 Name : libQt5Core5 Version : 5.11.1 Release : 4.1 Architecture: x86_64 Install Date: Thu 06 Sep 2018 15:42:26 CEST Group : Development/Libraries/X11 Size : 5387516 License : LGPL-2.1-with-Qt-Company-Qt-exception-1.1 or LGPL-3.0-only Signature : RSA/SHA256, Mon 03 Sep 2018 11:31:49 CEST, Key ID b88b2fd43dbdc284 Source RPM : libqt5-qtbase-5.11.1-4.1.src.rpm Build Date : Mon 03 Sep 2018 11:17:12 CEST Build Host : lamb05 Relocations : (not relocatable) Packager : https://bugs.opensuse.org Vendor : openSUSE URL : https://www.qt.io Thanks for the quick update and good to hear you could solve the issue. (In reply to lp from comment #3) > > I've added a ServerAlias with the other host name in cupsd.conf and now > everything seems to work. I'm not closing the issue directly, I'd rather let > you decide if this is a bug in the printing library or not. From what I understand, the underlying problem was mostly a configuration issue, so I'm closing this bug now. Please just reopen or create a new one should the problem reappear. |