CIFS intermittent failures with intermittent DNS

Status
Not open for further replies.

flodadolf

Cadet
Joined
May 13, 2013
Messages
3
FreeNAS has a configurable option under CIFS for DNS lookups. The help popup indicates that turning it off makes things speedier.

My experience: If the box is checked (as it seems to be by default) and DNS is unavailable, forget about fast: CIFS just fails to work.

Worse, if DNS is unreliably reachable (as in the case of a wonky WAN), CIFS -sometimes- works.

Unchecking the box makes CIFS -always- work.

Expected behavior: CIFS should still work, even if DNS is unavailable, even if the checkbox for name lookups is checked, especially if no allow/deny lists are in use. Any logging or rule-checking performed should use the best available data: Either IP addresses, or names if the IPs can be resolved. Failing != cool.


Background:

Two FreeNAS installations built with identical hardware doing identical work at two different locations on two different networks, configured as similarly as realistically possible, and each just providing a single password-protected CIFS share on a LAN. One has always worked fine. The other usually worked fine, and the rest of the time wouldn't work at all.

We troubleshot the heck out of the thing: Ran ping overnight (perfect results), checked cabling, bypassed switches, added a PCI NIC, the works. Eventually, we unplugged it from the Internet and CIFS -immediately- rolled over and died.

Aha!, we said to ourselves. It's something related to the Internet!

We plugged the Internet back in, and CIFS began working as poorly as it did before.

So we unchecked the checkbox for DNS lookups, and it seems to have been doing quite well since, whether it has an Internet connection and/or working DNS, or not. And the conclusion, of course, is that FreeNAS's CIFS module requires a working nameserver in order to operate, and that one of the network locations has a wonky WAN connection that eats DNS requests. (It is a wireless ISP, and not a very well-regarded one, but that's not my problem to solve.)

I propose that this is either a bug in FreeNAS or a bug in its documentation, or both.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Hi flodadolf,

Could you please open a ticket at support.freenas.org and reference this post?

Posting bugs here doesn't always get the proper people to see it.

Thanks!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'd say it is working exactly as expected. The default is unchecked. I have no idea why you think its checked by default... /shrug.

You should read up on Hostname Lookup and when you would/wouldn't use it, what benefits(and detractors) it has, etc.
 

flodadolf

Cadet
Joined
May 13, 2013
Messages
3
Could you please open a ticket at support.freenas.org and reference this post?

Posting bugs here doesn't always get the proper people to see it.

Yeah, I figured that. I want to see some discourse first, though, as to whether this is actually a bug or expected behavior.

- - - Updated - - -

I'd say it is working exactly as expected. The default is unchecked. I have no idea why you think its checked by default... /shrug.

You should read up on Hostname Lookup and when you would/wouldn't use it, what benefits(and detractors) it has, etc.

I thought it was unchecked by default simply because I do not remember checking it. I could be wrong.

That said, I'm new to FreeNAS, but a bit of an old hat when it comes to *nix. I can't imagine a scenario wherein a service that uses reverse name lookups for convenience (as must be the case when no allow/deny lists are in place) should fail altogether when DNS falters.

If you have a specific usage wherein it would be better this way, I'm all ears. :)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
My guess is the code does the DNS lookup, then compares the allow/deny list. But, if you have no allow/deny list, then you are still being forced to do the lookup. This is probably more of a discussion/issue for the Samba forums than here. I don't think FreeNAS is doing anything particularly wrong with how it implements Samba's settings from the GUI.

Typically, if you are doing DNS lookups, you are running your own DNS server(or a cache at least) so only the first query should be delayed. All queries after that should be responded to in sub-ms time frames. I know mine does...
 

flodadolf

Cadet
Joined
May 13, 2013
Messages
3
Ah, but typical sometimes isn't: Typically, the nameserver always answers. But in one of my two FreeNAS installations, it only answered some of the time.

My own failure rate with FreeNAS is, therefore, 50%. Draw your own conclusions.

I'll entertain your notion that it is a Samba problem, and will attempt to verify it myself on my home Gentoo-based Samba box. But even if it is a Samba bug instead of a FreeNAS bug, it is at least a problem in and of FreeNAS documentation: The pop-up help should tell me, straight-away, that things will fail if DNS is broken for some reason instead of just mentioning speed issues, if broken is indeed the desired and expected behavior.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Have you looked at the smb.conf for both machines? Are there any differences that might be significant enough to explain the difference between the 2 machines functionality?
 
Status
Not open for further replies.
Top