Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23971 - cupsd fails to start on boot but will start ok by hand
Summary: cupsd fails to start on boot but will start ok by hand
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 89956
  Show dependency tree
 
Reported: 2003-07-05 11:40 UTC by giggles1
Modified: 2006-01-15 04:36 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
/etc/cups/cupsd.conf (cupsd.conf,18.76 KB, text/plain)
2003-07-05 11:49 UTC, giggles1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description giggles1 2003-07-05 11:40:29 UTC
cupsd gets an error every time it tries to start on boot:

I [05/Jul/2003:11:12:09 -0700] LoadPPDs: No new or changed PPDs...
I [05/Jul/2003:11:12:09 -0700] Full reload complete.
E [05/Jul/2003:11:12:09 -0700] StartListening: Unable to bind socket - Cannot
assign requested address.

but if I start cupsd by hand from the command line immediately after booting is
finished, it starts just fine:

I [05/Jul/2003:11:13:21 -0700] LoadPPDs: Read "/etc/cups/ppds.dat", 2771 PPDs...
I [05/Jul/2003:11:13:22 -0700] LoadPPDs: No new or changed PPDs...
I [05/Jul/2003:11:13:22 -0700] Full reload complete.

And now prints and everything works.  

I think the above error message occurs when cupsd cannot bind to port 631 but I
cannot think of any reason that port 631 would be unavailable during boot ("need
net" is present in cupsd init) but work immediately after boot. 

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




ortage 2.0.48-r1 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4)
=================================================================
System uname: 2.4.20-ck6 i686 AMD Athlon(tm) MP 2000+
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/usr/local/portage"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 oss apm cups mikmod nls xml2 gdbm slang bonobo ruby libwww motif X
3dnow mmx directfb sse dga opengl xv fbcon kde qt qtmt arts tcltk aalib imlib
ncurses readline sdl svga lcms gif jpeg png tiff gd avi mpeg quicktime esd gtk
gtk2 -gnome alsa ggi dvd xmms oggvorbis encode pam ssl crypt tcpd mozilla spell
truetype xml pdflib plotutils tetex guile perl python libg++ atlas pic berkdb
mysql postgres odbc samba gpm zlib java"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-mp -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="-march=athlon-mp -O2 -pipe -fomit-frame-pointer"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j4"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache fixpackages"
Comment 1 giggles1 2003-07-05 11:49:27 UTC
Created attachment 14174 [details]
/etc/cups/cupsd.conf
Comment 2 giggles1 2003-07-05 11:50:35 UTC
Comment on attachment 14174 [details]
/etc/cups/cupsd.conf 

cups configuration file in case it's useful
Comment 3 Guy 2003-07-17 10:01:21 UTC
You may be interested in bug # 24682.

You may also be interested in the CUPS FAQ here: http://www.linuxprinting.org/foomatic2.9/cups-faq.html#q_4_3

In addition to the comment regarding Child exted with status 98! which mentions default port 631 you might be interested in the comment regarding version of Foomatic. 

You may want to post your version of CUPSD and Foomatic and whether or not you're using NFS.

Disclaimer: I am not a Gentoo Dev or Bug Wrangler.
Comment 4 giggles1 2003-07-17 18:07:48 UTC
Oh, right, I am running foomatic-2.0.0 and cups 1.1.19.

I did find that other bug interesting, but I am not running nfs so that can't be the problem. After I boot, netstat -a shows nothing listening on port 631 (before I start cupsd by hand) and grepping for 631 in /etc/*, etc did not turn up anything. So I don't really know what other service could be the problem, 

How can you get a list of the order that services are started up at boot time? I thought maybe rc-update could spit that info out but apparently not.
Comment 5 Heinrich Wendel (RETIRED) gentoo-dev 2003-07-18 04:52:48 UTC
i don't know how to do that, but if you could give the order of services started, it may be easier to figure out.
Comment 6 Heinrich Wendel (RETIRED) gentoo-dev 2003-07-20 03:47:53 UTC
hm you have multiple nics in your pc?
Comment 7 giggles1 2003-07-20 10:55:15 UTC
Heinrich, yes I sure do, 2 real ones and the vmware virtual one:

please:/var/log# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:E0:81:21:84:D5
          inet addr:4.40.55.1  Bcast:4.40.55.255  Mask:255.255.252.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:373856 errors:0 dropped:0 overruns:0 frame:0
          TX packets:344665 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:345346666 (329.3 Mb)  TX bytes:40510676 (38.6 Mb)
          Interrupt:19 Base address:0x2400

eth1      Link encap:Ethernet  HWaddr 00:C0:49:B4:09:DB
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:272264 errors:0 dropped:0 overruns:0 frame:0
          TX packets:287155 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:121365488 (115.7 Mb)  TX bytes:190691001 (181.8 Mb)
          Interrupt:16 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:5949 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5949 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3460005 (3.2 Mb)  TX bytes:3460005 (3.2 Mb)

vmnet8    Link encap:Ethernet  HWaddr 00:50:56:C0:00:08
          inet addr:192.168.194.1  Bcast:192.168.194.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:699 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
Comment 8 Heinrich Wendel (RETIRED) gentoo-dev 2003-07-20 11:07:38 UTC
so it may be that cups is started before your virtual vmware device is set up?
Comment 9 giggles1 2003-07-20 12:07:14 UTC
Well, I had cups set up to write to its own log, but vmware shows up in syslog, so it's a little hard to tell.  They start somewhat close together, but it does appear that the system attempts to launch cupsd before vmware.  I don't quite understand though, why would that prevent cupsd from binding to port 631?

Comment 10 Heinrich Wendel (RETIRED) gentoo-dev 2003-07-20 12:09:56 UTC
if you take a look at your cupsd.conf it says: 
 
Listen 192.168.194.1:631 
 
So it wants to bind on port 631 for the ip 192.168.194.1, but this ip is not available. 
 
What is the name of the vmware startup script? 
Comment 11 Heinrich Wendel (RETIRED) gentoo-dev 2003-07-20 12:14:06 UTC
ok got the name, try to add "use vmware" to /etc/init.d/cupsd in the depend section, run 
depscan.sh and reboot ;) 
Comment 12 giggles1 2003-07-20 12:18:17 UTC
Crikey! How did I miss that earlier. Instead of adding "use vmware" I just took out that listen line from cupsd.conf and now it starts perfectly at boot.  Thank you for helping me track down this silly error. 
Comment 13 Heinrich Wendel (RETIRED) gentoo-dev 2003-07-20 12:21:35 UTC
np, added use vmware to initscript -> close 
Comment 14 Diego Zamboni 2003-11-27 01:51:52 UTC
Having "use vmware" in /etc/init.d/cupsd causes trouble when restarting cupsd while vmware is running, because it tries to stop it. Maybe it could be changed to "after vmware" instead? In most cases, cups is not linked to vmware in any way.
Comment 15 Heinrich Wendel (RETIRED) gentoo-dev 2003-11-27 05:38:06 UTC
vmware shouldn't be restartet this seems to be a baselayout bug then