-   Linux - Software (
-   -   samba refuses to start on startup, but will start manually (

pepsimachine15 04-14-2009 04:46 PM

samba refuses to start on startup, but will start manually
i just moved my / from sda1 to an ide drive, hde1. i dont see how this could have caused any of these issues, but it did.

first my network card failed to start. i added a line in my rc.local file (where i put all of my additional programs, etc i want to start):

the above now starts my network card with my static ip configured. dhcpcd also worked but i wanted this static.

now samba will not start. i have the following line in my rc.local:
/etc/rc.d/init.d/samba start

this used to work just fine. at first i thought that samba may be trying to start before my network card gets an ip, but the line is *after* the network startup line. just to make sure, i made an additional script called startsamba which contained a sleep 60 followed by samba start, to delay the startup of samba even further.

the message samba reports is very vague, something like failed - core dumped. most of the core dump log is garbage characters, but here is the beginning which seems like it might contain some info:

no-process-group log-stdout Log to stdout build-options Print build options Listen on the specified ports Common samba options: loaded services
 Becoming a daemon.
 smbd version %s started.
 Changed root to %s
 waiting for a connection
 tdb_reopen_all failed.
 tdb_reopen_all failed. listen: %s
  ** sam sync message received, ignoring
 received sam replication message, serial = 0x%04x
  smb_conf_updated: Got message saying smb.conf was updated. Reloading.
  Run interactive (not a daemon)  Run daemon in foreground (for daemontools, etc.)    Don't create a new process group    Build-time configuration overrides: Copyright Andrew Tridgell and the Samba Team 1992-2006  standard input is not a socket, assuming -D option
 open_sockets_smbd: Too many sockets to bind to
 open_sockets_smbd: interface %d has NULL IP address !
  open_sockets_smbd: accept: %s
  allowable_number_of_smbd_processes: number of processes (%d) is over allowed limit (%d)
    allowable_number_of_smbd_processes: can't open connection tdb.
 allowable_number_of_smbd_processes: can't fetch INFO/total_smbds. Error %s
 uid=%d gid=%d euid=%d egid=%d
  ERROR: failed to setup guest info.
 open_sockets_smbd: listen: %s
  ERROR: Samba cannot create a SAM SID.
  Could not open account policy tdb.
 ERROR: smbd can not open secrets.tdb
  ERROR: Can't log to stdout (-S) unless daemon is in foreground (-F) or interactive (-i)

after the system starts, i can drop to a console and type "/etc/rc.d/init.d/samba start" and the service starts just fine. i've also tried starting samba manually with "smbd -d" which also produces the core dump when started from rc.local, but not when started from a console after startup.

paulsm4 04-14-2009 05:30 PM

Hi -

You're correct: the problem is definitely that Samba is trying to start up before the network is ready.

It's conceivable that changing disks messed things up by changing timing (so far, so good) ... but I can't think of any reason things would be so far out of synch!

I also don't know why the "sleep" didn't help ... but it's just as well. It's probably not that great an idea anyway.

You haven't mentioned what kind of hardware, or why the network card might be delayed in initializing.

pepsimachine15 04-14-2009 05:46 PM

its a gigabit card, i think an intel e1000. it worked just fine before changing out disks, but before i did not have an entry in my rc.local to start eth0, it was started way before that.

i have no idea why the card delayed initializing, i just took care of the problem with a workaround which was just fine for my purposes.

the sleep would have been an acceptable workaround as well, but since it did not work, i'm going to have to get to the base of the problem.

dmesg shows the card's driver being loaded, and linked at 1000mbps full duplex.

still no idea why swapping the drives would have done anything to affect this. i just dd'd the drives from a boot cd, and changed my grub's menu.lst and my /etc/fstab

paulsm4 04-14-2009 07:09 PM

Hi -

I had a slightly different problem with a custom BMC motherboard and an Intel 82544L Gigbit onboard NIC the other day: the driver *seemed* to load, but the NIC wouldn't wake up.

This occurred with the e1000e driver that came with Ubuntu 8.10. I then tried the e1000e Linux driver that came with the BMC CD: the sucker wouldn't even build ("make install" died with a compiler error).

So I downloaded the driver from Intel's web site ... and everything worked like a charm. "make install" worked, the driver loaded, and the NIC started up promptly: each time, every time.

The difference was that Ubuntu 8.10 and the BMC CD-ROM had version 13.x of the e1000e driver, but Intel's site had v 14.x.

Again: your problem sounds different from mine. And that doesn't explain why a "dd" copy would work in one configuration, but not the other.

Nevertheless: your SAMBA problem is absolutely related to the NIC not starting up in a timely manner. So it's definitely worth a shot to try out Intel's latest/greatest v14.0 driver.

Good luck .. PSM

pepsimachine15 04-14-2009 08:59 PM

i believe i have a different ethernet adapter than you, mine is the 82543gc. the latest driver on intel's site is 8.x for this card. however, that is still a later version than mine, and it cant hurt to update it i suppose

pepsimachine15 04-15-2009 03:40 PM

i dont think the update to the ethernet driver helped. i'm sure this is related to swapping disks but i dont see how. can anyone point me in the direction of finding out when eth0 is supposed to be initialized in the startup process? (not when the drivers themselves are loaded). and maybe there are some other logs/messages i should be checking besides dmesg?

pepsimachine15 04-17-2009 04:51 PM

i re-installed glibc, gcc and gcc-g++... now samba is completely broke, it wont even start manually. so i dont think its related to the network card

i can re-install samba from gslapt, it does not help. i tried downloading the latest version of samba and compiling from source, but i'm getting error's on make and cant find any information by searching the web on the error

pepsimachine15 04-18-2009 03:12 PM


pepsimachine15 04-20-2009 11:03 AM

bump again

All times are GMT -5. The time now is 05:33 AM.