LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Explorer hangs (extensive timeout) when trying to access Samba share (https://www.linuxquestions.org/questions/linux-software-2/explorer-hangs-extensive-timeout-when-trying-to-access-samba-share-186532/)

tisource 05-27-2004 11:02 AM

Explorer hangs (extensive timeout) when trying to access Samba share
 
Allright, this one has been at me for weeks. I have been monitoring logs, I have been doing all kinds of tests, and I still don't have a clue on this one.

In our office, we have a Windows 2003 domain. We have Windows 2000 and Windows XP clients. I also have a Samba 3.0.2a standalone server that hosts a long list of services for the network (NTP, MySQL, DHCP, DNS, Web, FTP, File, etc). Any time someone tries to access this box over samba, it freezes their explorer about 3/4 of the time. It seems to be a long timeout of some kind, but I can't figure out what it is. Sometimes after the very long wait, it all works great, until you need to access it again. If there are drive mappings to that server, just opening "My Computer" causes extreme delay/lockups, and has even froze the OS.

This may not even be a samba problem. It could easily be a Windows problem. In fact, I'm sure Windows could do a lot better job dealing with the issue, whatever it might be. The catch, though, is that shares on the Windows server (as well as other Windows workstations) can be accessed just fine. It's only the samba shares that are causing trouble.

I checked CPU utilization, and it is nearly nothing. The server is a 2.4 GHz P4 with 512 MB ram. I wouldn't expect it to be taxed greatly, esp. since we have less than 25 workstations total, and less than a third of those need access to samba particularly.

Anyway, I thought DNS might be an issue, since XP/2003 uses it extensively. Our master domain, "domain.com" is controlled by linux (primary DNS server), and office.domain.com is controlled by Windows. The linux box performs a zone transfer every few hours and downloads the child domain from Windows 2003. DNS appears to be ok. I think if the DNS were at fault, logins to Windows would fail. That all works fine.

Earlier, I tried joining samba to the domain, and it didn't fare well, so I reverted back to the standalone configuration. I had issues getting Kerberos working properly with the domain, so I could join. As a result, its not a member of the domain.

I'm a bit lost, and I just don't know what the problem is, but it's killing us.

Any suggestions? As always, any info would be appreciated!

Here's my smb.conf:

# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2004/04/19 15:25:50

# Global parameters
[global]
workgroup = OFFICE
server string = Samba Server %v
security = USER
map to guest = Bad User
guest account = guest
client NTLMv2 auth = Yes
client lanman auth = Yes
client plaintext auth = No
log file = /var/log/samba3/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = cups
preferred master = No
local master = No
domain master = No
dns proxy = No
recycle:keeptree = True
recycle:versions = False
recycle:repository = .recycle
printer admin = @adm
printing = cups
vfs objects = recycle

[homes]
path = /data/homes/%U
comment = Home Directories
read only = No
browseable = No

[printers]
comment = All Printers
path = /var/spool/samba3
create mask = 0700
guest ok = Yes
printable = Yes
print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
browseable = No

[print$]
path = /var/lib/samba3/printers
write list = @adm, root
guest ok = Yes

[pdf-generator]
comment = PDF Generator (only valid users)
path = /var/tmp
printable = Yes
print command = /usr/share/samba3/scripts/print-pdf %s ~%u //%L/%u %m %I "%J" &

[ftp]
comment = Anonymous FTP Access
path = /data/ftp
force user = ftp
force group = netadmins
read only = No
create mask = 0775
directory mask = 0775
guest ok = Yes

[public]
path = /data/public
valid users = @netadmins
admin users = @netadmins
read list = @netadmins
write list = @netadmins
force user = root
force group = netadmins
read only = No
create mask = 0777
directory mask = 0777
guest ok = Yes

[web]
path = /data/web
read only = No
create mask = 0775
valid users = @webadmins, guest
write list = @webadmins
read list = @webadmins, guest
admin users = @webadmins
directory mask = 0775
guest ok = No

tbeehler 06-11-2004 11:53 AM

Howdy,

Just a quickie question, Do you have a firewall on the samba server? We had a similar problem with one of our internal test servers. What happens is when a user goes to My Computer, windows will try to read every drive in the list (HD, CD/DVD, Network, Etc.) before displaying the entire list. If it gets hung on one drive, it will appear that the OS locks (at least it did in our circumstances) When we removed the firewall, it worked perfectly. This was an internal machine and the firewall was enabled by default too high. So we tweaked the firewall and now everything works fine. Of course, this might not solve your problem, but I hope it helps out!

Travis Beehler

tisource 06-15-2004 02:56 PM

No, actually, there is no firewall on the samba server. The whole subnet is behind a NAT/IP Masq. router (network appliance). The linux does no routing, bridging or firewalling.

I was running Mandrake 9.2, which comes with samba 2.2.8a. I had installed samba 3 from some user-contributed rpms, which I think was a big part of the problem (if not THE problem). It could be tuning (doubt it, but possible, because I haven't changed anything), and it could be a Kerberos issue (tried joining the Win 2003 domain, which failed), so who knows.

We recently upgraded (reinstalled) to Mandrake 10, and samba 3 (same version as before, 3.0.2a) and I don't get the lag. It runs great.

Thanks for the response.

Synonymous 06-15-2004 11:01 PM

I'm having the same problem! I haven't been able to find anything useful on the net!

I don't have an Active Directory domain - it's just a standalone WinXP machine accessing it. I'm running Redhat 9 with the latest kernel and Samba 2.2.7a-8.9.0. I've tried patching samba to remove a kernel oplocks issue, but didn't solve this timeout problem. I have run a sniff on my network and found that my windows machine would continually retransmit SMB packets, as there are no replies from the linux box.

I think I read somewhere that there's an issue like this with a certain combination of kernels and samba versions, but nothing concrete. I do recall this starting a few months ago, after running redhat update. I am going to try running the box with an older kernel and see if that helps at all.

I'm tempted to follow with the Mandrake 10 idea, but I finally got this box configured the way I like it... Other than this whole freezing thing ;-)

tisource 06-16-2004 02:29 PM

I don't know, but I think the rpm's (because they were user-contributed) are bad. The server, as it stands now, is a standalone box (it isn't a member of a windows domain). I recently set up another samba3 box as a PDC, and it works great. Samba3 well worth the upgrade from 2.8.x.

Synonymous 06-21-2004 06:20 PM

Solved!!!
 
I seem to have solved it! It's been about 4 days now without a freeze or a Samba error in my daily logs.

At first glance, the answer seems to be completely unrelated to the symptoms.

In my Redhat box, I have two nic's. Their IP's are in different subnets, but they're both connected to the same Layer 2 switch (nothing fancy, just an 8-port Linksys). One is 192.168.10.1, which is on the network that all of my systems are on. The other is 192.168.12.1, which is just a spare nic, just in case I decided to make it into a firewall or something some day.

When my XP box would send out an ARP request to find the MAC address which 192.168.10.1 is bound to, the Linux kernel would receive the request, and send a reply out both nic's, indicating it (the kernel) has the address. This appears to be some bug/feature of the Redhat setup. Maybe it's part of some shotty implementation of Proxy ARP, and it's hoped that most people won't have two nics in different subnets in the same broadcast domain.

So in reality, my XP box would receive two replies, from different nic's. So what would happen is that the one from the correct nic would be sent first, and the XP box would receive it and add it to it's ARP cache. Then the second reply would be received, and the XP box would overwrite the entry in it's cache. Therefore, the XP box is sending packets intended for the 192.168.10.1 IP that were addressed to the 192.168.12.1 nic, which will obviously be discarded.

The freezing of the XP box is caused by the wait for the packets and ARP entries to time out. This was not just on Samba traffic, but any service coming from by Redhat box (IMAP, SSH, etc). That's what made me wonder if it was really Samba misbehaving.

I came up with this whole theory after I did a network capture while Windows Explorer my XP box was frozen. My sniffer noted that there were duplicate IP's coming from two different MAC's. I checked my Redhat box for those IP's, and sure enough it had both of them. I logged into the Redhat box and ifdown'd the 192.168.12.1 nic (it's not really needed anyways), and everything has been working correctly since. I don't get a single Samba error in my logs.


Hope this helps!



I used to get these errors:

libsmb/cliconnect.c:cli_connect(792) Error connecting to 192.168.10.4 (Operation already in progress)
lib/util_sock.c:get_peer_addr(978) getpeername failed. Error was Transport endpoint is not connected
smb_readpage_sync: open failed, error=-26 (this would happen on random files on the XP box)

tisource 06-22-2004 05:41 PM

Wow, what a scenario! Good detective work... that's what makes a good network engineer!!

Since we have installed Mandrake 10 Official, samba access flies! I can copy a gigabyte tar.gz file from samba to my XP desktop in less than 45 seconds (yes, we're running gigabit). No delays whatsoever to samba anymore.

Thanks for the response.

Synonymous 06-22-2004 09:33 PM

Well, I do dabble in networking on a multimillion-dollar network here at work ;-) tee hee

I'm debating switching over to Mandrake 10 Official... Redhat 9 had it's end of life in April, so no more updates or anything via the Redhat network :(

tisource 06-26-2004 07:29 PM

Mandrake 10 is a solid release. Their best distro in a very long time.

Jon Morris 06-08-2007 04:12 AM

Explorer hangs
 
I had this problem. I found it to be due to a Netware driver being installed for the network card in the XP machine: Removed the Netware IPX protocol and problem disappeared.

pk315 01-06-2011 06:20 AM

GOD! my solution :disable the firewall.
 
hi
in my testing environments I setup samba server on sLES 11 Desktop.But the xp client can not access it.
try all kinds of ways.
Luckly, it is the cause that my firewall disbale any unknow network.


All times are GMT -5. The time now is 12:04 PM.