FreeNAS shares keep failing on Windows

I have a number of SMB shares on FreeNAS that have been working fine for quite some time. They are mapped to drive letters on my main Windows 8.1 machine.

Recently, overnight something is happening (I don’t know what) and the shares are no longer accessible on the Windows machine. I get a red cross next to the share and an error message saying that the local name already exists.

If I reboot the FreeNAS box all is then okay.

I am running the latest updates for both FreeNAS and Windows 8.1.

Anyone got any idea why this is happening and how to fix it?

If I put the Windows machine to sleep it doesn’t seem to happen but it does seem to happen over night but I’m not sure if it happens every night.

Check the logs in FreeNAS to see if there is a message at the time the computer goes to sleep.

A while ago, I used to have a problem where my plex server, running windows 10, would lose connectivity to a mapped drive. If i recall correctly, I think it had something to do with windows automatically disconnecting the drive due to inactivity. I believe there are multiple workarounds for this but I ended up creating a re-occurring scheduled task that opens up the mapped drive location in file explorer every 4 hours or so…definitely not a great solution by any means, but for my purposes (dedicated windows 10 box just for plex) it works…

I couldn’t find anything in the log files but searching on the Internet I eventually found a number of people having the same problem although not with freenas. The only solution offered that seemed plausible was to replace the server name with the IP address. Since doing that the problem has not reoccurred.

Would I be right in assuming that means it is a DNS issue and if so where?

If the issue is on my Windows machine why does rebooting the freenas server resolve the problem?

The IP address of the freenas server is static and defined in DHCP so surely I shouldn’t get any issues?

On my Windows machine the shares are mapped to drive letters and most of the time it worked okay. But sometimes after the Windows machine went to sleep the mapping would not work on waking it up. But not always.

Replacing the machine name in the mapping with the IP address it seems to work but I don’t understand why? It would seem logical that this was a Windows issue but, if so, why would rebooting the freenas server resolve it?

What am I missing here?