Bug 5150 - smbd and nmbd fail to start
Summary: smbd and nmbd fail to start
Status: CLOSED INVALID
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: clustering (show other bugs)
Version: 3.0.26
Hardware: x86 Linux
: P3 regression
Target Milestone: none
Assignee: Volker Lendecke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-17 16:59 UTC by Michael Vitale
Modified: 2007-12-22 11:24 UTC (History)
1 user (show)

See Also:


Attachments
output of command--> smbd -d 10 -i -s /etc/samba/smb.conf (16.40 KB, text/plain)
2007-12-18 02:56 UTC, Michael Vitale
no flags Details
smb.conf configuration file (13.79 KB, text/plain)
2007-12-18 02:58 UTC, Michael Vitale
no flags Details
starting smbd and nmbd directly and running utilities with verbose output (12.14 KB, text/plain)
2007-12-19 17:58 UTC, Michael Vitale
no flags Details
smbd01.out (151.20 KB, text/plain)
2007-12-21 13:25 UTC, Michael Vitale
no flags Details
nmbd01.out (59.67 KB, text/plain)
2007-12-21 13:26 UTC, Michael Vitale
no flags Details
see comment 16 (1.51 KB, text/plain)
2007-12-21 13:26 UTC, Michael Vitale
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Vitale 2007-12-17 16:59:01 UTC
Built binaries using checked out code (Samba3 ctdb version), but fails with command: service smb start

No log file generated.  Just ends with the [FAILED] message for both smbd and nmbd
Comment 1 Michael Vitale 2007-12-17 17:14:17 UTC
linux version 2.6.18-1.2798.fc6
Comment 2 Volker Lendecke 2007-12-18 01:13:04 UTC
This is a bit too little information I'm afraid. Do you also have ctdb running? You should not run the smb service in the clustering version without it. And, if you configure ctdb you will see that normally ctdb starts and stops smbd according to cluster node state, there is no need to separately start the smb service. Can you please also upload your smb.conf and the output of "smbd -d 10 -i"?

Volker
Comment 3 Michael Vitale 2007-12-18 02:56:59 UTC
Created attachment 3049 [details]
output of command--> smbd -d 10 -i -s /etc/samba/smb.conf

as requested, here is the output of the command:
smbd -d 10 -i -s /etc/samba/smb.conf
Comment 4 Michael Vitale 2007-12-18 02:58:55 UTC
Created attachment 3050 [details]
smb.conf configuration file

as requested, here is the smb.conf file.  Notice that clustering is commented out for the time being.
Comment 5 Michael Vitale 2007-12-18 03:05:13 UTC
The reason I ran smb service without ctdb running was just to make sure nothing bad jumped out like this, where the service would not even start.

Also, I was able to get normal samba to work fine (the old smbd and nmbd executables) using these testing commands:
service smb start
mount -t  cifs -v  -o username=sambauser //127.0.0.1/share02 /mikev/samba/share02 
umount //127.0.0.1/share02

Regarding starting ctdb, I was able to start it, but when I stopped it, it disabled my localhost!  I could no longer ping 127.0.0.1.
Comment 6 Volker Lendecke 2007-12-18 03:11:47 UTC
To me it seems that your smbd looks for its data in the wrong place:

tdb(unnamed): tdb_open_ex: could not open file /usr/local/samba/private/secrets.tdb: No such file or directory
Could not open tdb: No such file or directory
Failed to open /usr/local/samba/private/secrets.tdb

is found in smbd -i. Can you make sure that your compile matches what you have on your system?

Volker
Comment 7 Michael Vitale 2007-12-18 08:36:11 UTC
Yes, I noticed that it is looking for stuff in hard-coded places based on the compile-time settings.

Do I make changes in the makefile to force it to the right directories?
Or are there environment variables that I can set that will set the root for paths used by smb?
Comment 8 Volker Lendecke 2007-12-18 08:48:11 UTC
Can't you try to recompile using Tridge's makerpms.sh in packaging/RHEL4-CTDB? There you should find all the settings and config switches to make it run as a normal system service. You might also take a look at your system-supplied Samba RPM package to see the switches that this gives to the configure script.

Volker
Comment 9 Michael Vitale 2007-12-19 17:57:00 UTC
Yes, at some point, I need to set it up to run as a normal system service.

I now have the smbd/nmbd binaries now pointing to the right stuff in the right target directories by doing some mods to target locations in configure script.  Thanks for the help.
I am attaching script output for running samba and samba utilities.  Right now it fails with a weird error for "smbcontrol smbd ping"
tdb(unnamed): tdb_open_ex: failed to truncate /usr/samba-ctdb/samba/var/locks/connections.tdb: Invalid argument
Could not open tdb: Invalid argument

It also fails on an ensuing smbclient connect:
Domain=[MICHAELV3] OS=[Unix] Server=[Samba 3.0.26pre1-SVN-build-UNKNOWN]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME

And of course, fails later with an actual mount attempt:
/usr/samba-ctdb/bin/mount.cifs //127.0.0.1/share02 /usr/samba-ctdb/samba/share/testing/share02 --verbose -o user=sambauser

mount.cifs kernel mount options unc=//127.0.0.1\share02,ip=127.0.0.1,pass=aaa,ver=1,user=sambauser,domain=MYGROUP
retrying with upper case share name

