Main Page | Report this Page
 
   
Linux Forum Index  »  Linux Networking  »  Problem: Samba won't start because of Vmware...
Page 1 of 1    
Author Message
CRC...
Posted: Tue Aug 26, 2008 9:21 pm
Guest
Hi:

Platform and relevant software: openSuSE 10.3; samba-3.0.26, and
VMwarePlayer-2.0.4

Problem: smb and nmb boot scripts fail to start smbd and nmbd.

Background: smb and nmb services are enabled for runlevels 3 and 3.
Samba is configured to only listen to the host-only network interface
from VMware at vmnet1:192.168.230.1 (see smb.conf below). I think what
happens is that the vmnet1 interface doesn't appear until after the smb
and nmb scripts run, so the smbd/nmbd die (see syslog transcript below).
However, when I manually do /etc/init.d/smb restart after my system is
fully up, then Samba starts just fine and works too. Oh, and I don't
have SuseFirewall running.

Question: How to make Samba wait a bit for the vmnet1 interface to appear?

Things I have tried:

1. Set the variable RUN_PARALLEL="no" in /etc/sysconfig/boot so that
init scripts do not issue in parallel. Trouble is, stupid yast2 doesn't
allow any control over the numbering of the /etc/init.d/rcN.d symlinks,
so I have:

# ls -l /etc/init.d/rc5.d/S*mb /etc/init.d/rc5.d/S*vmware
lrwxrwxrwx 1 root root 6 2008-08-26 18:47 /etc/init.d/rc5.d/S07nmb -> ../nmb
lrwxrwxrwx 1 root root 9 2008-08-22 15:42 /etc/init.d/rc5.d/S07vmware ->
.../vmware
lrwxrwxrwx 1 root root 6 2008-08-26 18:47 /etc/init.d/rc5.d/S11smb -> ../smb

2. I changed the symlink for nmb to:
/etc/init.d/rc5.d/S11nmb -> ../nmb

This still didn't work.

3. I edited the file /etc/init.d/.depend.start, which is the right way
to order the init scripts, to add vmware to the lines for smb and nmb:

nmb: network syslog vmware
smb: network nfs syslog cups nmb vmware

Still doesn't work. I think all this does is make sure the scripts run
in order, but can't deal with anything like delayed side effects of a
script.

Actually, I think Suse's boot scripts might be broken and don't properly
interpret the contents of this file, as my boot screen shows "Starting
Samba NMB daemon" prior to Vmware, then SMB after that. Ugh!

Any idea how to fix this situation?

Thanks!

------------------------------------------------------------------------
/etc/samba/smb.conf:

# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2008/08/22 17:49:21

[global]
workgroup = VMWARE
interfaces = lo, 192.168.230.1/255.255.255.0
bind interfaces only = Yes
printcap name = cups
add machine script = /usr/sbin/useradd -c Machine -d
/var/lib/nobody -s /bin/false %m$
logon path = \\%L\profiles\.msprofile
logon drive = P:
logon home = \\%L\%U\.9xprofile
domain master = No
ldap ssl = no
usershare allow guests = Yes
printing = cups
cups options = raw
print command =
lpq command = %p
lprm command =
include = /etc/samba/dhcp.conf

[homes]
read only = No
inherit acls = Yes

-------------------------------------------------------------------------
/var/log/messages transcript (irrelevant lines snipped):

Aug 26 19:00:44 ngong2 syslog-ng[2461]: syslog-ng version 1.6.12 starting
Aug 26 19:00:53 ngong2 kernel: /dev/vmmon[3171]: VMCI: Driver initialized.
Aug 26 19:00:53 ngong2 kernel: /dev/vmmon[3171]: Module vmmon:
registered with major=10 minor=165
Aug 26 19:00:53 ngong2 kernel: /dev/vmmon[3171]: Initial HV check:
anyNotCapable=0 anyUnlocked=0 anyEnabled=1 anyDisabled=0
Aug 26 19:00:53 ngong2 kernel: /dev/vmmon[3171]: HV check:
anyNotCapable=0 anyUnlocked=0 anyEnabled=1 anyDisabled=0
Aug 26 19:00:53 ngong2 kernel: /dev/vmmon[3171]: Module vmmon: initialized

Aug 26 19:00:53 ngong2 nmbd[3215]: [2008/08/26 19:00:53, 0]
lib/util_sock.c:open_socket_in(822)
Aug 26 19:00:53 ngong2 nmbd[3215]: bind failed on port 137 socket_addr
= 192.168.230.1.
Aug 26 19:00:53 ngong2 nmbd[3215]: Error = Cannot assign requested address
Aug 26 19:00:53 ngong2 nmbd[3215]: [2008/08/26 19:00:53, 0]
nmbd/nmbd_subnetdb.c:make_subnet(97)
Aug 26 19:00:53 ngong2 nmbd[3215]: nmbd_subnetdb:make_subnet()
Aug 26 19:00:53 ngong2 nmbd[3215]: Failed to open nmb socket on
interface 192.168.230.1
Aug 26 19:00:53 ngong2 nmbd[3215]: for port 137.
Aug 26 19:00:53 ngong2 nmbd[3215]: Error was Cannot assign requested address
Aug 26 19:00:53 ngong2 nmbd[3215]: [2008/08/26 19:00:53, 0]
nmbd/nmbd.c:main(771)
Aug 26 19:00:53 ngong2 nmbd[3215]: ERROR: Failed when creating subnet
lists. Exiting.

