Delayed Samba Client Connection

Issues related to applications and software problems
Post Reply
waltman
Posts: 10
Joined: 2016/01/05 03:20:30

Delayed Samba Client Connection

Post by waltman » 2017/06/19 14:55:29

I recently started migrating from CentOS 6.9 to 7.
A problem I noticed is that there seems to be a delay in windows clients initially connecting to Samba shares.

On CentOS 6.9 I could reboot a windows client and map a network drive almost immediately.

On CentOS 7, I reboot the windows client, if I try to map the drive, I get an error message not accessible/unavailable.
Do some investigating I noticed, I can ping the CentOS box from the windows client and get no reply. But after 3 ping attempts I will finally get replies back and I am able to map a drive. What I find strange is other clients on the network maybe already connected to the share, this only happens for new connections.

I know the client and server see each other because the CentOS 7 box is also the DHCP server and is handing out IPs to the windows clients.

This delay is only like 20-30 seconds at most, and I can deal with it.
But after telling users that I am updating to the newest stuff.
The end users seem to be impatient and keep bugging me about it. :?

What is causing this delay and can I remove it?

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Delayed Samba Client Connection

Post by TrevorH » 2017/06/19 16:12:50

CentOS 7 adds a large degree of parallelisation to the startup by using systemd and not the old initscripts. The old stuff was mostly (if not entirely) single threaded and things ran one after the other so when it was up, everything was up. On CentOS 7 you will find some parts of the system are ready before others and I don't know of any way to stop that from happening.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Delayed Samba Client Connection

Post by hunter86_bg » 2017/06/21 16:17:37

Could you provide the file generated by

Code: Select all

systemd-analize plot > ~/plot.scv

waltman
Posts: 10
Joined: 2016/01/05 03:20:30

Re: Delayed Samba Client Connection

Post by waltman » 2017/06/26 14:03:46

Here is the output.
Attachments
plot.zip
(12.52 KiB) Downloaded 61 times

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Delayed Samba Client Connection

Post by hunter86_bg » 2017/06/26 20:55:47

All network services start in a reasonable time frame.The only "slow" thing is the "rc-local.service" and the "kdump.service".

If I have understood you correctly - you are mounting Windows Share on the CentOS box and you experience a delay , right ?

waltman
Posts: 10
Joined: 2016/01/05 03:20:30

Re: Delayed Samba Client Connection

Post by waltman » 2017/06/27 14:04:16

I will admit I am not a fan, but in this case I would not attribute this issue to systemd.

What has me perplexed, there is a delay with just the initial connection between the windows client and the CentOS 7 server, while other windows clients will be actively connected and accessing files. :?

Example.
Windows Client A - connected to network drive hosted on CerntOS 7 and actively sharing files
Windows Client B - connected to same network drive as Client A
Windows Client C - reboots and tries to connect to same network drive as Clients A & B....gets message drive is not accessible..but after a few minutes will get connection to share.

It does not matter the client, clients A and C can be connected to the share folder but when client B reboots and tries to connect it experiences the same issue.

The same CentOS 7 box is the DHCP server and all the clients are getting IPs. But in the above example after reboot if client C tries to ping the server it will get no replies until after the 10 ping. I thought it may be firewall related but after turning off the firewall on the server still have the same problem. All service seem to be running correctly.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Delayed Samba Client Connection

Post by hunter86_bg » 2017/06/27 15:36:46

I can recommend you to create a pcap trace on the CentOS box with tcpdump while you reproduce the issue on the Win box.Thus it will prove if its network ,client or server related.
Use capture filter to limit the data captured.
smb is using 139/tcp and 445/tcp while nmb uses 137/udp.

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Delayed Samba Client Connection

Post by TrevorH » 2017/06/27 17:20:47

I just realised he's saying he rebooted the *client* not the CentOS server. I'd say that makes it firmly a client issue since other machines can still access the server. I'd look at anti-virus software and firewalls on the Windows box...
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

waltman
Posts: 10
Joined: 2016/01/05 03:20:30

Re: Delayed Samba Client Connection

Post by waltman » 2017/07/19 13:39:38

After racking my head on this problem.

During the 4th of July long weekend. I decided to come in when others were off to run another test. I switched the server back to 6.9 (this is the same server just swap the OS drives). I run the same ping test and noticed the same problem....a delay in Samba client connections.

Now I was really puzzled. :?:

So I did some more digging come to find out that the network guys made some changes to the switches and there seems to be some kind of compatibility problem.

After they did some tweaking on their end, everything is back to normal. :D

Post Reply