mount.cifs kernel mount options unc=//127.0.0.1\SHARE02,ip=127.0.0.1,pass=aaa,ver=1,user=sambauser,domain=MYGROUP
mount error 6 = No such device or address
Comment 10 Michael Vitale 2007-12-19 17:58:25 UTC
Created attachment 3057 [details]
starting smbd and nmbd directly and running utilities with verbose output

this attachment is related to my last message
Comment 11 Volker Lendecke 2007-12-20 02:37:06 UTC
Does /usr/samba-ctdb/samba/var/locks/connections.tdb exist? If yes, can you please post an strace of the smbcontrol command?

Volker
Comment 12 Michael Vitale 2007-12-20 07:04:16 UTC
Yes, connections.tdb does exist. Previously I was getting connections.tdb does not exist errors, so I just copied the one from my old samba to the new target location and that make the errors go away.  How is this conections.tdb first created?

Also, I did the stack trace like you asked, but it is not supported.
I run Fedora: linux version 2.6.18-1.2798.fc6

Here is the command I used:
/usr/samba-ctdb/bin/smbcontrol smbd stacktrace

Here is the result:
Daemon stack tracing is not supported on this platform
Comment 13 Michael Vitale 2007-12-20 13:03:05 UTC
I don't know how the this bug got marked as resolved or fixed, but it should not be.
Comment 14 Michael Vitale 2007-12-21 08:04:44 UTC
Please respond to my last comment, comment#12.
Thanks in advance.
Comment 15 Volker Lendecke 2007-12-21 08:11:29 UTC
Well, copying connections.tdb is not supported. Thus the invalid argument. connections.tdb is recreated once smbd is restarted.

What happens if you restart smbd?

Volker
Comment 16 Michael Vitale 2007-12-21 13:23:51 UTC
I removed the connections.tdb file and restarted.  Looks like both smbd and nmbd started ok, but smbd bombed when I called:
usr/samba-ctdb/bin/smbclient -L //127.0.0.1 -N

See attachments: smbd01.out, nmbd01.out, samba-calls01.txt

In the smbd.out file, I put my comments right after "waiting for connection"
At that point in the file the output is generated because of the smbclient call mentioned above.
Comment 17 Michael Vitale 2007-12-21 13:25:44 UTC
Created attachment 3067 [details]
smbd01.out

see comment 16
Comment 18 Michael Vitale 2007-12-21 13:26:26 UTC
Created attachment 3068 [details]
nmbd01.out

see comment 16
Comment 19 Michael Vitale 2007-12-21 13:26:52 UTC
Created attachment 3069 [details]
see comment 16
Comment 20 Volker Lendecke 2007-12-21 15:23:15 UTC
Everything looks absolutely smooth here. I don't know what you expect, but I don't see a bug here but some basic misunderstanding of smbd or a pure configuration problem.

Volker
Comment 21 Michael Vitale 2007-12-21 17:20:05 UTC
Please reopen this!  Look at how the command, smbcontrol blows up smbd!

the command -->  smbclient -L //127.0.0.1 -N

causes smbd to crash!!!!!!!!!!
look at the smbd.out file

Comment 22 Volker Lendecke 2007-12-21 17:30:28 UTC
The last thing the server says is 

Server exit (normal exit)

This is not a crash, you seem to have started it with -i. A crash would have at least the word "panic" somewhere in the log file. Read the manpage for smbd about the meaning of -i. Sorry, but re-opening this does not make it a bug where there is none.

Volker
Comment 23 Michael Vitale 2007-12-22 08:09:54 UTC
Thanks as usual for your fast response!  
Before we leave this as a resolved invalid problem, please note that SMBD stops running as a process immediately after I execute the following command:
/usr/samba-ctdb/bin/smbclient -L //127.0.0.1 -N

Yes, I started smbd with "-i" but does that have anything to do with smbd crashing after I execute the smbclient command?  If this is normal for SMBD process to terminate if started with "-i" and a smbclient request comes along, I agree we should close this, but if not, then certainly not close it.

True I see server exit (normal exit) in the log file, but look at all the debug junk between the "waiting for connection" and server normal exit.  
Comment 24 Michael Adam 2007-12-22 10:59:31 UTC
(In reply to comment #23)
> Thanks as usual for your fast response!  
> Before we leave this as a resolved invalid problem, please note that SMBD stops
> running as a process immediately after I execute the following command:
> /usr/samba-ctdb/bin/smbclient -L //127.0.0.1 -N
> 
> Yes, I started smbd with "-i" but does that have anything to do with smbd
> crashing after I execute the smbclient command?  If this is normal for SMBD
> process to terminate if started with "-i" and a smbclient request comes along,
> I agree we should close this, but if not, then certainly not close it.

smbd is not crashing!
Proving "-i" exactly means that smbd does only serve one request and exits afterwards (it does not fork and does not go into daemon mode).

This is intended. Pleas read up on man smbd as vl suggested... :-)

> True I see server exit (normal exit) in the log file, but look at 
> all the debug junk between the "waiting for connection" and 
> server normal exit.  

That is not junk but potentially useful debug output produced by setting a high log level.

Cheers, Michael
Comment 25 Michael Vitale 2007-12-22 11:24:27 UTC
Thanks, Michael for the update:
-i means it will quit after it serves one request!

So I do have it working fine now.  Great!

You guys are a quick response help team!  Thanks alot!

Michael Vitale
IT Developer, Exponential Storage
michael@sqlexec.com