Aug 26 19:00:53 ngong2 kernel: /dev/vmnet: open called by PID 3219
(vmnet-bridge)
Aug 26 19:00:53 ngong2 kernel: /dev/vmnet: hub 0 does not exist,
allocating memory.
Aug 26 19:00:53 ngong2 kernel: /dev/vmnet: port on hub 0 successfully opened
Aug 26 19:00:53 ngong2 kernel: bridge-eth0: enabling the bridge
Aug 26 19:00:53 ngong2 kernel: bridge-eth0: up
Aug 26 19:00:53 ngong2 kernel: bridge-eth0: already up
Aug 26 19:00:53 ngong2 kernel: bridge-eth0: attached
Aug 26 19:00:53 ngong2 vmnet-dhcpd: Internet Software Consortium DHCP
Server 2.0
Aug 26 19:00:53 ngong2 vmnet-dhcpd: Copyright 1995, 1996, 1997, 1998,
1999 The Internet Software Consortium.
Aug 26 19:00:53 ngong2 vmnet-dhcpd: All rights reserved.
Aug 26 19:00:53 ngong2 vmnet-dhcpd:
Aug 26 19:00:53 ngong2 vmnet-dhcpd: Please contribute if you find this
software useful.
Aug 26 19:00:53 ngong2 vmnet-dhcpd: For info, please visit
http://www.isc.org/dhcp-contrib.html
Aug 26 19:00:53 ngong2 vmnet-dhcpd:
Aug 26 19:00:54 ngong2 vmnet-detect[3225]: NetDetectDaemonInit: No host
policy file found. Not initializing filter.
Aug 26 19:00:54 ngong2 vmnet-detect[3225]: Unable to initialize the daemon
Aug 26 19:00:54 ngong2 vmnet-dhcpd: Configured subnet: 192.168.230.0
Aug 26 19:00:54 ngong2 vmnet-dhcpd: Setting vmnet-dhcp IP address:
192.168.230.254
Aug 26 19:00:54 ngong2 kernel: /dev/vmnet: open called by PID 3235
(vmnet-dhcpd)
Aug 26 19:00:54 ngong2 vmnet-dhcpd: Recving on VNet/vmnet1/192.168.230.0

Aug 26 19:01:01 ngong2 smbd[3876]: [2008/08/26 19:01:01, 0]
lib/util_sock.c:open_socket_in(822)
Aug 26 19:01:01 ngong2 smbd[3876]: bind failed on port 445 socket_addr
= 192.168.230.1.
Aug 26 19:01:01 ngong2 smbd[3876]: Error = Cannot assign requested address

Aug 26 19:01:03 ngong2 kernel: /dev/vmnet: open called by PID 4083
(vmnet-netifup)
Aug 26 19:01:03 ngong2 kernel: /dev/vmnet: port on hub 1 successfully opened
Aug 26 19:01:03 ngong2 ifup: vmnet1
Aug 26 19:01:03 ngong2 ifup: No configuration found for vmnet1
Aug 26 19:01:04 ngong2 kernel: /dev/vmnet: open called by PID 4140
(vmnet-netifup)
----------------------------------------------------------------------

--
_____________________
CRC
crobc at (no spam) REMOVE-THIS.sbcglobal.net
SuSE 10.3 Linux 2.6.22.17
Bill Marcum...
Posted: Wed Aug 27, 2008 8:48 am
Guest
["Followup-To:" header set to comp.os.linux.setup.]
On 2008-08-27, CRC <crobc at (no spam) this-is-bogus.sbcglobal.net> wrote:
Quote:


2. I changed the symlink for nmb to:
/etc/init.d/rc5.d/S11nmb -> ../nmb

This still didn't work.

Change the number part of the symlink to a higher number like S90smb

(choose a number so it starts after the network interface is up)


Quote:
3. I edited the file /etc/init.d/.depend.start, which is the right way
to order the init scripts, to add vmware to the lines for smb and nmb:

nmb: network syslog vmware
smb: network nfs syslog cups nmb vmware

Still doesn't work. I think all this does is make sure the scripts run
in order, but can't deal with anything like delayed side effects of a
script.

After you edit that file you may need to run a script that creates the

S* and K* symlinks based on the file contents.
Chris Cox...
Posted: Wed Aug 27, 2008 9:32 am
Guest
CRC wrote:
Quote:
Hi:

Platform and relevant software: openSuSE 10.3; samba-3.0.26, and
VMwarePlayer-2.0.4

You can tell samba what network interface(s) to bind to.

man smb.conf
(search for bind interfaces)
 
Page 1 of 1       All times are GMT - 5 Hours
The time now is Thu Dec 04, 2008 4:50 pm