[opensuse] How do troubleshoot a Samba socket bind problem?
Hi - Boy am I getting a headache trying to understand Samba! I am using SuSE11.0. It appears that there is some sort of conflict going on with the ports that Samba uses, and I for the life of me cannot make heads or tails out of how to diagnose the problem. The log file for log.smbd is showing the following error messages whenever I restart the two smbd and nmbd services (from within SWAT) - [2009/10/23 19:12:27, 2] lib/interface.c:add_interface(337) added interface eth1 ip=192.168.2.100 bcast=192.168.2.255 netmask=255.255.255.0 [2009/10/23 19:12:28, 2] lib/util_sock.c:open_socket_in(1267) bind failed on port 445 socket_addr = 0.0.0.0. Error = Address already in use [2009/10/23 19:12:28, 2] lib/util_sock.c:open_socket_in(1267) bind failed on port 139 socket_addr = 0.0.0.0. Error = Address already in use [2009/10/23 19:12:28, 2] smbd/server.c:open_sockets_smbd(581) waiting for a connection
From what I have read on the internet, most suggestions imply that the samba servers are already running somehow and that some other instance of them has already attached to these two ports. That makes no sense to me because I am doing a restart on these servers which if common sense is right, that means the previous instances should be halted, detached from the ports and an new instance is started up... No??? I dunno and am quite confused if something else is happening...
Another suggestion I found said to do a netstat -ap and grep for the port numbers 139 and 445 but that showed nothing. I did a bit of further research and found a hint suggesting I grep for netbios instead. Ok, but I dunno why I would have to know some magical name but when I did I got the following - \tcp 0 0 *:netbios-ssn *:* LISTEN 3711/smbd udp 0 0 192.168.2.10:netbios-ns *:* 2710/nmbd udp 0 0 *:netbios-ns *:* 2710/nmbd udp 0 0 192.168.2.1:netbios-dgm *:* 2710/nmbd udp 0 0 *:netbios-dgm *:* 2710/nmbd Hump! that was informative!!! So on a hunch I decided to use SWAT and stop both the smbd and nmbd services then ran the netstat command again, and as I might expect nothing showed up. So why, when I start these two services up, do I get these error messages about the Address already in use and bind failed on port... ? Gosh one would think there would be a tool of some kind that would easily answer such a question - i.e. Why is a port already in use when it shouldn't be? But perhaps like so many other error messages I keep encountering, this is a bad error message or a red herring of some kind? Can some kind soul lead me out of this mess? Thanks and much appreciate any help offered... Marc... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Marc Chamberlin wrote:
Gosh one would think there would be a tool of some kind that would easily answer such a question - i.e. Why is a port already in use when it shouldn't be? But perhaps like so many other error messages I keep encountering, this is a bad error message or a red herring of some kind? Can some kind soul lead me out of this mess? Thanks and much appreciate any help offered...
Marc...
Stop smb and nmb and run netstat -pl to see what ports are open (should tell if those ports are being used by something) Do you by chance have vmware installed? -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Michael S. Dunsavage wrote:
Marc Chamberlin wrote:
Gosh one would think there would be a tool of some kind that would easily answer such a question - i.e. Why is a port already in use when it shouldn't be? But perhaps like so many other error messages I keep encountering, this is a bad error message or a red herring of some kind? Can some kind soul lead me out of this mess? Thanks and much appreciate any help offered...
Marc...
Stop smb and nmb and run
netstat -pl to see what ports are open (should tell if those ports are being used by something)
Thanks Michael for your reply. I tried netstat -pl and as far as I can tell, I don't see anything that refers to either ports 139 or 445. Hard for me to be certain though, as what is printed out is difficult for me to comprehend...
Do you by chance have vmware installed?
I dunno what vmware is, so probably not... unless it is something that was installed by default? Marc... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
I dunno what vmware is, so probably not... unless it is something that was installed by default?
Marc...
vmware is a virtual machine software package that sometimes installs samba with it. could you post your smb.conf please -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Michael S. Dunsavage wrote:
I dunno what vmware is, so probably not... unless it is something that was installed by default?
Marc...
vmware is a virtual machine software package that sometimes installs samba with it.
could you post your smb.conf please
Sure Michael, sure appreciate your taking the time to help me with this! What follows is my smb.conf file.. This is set up for my SOHO network at home... Marc.. # Samba config file created using SWAT # from UNKNOWN () # Date: 2009/10/24 11:11:56 [global] workgroup = CHAMBERLIN interfaces = eth1 security = SHARE log level = 2 printcap name = cups logon path = \\%L\profiles\.msprofile logon drive = P: logon home = \\%L\%U\.9xprofile domain master = No ldap ssl = no usershare owner only = No cups options = raw hide dot files = No [homes] comment = Home Directories path = /home valid users = %S, %D%w%S read only = No inherit acls = Yes [profiles] comment = Network Profiles Service path = %H read only = No create mask = 0600 directory mask = 0700 store dos attributes = Yes [users] comment = All users path = /home read only = No inherit acls = Yes veto files = /aquota.user/groups/shares/ [groups] comment = All groups path = /home/groups read only = No inherit acls = Yes [printers] comment = All Printers path = /var/tmp create mask = 0600 guest ok = Yes printable = Yes browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/drivers write list = @ntadmin, root force group = ntadmin create mask = 0664 directory mask = 0775 guest ok = Yes [slash] comment = Root directory path = / read only = No [temp] comment = Temporary directory path = /tmp read only = No guest ok = Yes [homedirs] comment = Home Directories path = /home read only = No -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Sure Michael, sure appreciate your taking the time to help me with this! What follows is my smb.conf file.. This is set up for my SOHO network at home...
Marc..
# Samba config file created using SWAT # from UNKNOWN () # Date: 2009/10/24 11:11:56
[global] workgroup = CHAMBERLIN interfaces = eth1
why eth1 and not eth0? Do you have 2 NIC's? Try commenting that line out and restarting smb.
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Michael S. Dunsavage wrote:
Sure Michael, sure appreciate your taking the time to help me with this! What follows is my smb.conf file.. This is set up for my SOHO network at home...
Marc..
# Samba config file created using SWAT # from UNKNOWN () # Date: 2009/10/24 11:11:56
[global] workgroup = CHAMBERLIN interfaces = eth1
why eth1 and not eth0? Do you have 2 NIC's? Try commenting that line out and restarting smb.
Yes I have two NIC's. eth0 connects to the wild outside world. eth1 connects to my internal network. This computer acts as my gateway and protects my internal network with a firewall. Marc.. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Marc Chamberlin wrote:
Michael S. Dunsavage wrote:
Sure Michael, sure appreciate your taking the time to help me with this! What follows is my smb.conf file.. This is set up for my SOHO network at home...
Marc..
# Samba config file created using SWAT # from UNKNOWN () # Date: 2009/10/24 11:11:56
[global] workgroup = CHAMBERLIN interfaces = eth1
why eth1 and not eth0? Do you have 2 NIC's? Try commenting that line out and restarting smb.
Yes I have two NIC's. eth0 connects to the wild outside world. eth1 connects to my internal network. This computer acts as my gateway and protects my internal network with a firewall.
Marc..
Try putting this by interfaces: interfaces = eth1 192.168.1.1 (change that ip to whatever your local ip is for eth1) I got that from: http://www.faqs.org/docs/securing/chap29sec284.html -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sun, Oct 25, 2009 at 05:25:23AM -0400, Michael S. Dunsavage wrote:
Marc Chamberlin wrote:
Michael S. Dunsavage wrote:
Sure Michael, sure appreciate your taking the time to help me with this! What follows is my smb.conf file.. This is set up for my SOHO network at home...
Marc..
# Samba config file created using SWAT # from UNKNOWN () # Date: 2009/10/24 11:11:56
[global] workgroup = CHAMBERLIN interfaces = eth1
why eth1 and not eth0? Do you have 2 NIC's? Try commenting that line out and restarting smb.
Yes I have two NIC's. eth0 connects to the wild outside world. eth1 connects to my internal network. This computer acts as my gateway and protects my internal network with a firewall.
Marc..
Try putting this by interfaces:
interfaces = eth1 192.168.1.1 (change that ip to whatever your local ip is for eth1)
Why should the IP address be added in addition to the NIC name? It might be required to add 127.0.0.1 to the list of interfaces. In particular if you set "bind interfaces only = Yes" (the default is No). The alternative might be to use "smbpasswd -r <remote machine>".
I got that from:
I consider this as an example. It's enough to use the interface name or the IP address. Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany
Lars Müller wrote:
On Sun, Oct 25, 2009 at 05:25:23AM -0400, Michael S. Dunsavage wrote:
Marc Chamberlin wrote:
Michael S. Dunsavage wrote:
Sure Michael, sure appreciate your taking the time to help me with this! What follows is my smb.conf file.. This is set up for my SOHO network at home...
Marc..
# Samba config file created using SWAT # from UNKNOWN () # Date: 2009/10/24 11:11:56
[global] workgroup = CHAMBERLIN interfaces = eth1
why eth1 and not eth0? Do you have 2 NIC's? Try commenting that line out and restarting smb.
Yes I have two NIC's. eth0 connects to the wild outside world. eth1 connects to my internal network. This computer acts as my gateway and protects my internal network with a firewall.
Marc..
Try putting this by interfaces:
interfaces = eth1 192.168.1.1 (change that ip to whatever your local ip is for eth1)
Why should the IP address be added in addition to the NIC name?
It might be required to add 127.0.0.1 to the list of interfaces. In particular if you set "bind interfaces only = Yes" (the default is No).
The alternative might be to use "smbpasswd -r <remote machine>".
I got that from:
I consider this as an example. It's enough to use the interface name or the IP address.
Lars
I tried to add the IP addresses as suggested, but that made no difference. The parameter "bind interfaces only" is set to the default of No. I don't understand the suggestion of setting the smbpasswd -r for a remote machine. I guess I don't understand why passwords would have anything to do with this problem, and for what remote machine would I set it for? On a slightly related front, it appears I have been in communication with Lars apparently, via a bug report I submitted about smbstatus not working. It appeared that some files were missing that was preventing it from running, and that discussion has led me to believe I don't have the latest version of samba installed, and YaST is not allowing me to access it for SuSE11.0 I am now wondering if perhaps getting this later version of Samba - ver 3.2.4.4.8 might solve it. I have version 3.2.4.4.7 and YaST is not giving me any indication that a later version is available... So how do I talk YaST into giving me this newer version of Samba? Marc... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Marc Chamberlin wrote:
Lars Müller wrote:
On Sun, Oct 25, 2009 at 05:25:23AM -0400, Michael S. Dunsavage wrote:
Marc Chamberlin wrote:
Michael S. Dunsavage wrote:
Sure Michael, sure appreciate your taking the time to help me with this! What follows is my smb.conf file.. This is set up for my SOHO network at home...
Marc..
# Samba config file created using SWAT # from UNKNOWN () # Date: 2009/10/24 11:11:56
[global] workgroup = CHAMBERLIN interfaces = eth1
why eth1 and not eth0? Do you have 2 NIC's? Try commenting that line out and restarting smb.
Yes I have two NIC's. eth0 connects to the wild outside world. eth1 connects to my internal network. This computer acts as my gateway and protects my internal network with a firewall.
Marc..
Try putting this by interfaces:
interfaces = eth1 192.168.1.1 (change that ip to whatever your local ip is for eth1)
Why should the IP address be added in addition to the NIC name?
It might be required to add 127.0.0.1 to the list of interfaces. In particular if you set "bind interfaces only = Yes" (the default is No).
The alternative might be to use "smbpasswd -r <remote machine>".
I got that from:
I consider this as an example. It's enough to use the interface name or the IP address.
Lars
I tried to add the IP addresses as suggested, but that made no difference. The parameter "bind interfaces only" is set to the default of No.
I don't understand the suggestion of setting the smbpasswd -r for a remote machine. I guess I don't understand why passwords would have anything to do with this problem, and for what remote machine would I set it for?
On a slightly related front, it appears I have been in communication with Lars apparently, via a bug report I submitted about smbstatus not working. It appeared that some files were missing that was preventing it from running, and that discussion has led me to believe I don't have the latest version of samba installed, and YaST is not allowing me to access it for SuSE11.0 I am now wondering if perhaps getting this later version of Samba - ver 3.2.4.4.8 might solve it. I have version 3.2.4.4.7 and YaST is not giving me any indication that a later version is available... So how do I talk YaST into giving me this newer version of Samba?
Marc...
Lars helped me to figure out what was going on with YaST and the installation of files on my system. (Much appreciated his help!) Version 3.2.4.4.7 is the correct version, I somehow had gotten the wrong architecture versions of the samba-client package installed. Have no idea why but figured out how to correct it. Anywise that fix did not solve the socket bind problem I am observing in the log files, though for the most part the Samba server seems to be working ok. I can at least mount samba shares and navigate ok from across my network to this particular computer. Marc... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Lars Müller
-
Marc Chamberlin
-
Michael S. Dunsavage