[okular] [Bug 398486] Okular cannot print to remote cups server

lp bugzilla_noreply at kde.org
Wed Sep 12 09:17:11 BST 2018


https://bugs.kde.org/show_bug.cgi?id=398486

--- Comment #3 from lp <paulatz at gmail.com> ---

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

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list