No Internet, No SMB

Status
Not open for further replies.

k9bm

Dabbler
Joined
Apr 18, 2016
Messages
14
The title above is the phrase I used to search the forum for threads on this, but I came up without a definitive answer.

I have two FreeNAS servers both set up pretty much off the shelf with almost no customization and no add-ons. I added DNS servers under NETWORK-Global Configuration because I assumed the information was needed so that FreeNAS would send me status and warning emails.

Last night my internet service died, and moments later I tried to watch a movie using an Android/Kodi media player that was configured to use SMB shares from my servers. Nothing worked, the media player could not find the servers, either one of them. I tried three other similar media players on the network, same result. I turned on NFS on one of the FreeNAS servers and I could easily then add NFS shares to the Kodi boxes. But SMB was dead and gone.

After a few hours the internet service was restored, and SMB again worked perfectly. So, why did this happen? The only threads I found on this suggested it was a DNS problem, and someone suggested removing the DNS entries in FreeNAS. How can it then send out email? And why would a DNS entry in FreeNAS affect the ability of an external machine to see the SMB shares anyway?

I really hope someone has some insight on this, because apparently it has happened to quite a few users. I have a friend who runs a FreeBSD server, he says he used to see this problem but it went away after he upgraded to FreeBSD 10.3. Is this a bug in FreeNAS?
 

BigDave

FreeNAS Enthusiast
Joined
Oct 6, 2013
Messages
2,479
I read of a work around for this...
IIRC you must use the router's IP (on my case 192.168.1.1) as the first DNS server listed, if you have DNS servers such as 8.8.8.8(Google) and other websites
When your internet goes down they can't be used because they are WAN IPs. Set your "first" DNS address as your router's IP and see if this makes a difference.

DNS-routerIP.JPG
 

k9bm

Dabbler
Joined
Apr 18, 2016
Messages
14
Actually this is the way I already had the network configured in FreeNAS. It didn't make a difference, and I'm not sure I even understand the rationale behind this. If FreeNAS is looking for a DNS server and DNS resolution, it couldn't find one in my router because I don't have a DNS server. Having my router's IP listed as the first DNS simply means FreeNAS would look there and find nothing, since all the router does is pass through DNS requests to whatever real DNS servers it is configured with.

I guess I'm just going to have to conclude this is a bug in FreeNAS, very possibly in the underlying FreeBSD code, and hope that it goes away with a future release....
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Actually this is the way I already had the network configured in FreeNAS. It didn't make a difference, and I'm not sure I even understand the rationale behind this. If FreeNAS is looking for a DNS server and DNS resolution, it couldn't find one in my router because I don't have a DNS server. Having my router's IP listed as the first DNS simply means FreeNAS would look there and find nothing, since all the router does is pass through DNS requests to whatever real DNS servers it is configured with.

I guess I'm just going to have to conclude this is a bug in FreeNAS, very possibly in the underlying FreeBSD code, and hope that it goes away with a future release....

There are many reasons why name resolution to a samba server may fail. It's possible that your current network config relies on netbios name resolution, which is squirrely at the best of times. It's not out of the realm of possibility that your home router is doing funny things with nbns packets to 'help' with name resolution, and it freaked out when internet was down. For a home network I recommend just using ip-addresses.
 

k9bm

Dabbler
Joined
Apr 18, 2016
Messages
14
Actually this is the way I already had the network configured in FreeNAS. It didn't make a difference, and I'm not sure I even understand the rationale behind this. If FreeNAS is looking for a DNS server and DNS resolution, it couldn't find one in my router because I don't have a DNS server. Having my router's IP listed as the first DNS simply means FreeNAS would look there and find nothing, since all the router does is pass through DNS requests to whatever real DNS servers it is configured with.

I guess I'm just going to have to conclude this is a bug in FreeNAS, very possibly in the underlying FreeBSD code, and hope that it goes away with a future release....

Are we staying on point with the original question? Why is DNS even necessary for SMB to work? The DNS system contains zero information about my local LAN and particularly my SMB shares. Besides that, it's my media players that are failing to find the FreeNAS servers when the internet goes down, so FreeNAS is obviously refusing SMB connections. Again, what does any of this have to do with either DNS or a live internet connection? ARe we saying that a live internet connection is required to use SMB? If so, why? What is the mechanism?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Are we staying on point with the original question? Why is DNS even necessary for SMB to work? The DNS system contains zero information about my local LAN and particularly my SMB shares. Besides that, it's my media players that are failing to find the FreeNAS servers when the internet goes down, so FreeNAS is obviously refusing SMB connections. Again, what does any of this have to do with either DNS or a live internet connection? ARe we saying that a live internet connection is required to use SMB? If so, why? What is the mechanism?

FreeNAS isn't obviously refusing SMB connections. You'd probably need to use tcpdump on the freenas server + increase samba logging verbosity to figure out what's going on.
 

k9bm

Dabbler
Joined
Apr 18, 2016
Messages
14
I read your words but they don't mean anything to me. I'm not a *nix geek, that's why I use FreeNAS to begin with. The overall point is that this happens to a LOT of people by my reading of the forums and online threads, yet no one in a position of technical expertise or development seems to be paying attention. PLEASE, try it yourself, simply unplug your internet cable then go to a media player or other computer on your LAN and see if you can stream a file from a SMB share--or even view a SMB share....
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I read your words but they don't mean anything to me. I'm not a *nix geek, that's why I use FreeNAS to begin with. The overall point is that this happens to a LOT of people by my reading of the forums and online threads, yet no one in a position of technical expertise or development seems to be paying attention. PLEASE, try it yourself, simply unplug your internet cable then go to a media player or other computer on your LAN and see if you can stream a file from a SMB share--or even view a SMB share....

I can't replicate your problem. Post a debug file "system" -> "advanced" -> "save debug".
 

mgh333

Cadet
Joined
Sep 25, 2013
Messages
6
FYI
https://forums.freenas.org/index.php?threads/smb-problem-after-upgrade-from-8-3-1-to-9-1-1.14798/

Fix your DNS, add the appropriate entry to Host name database, under Network → Global Configuration, or turn off Hostnames lookups, under Services → CIFS
---
My internet went down and I had the same issue. I turned off hostname lookups for smb and that took care of it. I assume because it can't reach a dns server the request just dies. I think turning this off will cause problems if your using approved or denied hosts feature of smb.

The help txt for this option reads: Specifies whether Samba should use (expensive) hostname lookups or use IP addresses instead. AN example place where hostname lookups are currently used is when checking the hosts deny and hosts allow.

what was in the logs
[2017/05/11 21:18:12.773733, 0] ../source3/lib/util_sock.c:876(matchname)
matchname: host name/name mismatch: 192.168.1.216 != (NULL)
[2017/05/11 21:18:12.773841, 0] ../source3/lib/util_sock.c:1055(get_remote_hostname)
matchname failed on 192.168.1.216
 
Status
Not open for further replies.
Top