You are not logged in.
When I try to start cupsd as systemd unit it fails straight away and only show this errors in /var/log/cups/errors_log:
X [21/Jan/2019:10:06:38 +0100] cupsdDoSelect() failed - Bad address!
X [21/Jan/2019:10:06:38 +0100] Listeners[0] = 6
X [21/Jan/2019:10:06:38 +0100] Listeners[1] = 7
X [21/Jan/2019:10:06:38 +0100] Listeners[2] = 8
X [21/Jan/2019:10:06:38 +0100] CGIPipes[0] = 9
X [21/Jan/2019:10:06:38 +0100] printer[HP_ColorLaserJet_MFP_M278-M281] reg_name="(null)"
X [21/Jan/2019:10:06:38 +0100] printer[HP_ColorLaserJet_MFP_M278-M281_fax] reg_name="(null)"
E [21/Jan/2019:10:06:38 +0100] Scheduler shutting down due to program error.
When I start in a terminal without systemd just by /cupsd -f/ everything is just fine.
I already checked if some other unit like org.cups.cupsd.socket makes any issue and disabled but no change.
systemctl status:
Jan 21 10:02:09 odin systemd[1]: Started CUPS Scheduler.
Jan 21 10:02:09 odin systemd[1]: org.cups.cupsd.service: Main process exited, code=exited, status=1/FAILURE
Jan 21 10:02:09 odin systemd[1]: org.cups.cupsd.service: Failed with result 'exit-code'.
Jan 21 10:02:10 odin systemd[1]: org.cups.cupsd.service: Service RestartSec=100ms expired, scheduling restart.
Jan 21 10:02:10 odin systemd[1]: org.cups.cupsd.service: Scheduled restart job, restart counter is at 5.
Jan 21 10:02:10 odin systemd[1]: Stopped CUPS Scheduler.
Jan 21 10:02:10 odin systemd[1]: org.cups.cupsd.service: Start request repeated too quickly.
Jan 21 10:02:10 odin systemd[1]: org.cups.cupsd.service: Failed with result 'exit-code'.
Jan 21 10:02:10 odin systemd[1]: Failed to start CUPS Scheduler.
If its any help I made an strace on cupsd:
https://paste.kde.org/pxe0f3jbj
Any ideas?
Last edited by Thaodan (2019-01-21 09:23:44)
Linux odin 3.13.1-pf #1 SMP PREEMPT Wed Mar 5 21:47:28 CET 2014 x86_64 GNU/Linux
Offline
Hello,
I just had the same issue. It seems to be related to the resource limit. When starting up, cups tries to allocate a structure whose size is based on the number of max open file (ulimit -n) which fails if you have unlimited.
Overriding the systemd service file for cupsd and adding the following limit `LimitNOFILE=1024` solved the issue for me.
Complete file:
[Unit]
Description=CUPS Scheduler
Documentation=man:cupsd(8)
After=network.target
[Service]
ExecStart=/usr/bin/cupsd -l
Type=notify
Restart=on-failure
LimitNOFILE=1024
[Install]
Also=org.cups.cupsd.socket org.cups.cupsd.path
WantedBy=printer.target
For the record, the error message "Bad Address" is in fact an error of `epoll_wait` function which receive a null pointer for the `events` parameter because the allocation of the buffer failed previously.
Offline
Hey,
thanks for the help. That worked for me.
For the record using a drop is better than editing the whole unit:
# /usr/lib/systemd/system/org.cups.cupsd.service
[Unit]
Description=CUPS Scheduler
Documentation=man:cupsd(8)
After=network.target
[Service]
ExecStart=/usr/bin/cupsd -l
Type=simple
Restart=on-failure
NotifyAccess=none
[Install]
Also=org.cups.cupsd.socket org.cups.cupsd.path
WantedBy=printer.target
# /etc/systemd/system/org.cups.cupsd.service.d/override.conf
[Service]
LimitNOFILE=1024
Used systemctl edit to edit the unit.
Linux odin 3.13.1-pf #1 SMP PREEMPT Wed Mar 5 21:47:28 CET 2014 x86_64 GNU/Linux
Offline
Thanks for the editing tip.
Offline