Summary: | net-print/cups-2.0.0-r2 systemd "cups.socket failed to listen on sockets: Address already in use" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | tman <cornicx> |
Component: | Current packages | Assignee: | Printing Team <printing> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
/etc/systemd/system/cups.socket
/etc/systemd/system/printer.target.wants/cups.service |
Description
tman
2014-10-25 23:32:01 UTC
but manually startung cups works # systemctl status cups ● cups.service - CUPS Scheduler Loaded: loaded (/usr/lib64/systemd/system/cups.service; enabled) Active: active (running) since So 2014-10-26 01:32:11 CEST; 3s ago Main PID: 31011 (cupsd) CGroup: /system.slice/cups.service └─31011 /usr/sbin/cupsd -l *** This bug has been marked as a duplicate of bug 450282 *** This is not a duplicate of bug #450282 - the security bug is about a misconfiguration resulting in cups listening on world wide :::631 instead of ::1:631 I cannot repdroduce. Please provide the following information: * Are there any files under /etc/system.d/system/cups.{service|socket} * If, both, cups.service and cups.socket are disabled. What is the output of $ netstat -tulpen Created attachment 387414 [details]
/etc/systemd/system/cups.socket
i have added this in common way the cups service in systemd. so this asked file ofc does exist
# systemctl disable cups
Removed symlink /etc/systemd/system/printer.target.wants/cups.service.
Removed symlink /etc/systemd/system/sockets.target.wants/cups.socket.
Removed symlink /etc/systemd/system/multi-user.target.wants/cups.path.
Created attachment 387416 [details]
/etc/systemd/system/printer.target.wants/cups.service
(In reply to tman from comment #5) > Created attachment 387416 [details] > /etc/systemd/system/printer.target.wants/cups.service # netstat -tulpen Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name udp 0 0 0.0.0.0:60278 0.0.0.0:* 107 10341 1814/systemd-timesy udp 0 0 0.0.0.0:68 0.0.0.0:* 0 8553 1878/dhclient udp 0 0 0.0.0.0:68 0.0.0.0:* 0 3735 1855/dhclient udp 0 0 0.0.0.0:1703 0.0.0.0:* 0 8546 1878/dhclient udp 0 0 0.0.0.0:38551 0.0.0.0:* 0 582 1855/dhclient udp6 0 0 :::15315 :::* 0 8547 1878/dhclient udp6 0 0 :::55881 :::* 0 583 1855/dhclient Please remove /etc/systemd/system/cups.socket and reload the configuration via $ systemctl daemon-reload After that starting the socket should work $ systemctl start cups.socket I have no idea why you have installed above cups.socket file, but this is very likely not what you want. If you really want to have a cups service that listens world reachable on every interface, keep your cups.socket file under /etc/systemd/system/cups.socket but make sure to use the correct syntax. In order to override an option it has to be something like read .include /usr/lib/systemd/system/cups.socket [Socket] ListenStream= ListenStream=0.0.0.0:631 (In reply to Matthias Maier from comment #7) > Please remove > /etc/systemd/system/cups.socket > and reload the configuration via > $ systemctl daemon-reload after exercute this command to reaload daemond cups still not get start. # rm /etc/systemd/system/cups.socket # systemctl daemon-reload # systemctl status cups ● cups.service - CUPS Scheduler Loaded: loaded (/usr/lib64/systemd/system/cups.service; enabled) Active: inactive (dead) BUT starting cups manual works: # systemctl start cups # systemctl status cups ● cups.service - CUPS Scheduler Loaded: loaded (/usr/lib64/systemd/system/cups.service; enabled) Active: active (running) since So 2014-10-26 21:12:31 CET; 3s ago Main PID: 15770 (cupsd) CGroup: /system.slice/cups.service └─15770 /usr/sbin/cupsd -l Okt 26 21:12:31 TuX systemd[1]: Started CUPS Scheduler. > > After that starting the socket should work > $ systemctl start cups.socket > > I have no idea why you have installed above cups.socket file, but this is > very likely not what you want. > > If you really want to have a cups service that listens world reachable on > every interface, keep your cups.socket file under > /etc/systemd/system/cups.socket but make sure to use the correct syntax. In > order to override an option it has to be something like read > > .include /usr/lib/systemd/system/cups.socket > > [Socket] > ListenStream= > ListenStream=0.0.0.0:631 its not me who installed manually the cups.socket. systemd did it by it own. # systemctl enable cups Created symlink from /etc/systemd/system/printer.target.wants/cups.service to /usr/lib64/systemd/system/cups.service. Created symlink from /etc/systemd/system/sockets.target.wants/cups.socket to /usr/lib64/systemd/system/cups.socket. Created symlink from /etc/systemd/system/multi-user.target.wants/cups.path to /usr/lib64/systemd/system/cups.path. Well, this is the correct behavior. After a $ systemctl enable cups and a restart, the only the socket is activated upon system start: tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 0 40520 1/systemd tcp6 0 0 ::1:631 :::* LISTEN 0 40519 1/systemd The cups.service itself is only started upon demand, e.g. after accessing localhost:631 cups.service should be active. the problem is the cups dont get start after doing all this steps. only manually starting works :( |