LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-27-2004, 11:02 AM   #1
tisource
Member
 
Registered: Feb 2002
Posts: 322

Rep: Reputation: 30
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
 
Old 06-11-2004, 11:53 AM   #2
tbeehler
Member
 
Registered: Aug 2003
Location: Washington State, USA
Distribution: Mainly RH 9.0
Posts: 227

Rep: Reputation: 30
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
 
Old 06-15-2004, 02:56 PM   #3
tisource
Member
 
Registered: Feb 2002
Posts: 322

Original Poster
Rep: Reputation: 30
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.
 
Old 06-15-2004, 11:01 PM   #4
Synonymous
LQ Newbie
 
Registered: Jun 2004
Posts: 3

Rep: Reputation: 0
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 ;-)
 
Old 06-16-2004, 02:29 PM   #5
tisource
Member
 
Registered: Feb 2002
Posts: 322

Original Poster
Rep: Reputation: 30
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.
 
Old 06-21-2004, 06:20 PM   #6
Synonymous
LQ Newbie
 
Registered: Jun 2004
Posts: 3

Rep: Reputation: 0
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)

Last edited by Synonymous; 06-21-2004 at 06:22 PM.
 
Old 06-22-2004, 05:41 PM   #7
tisource
Member
 
Registered: Feb 2002
Posts: 322

Original Poster
Rep: Reputation: 30
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.
 
Old 06-22-2004, 09:33 PM   #8
Synonymous
LQ Newbie
 
Registered: Jun 2004
Posts: 3

Rep: Reputation: 0
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
 
Old 06-26-2004, 07:29 PM   #9
tisource
Member
 
Registered: Feb 2002
Posts: 322

Original Poster
Rep: Reputation: 30
Mandrake 10 is a solid release. Their best distro in a very long time.
 
Old 06-08-2007, 04:12 AM   #10
Jon Morris
LQ Newbie
 
Registered: Jun 2007
Posts: 2

Rep: Reputation: 0
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.
 
Old 01-06-2011, 06:20 AM   #11
pk315
LQ Newbie
 
Registered: Oct 2009
Posts: 5

Rep: Reputation: 0
Wink 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.
 
  


Reply


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
Samba Share access Spadge67 Fedora 3 11-19-2005 06:57 PM
samba network share access Goma_2 Linux - Software 6 03-06-2005 12:10 PM
Samba: can't access share thorax Linux - Software 4 02-13-2005 12:39 PM
windows system hangs while accessing SAMBA share emailssent Linux - Software 0 09-14-2004 07:53 AM
mount of samba share hangs on command line Gates1026 Linux - Software 2 11-19-2003 08:57 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration