LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-08-2019, 04:22 PM   #1
thomas.hedden
Member
 
Registered: May 2006
Location: Carlisle, MA
Distribution: Ubuntu, Fedora
Posts: 55

Rep: Reputation: 15
Samba suddenly stopped working


I am running Ubuntu 16.04 LTS. I have not upgraded to the latest release, but I have made all suggested updates to 16.04 LTS.
I have been running this system for many months without any problems, except for a power problem a week or so ago, and I have always been able to see Windows 7/10 clients on the local area network.
Last night there was a thunderstorm, so I powered off my Ubuntu machine and disconnected it from power. When I powered back up, I was no longer able to get Samba to work:
Click on "Windows Network"
Alert box is displayed:
"Unable to access location" "Failed to retrieve share list from server: Invalid argument"
I have not made any changes to /etc/samba/smb.conf, although interestingly it shows a change date of of today. (Do updates ever make changes to smb.conf on their own initiative, without user input?)
I can ping back and forth between the Windows machine and the Linux machine.
I have web servers installed on both Ubuntu and Windows, and if I enter the IP address of the Windows machine in a browser on my Ubuntu machine, it displays the "Zend Server Test Page", and if I enter the IP address of the Ubuntu machine on my Windows 7 machine it displays the "Apache2 Ubuntu Default Page".
wabac[tom]: /home/tom$ samba --version
Version 4.3.11-Ubuntu
root@wabac:/home/tom# /etc/init.d/samba restart
[ ok ] Restarting nmbd (via systemctl): nmbd.service.
[ ok ] Restarting smbd (via systemctl): smbd.service.
[ ok ] Restarting samba-ad-dc (via systemctl): samba-ad-dc.service.
root@wabac:/home/tom# exit
exit
wabac[tom]: /home/tom$ cat /var/log/syslog
[snip]
Aug 8 16:52:49 wabac dbus[945]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Aug 8 16:52:49 wabac systemd[1]: Starting Hostname Service...
Aug 8 16:52:49 wabac dbus[945]: [system] Successfully activated service 'org.freedesktop.hostname1'
Aug 8 16:52:49 wabac systemd[1]: Started Hostname Service.
Aug 8 16:52:55 wabac org.gtk.vfs.Daemon[2113]: ** (gvfsd:2168): WARNING **: dbus_mount_reply: Error from org.gtk.vfs.Mountable.mount(): Failed to retrieve share list from server: Invalid argument
Can anyone shed any light on this?
Thanks in advance for any help that anyone can provide.
 
Old 08-08-2019, 06:35 PM   #2
thomas.hedden
Member
 
Registered: May 2006
Location: Carlisle, MA
Distribution: Ubuntu, Fedora
Posts: 55

Original Poster
Rep: Reputation: 15
P.S. Another piece of information: the Windows 7 client can see the Windows 10 client on the LAN, but the Windows 7 client cannot see the Ubuntu client. This is another clue suggesting that the Samba problem is on the Ubuntu machine rather than on the Windows machine(s).
 
Old 08-09-2019, 08:57 AM   #3
thomas.hedden
Member
 
Registered: May 2006
Location: Carlisle, MA
Distribution: Ubuntu, Fedora
Posts: 55

Original Poster
Rep: Reputation: 15
I left my Ubuntu computer on overnight, and now I can see all the Samba shares, so this matter is resolved. However, I am still curious whether anyone can suggest how to speed things up. Does Samba really take ten hours to see shares?
 
Old 08-09-2019, 09:32 AM   #4
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,046

Rep: Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332
When a samba connection error appears, first check your clocks. While it is not often the cause, it is fast and easy to check and causes problems often enough to be worth the time to check. Windows services are very sensitive to time mismatches. If your clocks do not match (it may only take a few seconds difference) then the domain membership calls may fail in the security checks.

If you have NTP set up to sync clocks, and they are far off, it can take hours for the drift to bring them into perfect match.

I am not saying that this is what happened here, we have inadequate evidence to confirm a cause, but this fits your reported symptoms.
 
1 members found this post helpful.
Old 08-09-2019, 09:32 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,047

Rep: Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893
Below is a very old article but it explains how SMB version 1 network browsing works and could be what you experienced. Basically each computer will broadcast their existence at boot up and about every 12 minutes. With two other computers it might take 30 minutes or so. Configuring the Ubuntu computer to be a WINS server or always win the master browser election would help speed things up.

https://www.samba.org/samba/docs/old...kBrowsing.html
 
1 members found this post helpful.
Old 08-09-2019, 10:01 PM   #6
thomas.hedden
Member
 
Registered: May 2006
Location: Carlisle, MA
Distribution: Ubuntu, Fedora
Posts: 55

Original Poster
Rep: Reputation: 15
Thank you for your suggestion. I checked the time settings on my Windows 7 computer, and the choices are:
time.windows.com
time.nist.gov
time-nw.nist.gov
time-a.nist.gov
time-b.nist.gov
My Windows 7 computer is currently set to "time.windows.com", which must be the default because I don't remember changing it. The dialog box also says "This computer is set up to automatically synchronize on a scheduled basis", although it does not say what that scheduled basis is. I suppose that it might only check once a day, which would easily explain everything: The computer is a few years old and the first night it was powered off overnight, so the battery on the motherboard might not have been able to keep the time accurate overnight, and so the time got off. The second night the computer was left on overnight and the time could have been updated overnight, so the next morning the time was correct again.
I checked the time settings on my Ubuntu computer, and the only options are manual and "Set the time: Automatically from the Internet". It does not way where on the Internet.
If you have a suggestion about which of the time choices to use on my Windows 7 machine, please let me know.
Thank you again for your help.
Tom
--
Quote:
Originally Posted by wpeckham View Post
When a samba connection error appears, first check your clocks. While it is not often the cause, it is fast and easy to check and causes problems often enough to be worth the time to check. Windows services are very sensitive to time mismatches. If your clocks do not match (it may only take a few seconds difference) then the domain membership calls may fail in the security checks.

If you have NTP set up to sync clocks, and they are far off, it can take hours for the drift to bring them into perfect match.

I am not saying that this is what happened here, we have inadequate evidence to confirm a cause, but this fits your reported symptoms.
 
Old 08-10-2019, 05:43 AM   #7
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,046

Rep: Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332
Checking WHAT they sync time from is good information to know, but not what I intended. You should know BOTH sources: what Windows syncs form and what the Linux machine syncs time from.

What you want to do to diagnose if the clock is involved is to check the actual system time to the second on the Linux machine AND the Windows machine DURING THE PROBLEM. Checking now, when there is no problem, I think you will find that they are in very close agreement. Checking during the problem will tell you if there is a clock mismatch helping to CAUSE the problem.
 
Old 08-11-2019, 06:37 PM   #8
thomas.hedden
Member
 
Registered: May 2006
Location: Carlisle, MA
Distribution: Ubuntu, Fedora
Posts: 55

Original Poster
Rep: Reputation: 15
I decided to repeat the "experiment". Once again I powered down both machines overnight. Once again, the Linux machine cannot see the Windows network at all. The Windows machine can see the other Windows computer(s) on the LAN, but not the Linux machine. It's hard to check the time on both the Linux machine and the Windows 7 machine simultaneously because I'm running both of them through a KVM switch, and there is a several second latency when I switch between the machines, so I have to count in my head. However, I believe that there is a difference of about two seconds between the two machines. I'll have to connect a second monitor in order to be sure about this. If I repeat the "experiment" again, I'll have the two computers connected to separate monitors side-by-side. I will also recheck the time on both as soon as the Samba connection works again.
 
  


Reply

Tags
networking, samba, smb.conf, windows 7


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cron job suddenly stopped working Gisli Linux - Software 1 08-25-2005 12:03 PM
yum suddenly stopped working DJOtaku Fedora 3 05-01-2005 11:38 AM
Azureus suddenly stopped working!! Braveheart1980 Linux - Software 1 02-19-2005 06:22 PM
crontab suddenly stopped working corepuncher Linux - General 4 02-18-2005 05:57 PM
airsnort suddenly stopped working fatrandy13 Linux - Security 1 09-23-2004 08:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration