#206 closed defect (lack of feedback)
NMBD often fails
Reported by: | Doug Bissett | Owned by: | Silvan Scherrer |
---|---|---|---|
Priority: | Feedback Pending | Milestone: | Samba Server for eCS (OS/2) 1.2.x |
Component: | Samba Server | Version: | Server 3.3.x |
Keywords: | Cc: |
Description
Often, when I attempt to connect to my main machine from another one, the share is not shown. Investigation shows that NMBD.EXE is not running on the main machine. log.nmbd uploaded.
Attachments (2)
Change History (17)
by , 12 years ago
comment:1 by , 12 years ago
Priority: | minor → Feedback Pending |
---|
comment:2 by , 12 years ago
it's clear that you don't have an interface when nmbd starts. please make sure you have valid ip adresses when samba starts.
comment:3 by , 12 years ago
There is little doubt that I would have a valid IP address, before SAMBA tries to start. The problem also happens, often, when I restart, or close, and start again. Sometimes, NMBD terminates immediately (I see a notice in the start window), and sometimes, it waits for a couple of minutes. At other times, it runs for days with no trouble (although that is rare).
Sorry, I didn't get notified about your request for a loglevel 10 log. I will look into that.
follow-up: 6 comment:4 by , 12 years ago
Component: | Unknown → Samba Server |
---|---|
Milestone: | → Samba Server for eCS (OS/2) 1.2.x |
Owner: | changed from | to
yes please add some more logs, as from the above it's really 100% clear nmbd can't find a valid ip address
comment:6 by , 12 years ago
Replying to diver:
yes please add some more logs, as from the above it's really 100% clear nmbd can't find a valid ip address
Can you be a little more specific? Which IP address is it looking for? The local machine, or a remote machine?
Remote machines, except for one that is used as a NAS (192.168.0.108), are often not present. If the local machine (192.168.0.100) is powered on, it is very rare that it does not have an IP address. The router is 192.168.0.1.
follow-up: 9 comment:7 by , 12 years ago
the log says:
[2013/02/19 10:50:46, 2] lib/interface.c:add_interface(340) 481 added interface lan0 ip=0.0.0.0 bcast=0.0.0.0 netmask=255.255.255.255
this tells that he can't find a ip address. please give us a netatat -a so we find eventually the cause.
follow-up: 10 comment:8 by , 12 years ago
I used to have that problem on my two (2) eCS machines. When I first downloaded and installed Samba server, I neglected to include the four (4) files at http://svn.netlabs.org/samba/Additional software prerequisites.
These files should be installed first, before installing Samba server.
After I did installed them, and then Samba server, I no longer have the problem with nmbd.exe stopping. I now runs all the time throughout my Samba session.
Hope this helps you. HCMotin
comment:9 by , 12 years ago
Replying to diver:
the log says:
[2013/02/19 10:50:46, 2] lib/interface.c:add_interface(340) 481 added interface lan0 ip=0.0.0.0 bcast=0.0.0.0 netmask=255.255.255.255
this tells that he can't find a ip address. please give us a netatat -a so we find eventually the cause.
I have no idea how it could possibly not have an IP address, when I restart the SAMBA server to convince other machines that it exists. My router is set to 7 days for a DHCP assigned address.
[C:\]netstat -a addr 127.0.0.1 Interface 9 mask 0xff000000 broadcast 127.0.0.1 Multicast addrs:
224.0.0.1
addr 192.168.0.100 Interface 0 mask 0xffffff00 broadcast 192.168.0.255 Multicast addrs:
224.0.0.1
comment:10 by , 12 years ago
Replying to REXX:
I used to have that problem on my two (2) eCS machines. When I first downloaded and installed Samba server, I neglected to include the four (4) files at http://svn.netlabs.org/samba/Additional software prerequisites.
These files should be installed first, before installing Samba server.
After I did installed them, and then Samba server, I no longer have the problem with nmbd.exe stopping. I now runs all the time throughout my Samba session.
Hope this helps you.
I have always had all of the prerequisites installed. I have also re-installed SAMBA a number of times, trying to find a way around problems.
FWIW, sometimes, NMBD runs for days. Other times, it stops after seconds. I usually start the SAMBA server in the startup folder. That always shows as successful, and it usually works for a while. Then, other machines cannot "see" this one in the client. Sometimes, just loading the *.EVF file (on the client) will make it connect. More often it won't connect, as if NMBD was not running (it is). Just as often, NMBD has quit running, for no apparent reason (although it seems that the logs show that there is no IP address, which would seem to be impossible). No other program has these problems. It is only the SAMBA client.
Thanks anyway...
comment:11 by , 12 years ago
A few thoughts on your issue:
1.) Running a server on a machine that receives its IP from a different machine (a DHCP server) is a bad idea in general (platform independent) - servers should run on a machine with a static IP.
2.) I bet that running a netstat.exe -a the moment before an nmbd.exe fails under the conditions, will show different results. Create a batch file for that purpose.
comment:12 by , 12 years ago
Resolution: | → feedback pending |
---|---|
Status: | new → closed |
comment:13 by , 12 years ago
Why did you close this? You need to fix the problem, before you close it.
1) That is absolutely NOT TRUE. All of my machines run the server, and all of them run the client. I use it as a PEER network. There is NO REASON, at all why they cannot run on a DHCP network. In fact, the router is set to always assign the same address to each of the machines (should not be necessary, but I have other reasons to do that), and the renewal is set to 7 days (which is never reached, since I always find reasons to reboot before that ever happens).
2) How can I run a program BEFORE an event occurs? You are grasping at straws. Sometimes, NMBD fails shortly after the machine gets it's address (other programs are using the link at the time, with NO PROBLEMS)), and other times it runs for days. My guess is that you have a faulty error recovery routine somewhere. NMBD should always retry a missing IP address (more than once, with a second or so between retries), because it can happen when a renewal is taking place (but is more likely when I reboot the router, which takes about 20 seconds, and I have NEVER seen that cause a problem). However, in this case, a renewal is NOT taking place, so there is no reason, at all, to even consider that there is not an assigned IP address. Even if it did take place, the chances that NMBD would hit it at exactly the time of the renewal, more than once in about 30 years, is probably over estimating the possibility. This problem happens randomly from seconds, to days. I also see the problem on other machines, but not as often (that could be that I just don't notice it, because they are not used as much).
SMBD and NMBD need to be bullet proof. NOTHING short of a complete system failure, should cause either one to just close up shop. If the router goes away for a month, they should still be retrying when it is turned back on. If I down an interface, for a month, it should be there retrying, when I turn the interface back on.
follow-up: 15 comment:14 by , 12 years ago
1) A server binds a port to an IP address interface, therefore, it is not considered best practice for a server to rely on another system to get said address. However, I run it that way myself as I find it reliable enough to not worry about it.
2) Create a batch file:
netstat -a >netstatb.txt nmbd netstat -a >netstata.txt
If it stays up for days then the netstat.txt will not tell you anything unexpected, however, what Herwig expect you will find is that netstat -a right before attempting to launch nmbd will show there is no IP address. I suggest the second one in case the first shows good then it is possible that something is then causing the loss of the IP address and the second one should hopefully catch that case.
comment:15 by , 12 years ago
Replying to abwillis:
1) A server binds a port to an IP address interface, therefore, it is not considered best practice for a server to rely on another system to get said address. However, I run it that way myself as I find it reliable enough to not worry about it.
The "other system" is the router. If that fails, nothing works. It is rock solid, and I have had no indication, ever, that I might be losing an IP address. It is DHCP assigned, for 7 days, and I rarely ever go that long without finding a reason to reboot.
2) Create a batch file:
netstat -a >netstatb.txt nmbd netstat -a >netstata.txtIf it stays up for days then the netstat.txt will not tell you anything unexpected, however, what Herwig expect you will find is that netstat -a right before attempting to launch nmbd will show there is no IP address. I suggest the second one in case the first shows good then it is possible that something is then causing the loss of the IP address and the second one should hopefully catch that case.
The batch file that starts NMBD is SMB.CMD.I don't see any easy way to insert such a sequence into that file.
I think you are not paying attention to what I am saying. I can be listening to web radio, and NMBD will quit. I can restart the SAMBA server, NMBD will start, and quit again, in seconds. I can restart it again, and it will do the same thing. meanwhile, not a hiccup from PM123, or any other program that happens to be using the network. If I keep on restarting it, it will eventually go (usually within a couple of tries).
NMBD, and SMBD, should be bulletproof. They should retry as often as necessary to recover from any error.
In fact, I often see NMBD, and SMBD, get started before the network has an address. I have one system that isn't always connected to the router. I start the system, and the two get started, long before I remember to plug in the cable. They don't seem to have a problem with that, so why, all of a sudden, in the middle of trying to use it, does NMBD just quit, for no apparent reason? In fact it often quits when it is not being used (although I understand that SAMBA communicates to other systems for it's own purposes). It seems that about every second time I attempt to use the SAMBA server, I need to restart it so the other systems can "see" it. Sometimes, there is no apparent problem, it just ignores other systems.
Sorry, but I find this (and other problems with SAMBA) to be very frustrating.
please provide a loglevel 10 nmbd log