GNU bug report logs - #39801
CUPS web admin page hangs

Previous Next

Package: guix;

Reported by: hot12shots <hot12shots <at> gmail.com>

Date: Wed, 26 Feb 2020 15:22:03 UTC

Severity: normal

Merged with 42068, 49106

Done: Tobias Geerinckx-Rice <me <at> tobias.gr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39801 in the body.
You can then email your comments to 39801 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#39801; Package guix. (Wed, 26 Feb 2020 15:22:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to hot12shots <hot12shots <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 26 Feb 2020 15:22:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: hot12shots <hot12shots <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: CUPS web admin page hangs
Date: Wed, 26 Feb 2020 10:02:33 +0000
[Message part 1 (text/plain, inline)]
Hi,

The CUPS web interface in my Guix system hangs when loading the admin
page, making it cumbersome to manage CUPS printers and settings. The
cause appears to be that the web interface CGI scripts expect a config
file in the wrong location.


HOW TO REPRODUCE:

My system is running Guix commit 290b55c55a5 with the following CUPS
configuration:

        (service cups-service-type
          (cups-configuration
            (web-interface? #t)
            (log-level 'debug)
            (extensions (list cups-filters
                              foomatic-filters
                              hplip-minimal))))

I load http://localhost:631/admin in a browser (Icecat). Expected
behavior is for the page to load immediately. Actual behavior is the
page hangs for a minute or two, displaying a blank screen. Eventually
the expected Administration page loads, but is missing some controls
and displays "Unable to open cupsd.conf file: Success."


DETAILS:

Excerpt from /var/log/cups/error_log is attached. Note especially
CUPS_SERVERROOT=/etc/cups.

Output of ‘ps -ef | grep cupsd’:

        root      6374     1  0 00:29 ?        00:00:01
/gnu/store/wxg6fa0d1hlna6gg2nrn51fkq68q7fy9-cups-2.3.1/sbin/cupsd -f
-c /gnu/store/6i13apvx94y7q61rh3hsj7fhjb6brgf4-cupsd.conf -s
/gnu/store/nxzmy9s6inia31wvhrcrzcf66rb4v4pp-cups-files.conf

Output of ‘sudo strace -p `pidof cupsd` -f -e file’ while refreshing
the Administration page contains a number of entries like this:

        [pid  8423] access("/etc/cups/cupsd.conf", R_OK) = -1 ENOENT
(No such file or directory)

The directory /etc/cups exists but contains only ssl/ and ppd/
subdirectories, no cupsd.conf.

If I create a symlink /etc/cups/conf.d ->
/gnu/store/6i13...-cupsd.conf, the Administration page now loads
without any issue.

In addition, I noticed that (per Guix manual) the server-root field of
the CUPS service’s files-configuration section defaults to /etc/cups.
If I set that field to /gnu/store/wxg6...-cups-2.3.1/etc/cups (see the
cupsd command line above) then run ‘guix system reconfigure’ and
restart cupsd, the web interface again works as expected.

Finally, note that the ServerRoot field of
/gnu/store/nxzm...-cups-files.conf is set to
/gnu/store/wxg6...-2.3.1/etc/cups (again see cupsd command line
above).


COMMENTARY:

From examining the CUPS sources, it appears the web admin interface
expects to find cupsd.conf in CUPS_SERVERROOT solely to make the "Edit
Configuration File" feature work. This feature doesn't seem very
useful on Guix since the config file lives in the (read-only) store.
However, the file still needs to be present in order to satisfy the
admin page CGI script and keep it from hanging.

Thus, perhaps the problem could be solved by having the service make a
symlink /etc/cups/cupsd.conf pointing at its generated cupsd.conf
file.


Thanks,

Jacob
[log (application/octet-stream, attachment)]

Merged 39801 42068. Request was from Marius Bakke <marius <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 27 Jun 2020 09:34:01 GMT) Full text and rfc822 format available.

Merged 39801 42068 49106. Request was from Brice Waegeneire <brice <at> waegenei.re> to control <at> debbugs.gnu.org. (Sat, 19 Jun 2021 08:20:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 22 Jul 2021 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 272 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.