Page 1 of 1 1
Topic Options
#163655 - 2006-06-26 01:57 PM Drive mapping / server down / script hang - shouldn't something timeout?
myxiplx Offline
Lurker

Registered: 2006-06-26
Posts: 2
This weekend our archive server died. Now that shouldn't have caused any problems but for some reason the network logon scripts mapping a drive to that server hung as staff logged on, and we found AutoCAD hung on file/open.

Ordinarily I'd expect something like the USE command to timeout after a short while if a share isn't available, but it appeared to hang the logon script completely this weekend. I didn't really pay a lot of attention, just rebooted things to clear the errors, but the script had certainly hung for long enough for the server to reboot, and I had to reboot the clients to clear the problem.

2 questions I'm struggling to answer right now:

- How does the USE command handle errors. Does it have a default timeout?
- Are there any changes I can make to the scripts so they don't hang like this?

thanks,

Ross

Top
#163656 - 2006-06-26 04:49 PM Re: Drive mapping / server down / script hang - shouldn't something timeout?
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Good question, I've experienced these kind of problems as well. As it appears there is no timeout for the Use commands. Nor can you kill the use command if you scripted a timer for it. It is definately something that should be looked at.
Top
#163657 - 2006-06-26 08:18 PM Re: Drive mapping / server down / script hang - shouldn't something timeout?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
there is a timeout, sure.
it's a bit long though...
think you can adjust it, but around a minute or so it should be as default.

and it's not use only that will "hang"

if you wanna get it a bit faster, you can try with if exist() to test is that share you try to map to mappable.
_________________________
!

download KiXnet

Top
#163658 - 2006-06-26 10:01 PM Re: Drive mapping / server down / script hang - shouldn't something timeout?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Well I think we need to see your code as I don't have that result.

Code:
Break On
Dim $Start, $Stop, $Timeout
'KiXtart version is: ' + @KiX ?
$Start = @TICKS
'Start time was: ' + $Start ?
'Will now try to map a bogus share that does not exist...' ?
USE X: '\\BOGUS\NOTHERE'
'Error mapping drive was: ' + @ERROR + ' - ' +@SERROR ?
$Stop = @TICKS
$Timeout = ($Stop-$Start)
'Time out took ' + $Timeout ?



Produced this result for me.

Code:
KiXtart version is: 4.52 Release Candidate 2
Start time was: 506277843
Will now try to map a bogus share that does not exist...
Error mapping drive was: 1203 - No network provider accepted the given network path.
Time out took 2282


 
As you can see the timeout for me was under 3 seconds.
Maybe some other issues going on there.

But this was NOT done within a LOGON script, it was done from a system that was already logged on.

Top
#163659 - 2006-06-26 10:09 PM Re: Drive mapping / server down / script hang - shouldn't something timeout?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
My guess is the server wasn't *really* down but probably acting like a LaBrea Tarpit.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#163660 - 2006-06-26 10:12 PM Re: Drive mapping / server down / script hang - shouldn't something timeout?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Quote:

LaBrea Tarpit




ROFLMAO - hehe... hmmm like a SAMBA connection trying to locate the proper Windows resources?

Top
#163661 - 2006-06-26 10:47 PM Re: Drive mapping / server down / script hang - shouldn't something timeout?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
it's a well known fact that use statement can take ages.
I'm sorry doc that your bogus test couldn't reproduce that.
_________________________
!

download KiXnet

Top
#163662 - 2006-06-27 12:01 AM Re: Drive mapping / server down / script hang - shouldn't something timeout?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Well I know that yes in the past NET USE could take up to 45 seconds or more to fail when I was at the Mouse.

But here on my network I don't have that issue. Have tested on 5 systems now and the longest one took only 7 seconds to fail using either KiXtart USE or the NET USE command.

Top
#163663 - 2006-06-27 12:18 AM Re: Drive mapping / server down / script hang - shouldn't something timeout?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well... trying to map to a non-existent name that it cannot resolve is not the same as trying to map to one it can resolve but behaves like a Tarpit.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#163664 - 2006-06-27 10:15 AM Re: Drive mapping / server down / script hang - shouldn't something timeout?
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Quote:

Well... trying to map to a non-existent name that it cannot resolve is not the same as trying to map to one it can resolve but behaves like a Tarpit.




True. If the server is not actually down then you may get this sort of problem, and there is not really a good solution.

The problem is that the server may be sufficiently active to accept any part of the drive mapping process and *then* block - something like a hung process which has set a kernel latch to protect an atomic operation.

As far as the client is concerned it has a valid and active connection, so it will not time out. If the client is in a system call it may not be possible to timeout even if you wanted to.

I think it's fair to say that this was an unusual situation so any sort of aberrant behaviour is possible.

Top
#163665 - 2006-06-27 10:33 AM Re: Drive mapping / server down / script hang - shouldn't something timeout?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
actually...
there is also the option that the server is offline or just responding to name query.
this way, the system is still "findable" on the network, just that the drive map does not function.
this will produce a looong timeout.
_________________________
!

download KiXnet

Top
#163666 - 2006-06-27 11:10 AM Re: Drive mapping / server down / script hang - shouldn't something timeout?
myxiplx Offline
Lurker

Registered: 2006-06-26
Posts: 2
Yeah, server was still powered on and visible on the network, but explorer hung on my machine when I tried to connect to it... didn't get the 'share unavailable' message until after I rebooted it.

If exist() sounds like it's worth implementing anyway, but I'm gonna put this one down to a problem caused by the server crash rather than the logon script.

Thanks for all the feedback guys.

Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.083 seconds in which 0.035 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org