Bug 13861 - Cups web UI show buttons for log, error, and page - but none work
Summary: Cups web UI show buttons for log, error, and page - but none work
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL: http://localhost:631/admin/log/error_log
Whiteboard: MGA7TOO
Keywords:
Depends on: 16843
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-04 22:02 CEST by Morgan Leijström
Modified: 2023-01-01 16:56 CET (History)
3 users (show)

See Also:
Source RPM: cups
CVE:
Status comment:


Attachments
Screenshot of current cups web interface in mga7 (29.40 KB, image/png)
2020-08-16 23:54 CEST, Morgan Leijström
Details

Description Morgan Leijström 2014-08-04 22:02:19 CEST
At http://localhost:631/admin the buttons "View Error Log" (pointing to http://localhost:631/admin/log/error_log) and "View Page Log" (pointing to http://localhost:631/admin/log/page_log) both return a page with only "Not Found" in bold.

They are also broken on my mga4 system - there results in a blank screen (not even "Not Found" so the handling of the error is improved on mga5).

The "View Acess Log" button works on mga4 and mga5.

If it is not possible to fix, maybe it could show som info on how to see a log using an other method, i.e to as root in a terminal issue journalctl -b -u cups

Reproducible: 

Steps to Reproduce:
Comment 1 Florian Hubold 2014-08-04 23:22:00 CEST
Hmmm, access log shows something under mga4, but you need to press Ctrl+R to see it. But will take a look.

CC: (none) => doktor5000

Comment 2 Morgan Leijström 2015-04-20 21:07:47 CEST
ping.
I have some cups problems lately on cauldron and would like to see an error log...
/var/log/cups/error_log* are from before I upgraded from mga4 to cauldron a half year ago.  Earlier the error log used to be tens of lines a month.
On my wifes computer where I installed cauldron fresh a few months ago there is no error_log files. 
Is it written somewhere else or not at all?

/etc/cups/cupsd.conf contain the line
  LogLevel warn


In system log i see things like below if i start printing two pages within seconds from each other from two instances of Okular, and the second Okular get unresponsive while its connection to cups is held.  That is my problem i experience as a user but to debug first step is to get error logging working...

apr 20 16:06:36 svarten systemd[1]: Started CUPS Scheduler.
apr 20 16:06:36 svarten systemd[1]: Started CUPS Scheduler.
apr 20 16:07:00 svarten cupsd[3170]: Max clients reached, holding new connections...
apr 20 16:07:06 svarten systemd[1]: Started CUPS Scheduler.
apr 20 16:07:06 svarten systemd[1]: Started CUPS Scheduler.
Samuel Verschelde 2015-06-06 02:23:00 CEST

Whiteboard: (none) => MGA5TOO

Comment 3 Florian Hubold 2015-11-25 19:49:34 CET
Had a look on my parents box for some other printing issue on mga5.
access_log is displayed. page_log is displayed, although empty, but the file /var/log/cups/page_log is also empty. 

But when clicking on error_log button it says:
Error: not found

The file exists (although it belongs to group sys instead of lp like the other logs, but changing that does not help) and error_log is also completely empty, no matter what LogLevel directive is in cups.conf. I even tried with "debug2" but no content is written.

Really seems like a bug, will have to check our package vs. upstream.

@Thierry: Do you have any idea why error_log logfile is empty?

Assignee: bugsquad => doktor5000
CC: (none) => thierry.vignaud
Status: NEW => ASSIGNED

Comment 4 Florian Hubold 2015-11-25 19:52:21 CET
(In reply to Florian Hubold from comment #3)

> @Thierry: Do you have any idea why error_log logfile is empty?

Cause seems to be shown in bug 16843:

(In reply to w unruh from comment #0)
> Description of problem:
> In all of the documentation for cups, it is stated that that output of for
> example LogLevel debug goes to /var/log/cups/error_log. In fact in the
> cupsd.conf configuration file it states that explicitly. However, Mageia's
> default is to send the logs to the systemd journal. 
> In /etc/cups/cups-files.conf is the line
>  
> ErrorLog journal
> 
> This is extremely confusing and is liable to be overlooked. 
> At least there should be a note in cupsd.conf that the location of the error
> log is set in cups-file.conf

Depends on: (none) => 16843
Hardware: x86_64 => All
Source RPM: cups-1.7.5-1.mga5.src.rpm => cups

Comment 5 Morgan Leijström 2016-06-09 06:33:06 CEST
Current state cups 2.1.3: at http://localhost:631/admin in firefox, buttons
[ View Access Log ]  ->  an empty page
[ View Error Log ]  -> "Not found"
[ View Page Log ]  ->  an empty page

reloading dont help.

Above after it have asked for root acess.

Strangely if i instead of localhost use http://192.168.0.40:631/admin ;
all buttons result in "Forbidden" ; why do it not ask for root pass then?
Comment 6 Morgan Leijström 2016-10-07 15:36:31 CEST
Still valid without change.
Comment 7 Florian Hubold 2018-07-16 13:40:25 CEST
Reassigning to cups maintainer.

Due to "ErrorLog journal" from /etc/cups/cups-files.conf as mentioned in comment #4 error log seems to not exist as file anmyore, hence cannot be shown via web frontend. Although I still believe this should show the journalctl output then, but this might be an upstream issue.

The other logs are not working as expected, /var/log/cups/access_log is configured in /etc/cups/cups-files.conf and the default AccessLogLevel is actions hence it should show all messages when print jobs are submitted, held, released, modified, or canceled and the same for printers or whole classes.

pagelog is empty, see the comment on that in bug 16843.

BTW; both /var/log/cups/access_log and /var/log/cups/page_log stay at 0 byte size here.

Whiteboard: MGA5TOO => MGA6TOO
Assignee: doktor5000 => thierry.vignaud
Status: ASSIGNED => NEW

Comment 8 Aurelien Oudelet 2020-08-16 18:12:37 CEST
No longer in cups 2.3.3.

This CUPS log has been moved into journal by default unless changes have been made in /etc/cups/cups-files.conf. Log messages can be got by "$ journalctl -u 
cups -e".

Therefore, there is a checkbox "Save debug info for problems resolution" in http://localhost:631/admin/?ADVANCEDSETTINGS=YES

This checkbox is not checked by default. Should be for you to debug. See also your journal with "journalctl -u cups -e".

This is upstream recommended way to parse log.

CC: (none) => ouaurelien

Comment 9 Aurelien Oudelet 2020-08-16 18:12:59 CEST
Mageia 6 changed to end-of-life (EOL) status on 2019-09-30. It is no longer 
maintained, which means that it will not receive any further security or bug 
fix updates.

Package Maintainer: If you wish for this bug to remain open because you plan 
to fix it in a currently maintained version, simply change the 'version' to 
a later Mageia version.

Bug Reporter: Thank you for reporting this issue and we are sorry that we 
weren't able to fix it before Mageia 6's end of life. If you are able to 
reproduce it against a later version of Mageia, you are encouraged to click 
on "Version" and change it against that version of Mageia.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a more recent
Mageia release includes newer upstream software that fixes bugs or makes them
obsolete.

If you would like to help fixing bugs in the future, don't hesitate to join the
packager team via our mentoring program [1] or join the teams that fit you 
most [2].

[1] https://wiki.mageia.org/en/Becoming_a_Mageia_Packager
[2] http://www.mageia.org/contribute/

Best regards,
Aurélien
Bugsquad Team

Status: NEW => RESOLVED
Resolution: (none) => WONTFIX

Comment 10 Morgan Leijström 2020-08-16 23:54:17 CEST
Created attachment 11810 [details]
Screenshot of current cups web interface in mga7

Three buttons to view Acess/Error/Page logs are displayed but not working.
CUPS 2.2.13-1.4.mga7
Comment 11 Morgan Leijström 2020-08-17 00:08:37 CEST
OK, i can check that button described in comment 8.
It produce an insane amount of useless messages, but that is another problem.

But for the nonworking buttons:
They should either be able to work or be removed.
Is that an upstream problem or some patch we add?

Status: RESOLVED => REOPENED
Resolution: WONTFIX => (none)
Summary: Cups built-in error and log buttons do not work => Cups web UI show buttons for log, error, and page - but none work
Whiteboard: MGA6TOO => MGA7TOO

Comment 12 Morgan Leijström 2023-01-01 16:56:47 CET
Mageia 8, CUPS describe itself as 2.3.3op2, tested today:

The nonworking buttons described in Comment 0 are gone, 
and the method described in Comment 8 to get logging works.

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.