Bug 1358589 - cups doesn't log errors in error_log
Summary: cups doesn't log errors in error_log
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: 24
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Zdenek Dohnal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-21 04:33 UTC by udayb
Modified: 2016-08-05 20:53 UTC (History)
3 users (show)

Fixed In Version: cups-2.1.4-2.fc24
Clone Of:
Environment:
Last Closed: 2016-08-05 20:53:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
cupsd.conf (4.41 KB, text/plain)
2016-07-22 08:46 UTC, udayb
no flags Details
cups-files.conf (2.83 KB, text/plain)
2016-07-22 08:46 UTC, udayb
no flags Details

Description udayb 2016-07-21 04:33:29 UTC
Description of problem:

cups doesn't log errors in /var/log/cups/error_log

Version-Release number of selected component (if applicable):
2.1.4-1.fc24.x86_64

I have trouble printing to a HP laserjet printer connected to the network. systemctl status cups reveals 

Connected to printer.
Jul 21 09:51:15 [...] cupsd[11086]: Connected to 10.192.36.80:9100...
Jul 21 09:51:15 [...] cupsd[11086]: backendRunLoop(print_fd=0, device_fd=8, snmp_fd=7, addr=0x55dd4ec790c8, use_bc=1, side_cb=0x55dd4e4de0f0)
Jul 21 09:51:15 [..] cupsd[11086]: STATE: +cups-waiting-for-job-completed
Jul 21 09:51:15  cupsd[11086]: Waiting for printer to finish.
Jul 21 09:51:17  cupsd[11086]: PID 11186 (/usr/lib/cups/backend/socket) exited with no errors.
Jul 21 09:51:17  cupsd[11086]: Job stopped due to filter errors; please consult the error_log file for details.
 Job stopped due to filter errors; please consult the error_log file for details.

However, /var/log/cups/error_log is always empty.


How reproducible:
Always

Steps to Reproduce:
1. On a printer error, check cups' error_log

Actual results:
/var/log/cups/error_log is empty

Expected results:
Was expecting an error

Additional info:

Comment 1 Zdenek Dohnal 2016-07-22 06:23:39 UTC
Hi Nineth,

thank you for contacting us. Can you send me your cupsd.conf and cups-files.conf? It seems cups-2.1 and newer uses syslog as default error_log.

Comment 2 udayb 2016-07-22 08:46:00 UTC
Created attachment 1182748 [details]
cupsd.conf

Comment 3 udayb 2016-07-22 08:46:22 UTC
Created attachment 1182749 [details]
cups-files.conf

Comment 4 Zdenek Dohnal 2016-07-22 09:12:31 UTC
When you change line "ErrorLog syslog" to "ErrorLog /var/log/cups/error_log", it will work (worked in my case). Can you try it, please?

Comment 5 Zdenek Dohnal 2016-07-22 09:54:21 UTC
According to http://fedoraproject.org//wiki/Changes/CupsJournalLogging , this is expected behaviour by default. You can change that location by changes from Comment 4.

Comment 6 udayb 2016-08-01 06:07:29 UTC
Yes, but the file I posted the messages was the syslog itself! If the error log was set to syslog, there should have been errors messages - but there aren't any. So cups isn't sending its errors to syslog as well.

Comment 7 udayb 2016-08-01 06:21:03 UTC
I just verified - changing the error_log to /var/log/cups/error_log gives me all the relevant errors there, but having it set to syslog doesn't give me those errors in /var/log/messages.

Comment 8 Zdenek Dohnal 2016-08-01 07:47:34 UTC
So when you set ErrorLog to /var/og/cups/error_log, it works correctly, but when it is set to syslog, error logs do not appear in /var/log/messages? If it is the case, I will change bug's name.

Comment 9 Zdenek Dohnal 2016-08-01 14:03:42 UTC
https://fedoraproject.org/wiki/Changes/NoDefaultSyslog No /var/log/messages is on Fedora by default since Fedora 20 release. Default utility for logs is journalctl since that. Is that problem which you are reporting (no errors in /var/log/messages)? Because I tried to reproduce your issue with both ways of logging errors (syslog and /var/log/cups/error_log) and same error messages appeared in both, journal and /var/log/cups/error_log. Are there errors, which do not appear in journal, but appeared in /var/log/cups/error_log?

Comment 10 udayb 2016-08-01 15:41:14 UTC
I see. I should've been looking at the journal then - I was misled by the fact that ErrorLog was "syslog". I guess it should be called "journal" since it's the systemd journal.

Comment 11 Zdenek Dohnal 2016-08-03 11:31:15 UTC
I can not rename this option, because it would be operation system specific change and upstream would not accept patch for this. But I can add text into comment above option, mentioning syslog = systemd journal by default.

Comment 12 Fedora Update System 2016-08-03 12:15:25 UTC
cups-2.1.4-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-56017ec8d4

Comment 13 Fedora Update System 2016-08-04 01:54:41 UTC
cups-2.1.4-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-56017ec8d4

Comment 14 Fedora Update System 2016-08-05 20:53:20 UTC
cups-2.1.4-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


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