Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
enabling cups at boot with systemd [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mani001
Guru
Guru


Joined: 04 Dec 2004
Posts: 354
Location: Oleiros

PostPosted: Sun Dec 15, 2013 12:56 pm    Post subject: enabling cups at boot with systemd [solved] Reply with quote

Hi,

if I enable the cups service with systemd via
Code:

systemctl enable cups.service


then, cups is not listening when I input http://localhost:631/ in a browser, and in /var/log/cups/error_log, I can see at the end
Code:

Unable to bind socket for address [v1.::1]:631 - Address already in use.


However, if I disable cups at boot and start the service via
Code:

systemctl start cups

once I've logged in, then there is no error message in /var/log/cups/error_log and the cups server is listening in localhost:631

is anyone else experiencing this kind of problem?

Cheers!!


Last edited by mani001 on Wed Dec 18, 2013 10:50 pm; edited 1 time in total
Back to top
View user's profile Send private message
mani001
Guru
Guru


Joined: 04 Dec 2004
Posts: 354
Location: Oleiros

PostPosted: Mon Dec 16, 2013 9:33 am    Post subject: Reply with quote

For what is worth...a dodgy workaround is putting a script starting cups in /etc/NetworkManager/dispatcher.d/. It seems that until the network is setup by Networkmanager, cups can't be started...
Back to top
View user's profile Send private message
GFCCAE6xF
Apprentice
Apprentice


Joined: 06 Aug 2012
Posts: 266

PostPosted: Mon Dec 16, 2013 9:43 am    Post subject: Reply with quote

You probably just needed to enable/start NetworkManager-wait-online.service (I think that is how it is named).
Back to top
View user's profile Send private message
mani001
Guru
Guru


Joined: 04 Dec 2004
Posts: 354
Location: Oleiros

PostPosted: Mon Dec 16, 2013 10:07 am    Post subject: Reply with quote

NetworkManager-wait-online.service was enabled and it says:

Code:

root@ manu $systemctl status NetworkManager-wait-online.service
NetworkManager-wait-online.service - Network Manager Wait Online
   Loaded: loaded (/usr/lib64/systemd/system/NetworkManager-wait-online.service; enabled)
   Active: inactive (dead) since lun 2013-12-16 10:38:59 CET; 19min ago
  Process: 230 ExecStart=/usr/bin/nm-online -q --timeout=30 (code=exited, status=0/SUCCESS)
 Main PID: 230 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/NetworkManager-wait-online.service


so....is the "(dead)" part normal? I would think so since it also says "SUCCESS" :D but I'm new to systemd and hence I'm not familiar with its messages
Back to top
View user's profile Send private message
GFCCAE6xF
Apprentice
Apprentice


Joined: 06 Aug 2012
Posts: 266

PostPosted: Mon Dec 16, 2013 10:34 am    Post subject: Reply with quote

I believe so, anyway, I would suggest (unless there is some configuration error on your end you may have overlooked) reporting a bug, this should work as normal, at least it does for me but the only machine I have a printer hooked up to is not a Gentoo one.
Back to top
View user's profile Send private message
mani001
Guru
Guru


Joined: 04 Dec 2004
Posts: 354
Location: Oleiros

PostPosted: Tue Dec 17, 2013 9:09 pm    Post subject: Reply with quote

Bug report filed

https://bugs.gentoo.org/show_bug.cgi?id=494582

Hopefully, someone knowing the internals of systemd can help "fix" this...

Thanks for your help rorgoroth
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 437

PostPosted: Wed Dec 18, 2013 6:13 am    Post subject: Reply with quote

I didn't even notice, but i have hte same problem. But i think i know where its coming from. There are TWO cups services: a socket activated one and standard one. The socket-activated one and the "real" one.

The socket-activated one seemed be causing the problem. Both Fedora and Suse have removed it, Gentoo should probably do the same.

As a workaround create /etc/systemd/system/cups.socket create with the following content
Code:

[Unit]
Description=CUPS Printing Service Sockets

[Socket]
ListenStream=/var/run/cups/cups.sock

[Install]
WantedBy=sockets.target


Then do a "systemctl reenable /etc/systemd/system/cups.socket" to get rid of the error.


Last edited by salahx on Mon Dec 23, 2013 8:57 am; edited 1 time in total
Back to top
View user's profile Send private message
mani001
Guru
Guru


Joined: 04 Dec 2004
Posts: 354
Location: Oleiros

PostPosted: Wed Dec 18, 2013 7:14 pm    Post subject: Reply with quote

That did the trick :D

Thank you very much!!

Marking this as solved..
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum