Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Samba server not responding on one share.

Status
Not open for further replies.

SunBurnt5

Technical User
Jun 14, 2006
7
US
I'm using Samba to mount shares for a Linux distro that's PXE booted.
The boot process went fast, now it's good up to one paticular share & it stalls for 30 seconds.
It reports that the Samba server isn't responding, then tries a second time & the server responds immediately.
Boot procedure:
The "sys" share is mounted & the next boot script is accessed from it, more shares are mounted & all is good, then a file in "sys" is mounted & it stalls for 30 sec., & then booting continues.
I put a "ls /mnt/sys" command before the "mount" command & it stalls & then the file is mounted immediately after that.
This shows that the server not responding is a problem with the share access, not the file being mounted.

I can post the code but being as this worked for months with no problems, I don't think it will help.
I tried reinstalling Samba server 3.0.21c & no change.
I can't see why the Samba share works the first time & then after other shares are mounted, the server doesn't respond to another access request the first time but does respond immediately the second try.
I can post the smb.conf file or the exact error being reported if needed, but as I said it's worked for months as it is.
 
ADDENDUM:
Here's the error report when the client stalls at the "sys" share.

SMB server not responding
Smb_get_length: Receive error = 5
Smb_trans2_request: result=-5, setting invalid
Smb_retry: successful, new pid=155, generation=2

In line #3, what setting would be invalid (see smb.conf below)?
And then why does it work on the second try?

Here's the smb.conf file, the [sys] share is the problem.

[global]
workgroup = PUPGROUP
server string = Samba Server
security = share
hosts allow = 192.168.0. 127.
hosts deny = ALL
max log size = 50
socket options = TCP_NODELAY
dns proxy = no
guest account = root

[docs]
comment = Documents Share
path = /mnt/home/docs
public = yes
only guest = yes
hide dot files = yes
writable = no
printable = no
browseable = yes

[public]
comment = Public Share
path = /mnt/home/public
public = yes
only guest = yes
hide dot files = yes
writable = yes
wide links = no
browseable = yes
follow symlinks = no

[sys]
comment = System Share
path = /mnt/home/lanpup/sys
public = yes
only guest = yes
writable = no
browseable = no

[homes]
comment = Home directory for %S
root preexec = /mnt/home/lanpup/sys/homes-setup %m
path=/mnt/%m
public = yes
only guest = yes
writeable = yes
browseable = no
 
Config looks ok
Is that all that's in the global section?

interfaces = x.x.x.x 127.0.0.1
bind interfaces only = Yes
socket address = x.x.x.x

Try adding the above lines to global, if it still has the issue, remove the last 'socket address' line.




"If you always do what you've always done, you will always be where you've always been."
 
Hi rzs0502; Thanks for responding!

I tried your suggestions & no change, after looking up info on the settings... my setup is a small LAN, 1 interface only, so they probably wouldn't help.

There's still the 30 second delay after the client's IP address is changed from the temp. IP for booting to the permanent one.

Q:
IS there a way to set a Samba client's wait time for mounting a share?
After the IP change, the first attempt to mount a share fails, after a 30 second delay the second attempt always works, & then everything's fine after that.

If the wait for the server to respond could be set at say... 5 seconds before smbmount try #2, then it wouldn't be so bad.
 
It may network related.
Do you have any issues (ie. dropped packets, card set to 100 half duplex etc)?
(Use mii-tool on linux to check card speed)


"If you always do what you've always done, you will always be where you've always been."
 
... SOLVED ...

I should have guessed it was my code, the command I used was:
ifconfig eth0 $IP

It should have included the subnet declaration also:
ifconfig eth0 $IP netmask 255.255.255.0 up

It no longer pauses on the next mount command, it now rockets straight through!

Many thanks rzs0502 for your assistance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top