Tech Support > Microsoft Windows > Windows Server > Logon script stalls for 15 minutes
Logon script stalls for 15 minutes
Posted by Wayne on February 6th, 2007


We recently upgraded several hundred XP computers to SP2.
Some users reported their logon script stalled at the dos box for 15 minutes
and then completed normally. During this time, there was very little they
could do with the computer. On further investigation, users that had an
invalid drive mapping in the logon were effected. Fixing the bad drive
mapping solved the immediate problem, but unknown or future invalid drives
being mapped in the script for a user will stall for 15 minutes. A simple net
use g: \\servername\invalidsharename will pause for 15 minutes and then give
a timeout error. Uninstalling SP2 resolves problem as well. The problem also
only occurs on some computers.
Any ideas ?

Posted by Herb Martin on February 6th, 2007



"Wayne" <Wayne@discussions.microsoft.com> wrote in message
news:54FD9D58-98F4-4B7A-A818-3241FD2988F9@microsoft.com...
Each startup script SHOULD timeout (by default) after 10 minutes (600
seconds)
if I recall correctly. (So your users may be exaggerating a LITTLE).


I have never seen a "net use" comman take that long, usually on the order of
10-30 seconds would be about normal.

You can reduce the timeout -- but that won't solve the real problem.

Can you replicate the problem? Can you isolate it? (Is Net Use the only
command?)



Posted by Dave Patrick on February 6th, 2007


I'd try turning off the firewall to be sure that isn't an issue. Also try
using the IP address in place of the server name to rule out DNS/ WINS
issues.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Wayne" wrote:

Posted by Wayne on February 6th, 2007


Thanks for the feedback.
It may be 10 minutes, I haven't acutally timed it.

On a computer that does not have SP2 it takes under 30 seconds to timeout
with an error 53 network path not found. I have tried the server IP address on
a computer that has the problem and this takes the 10 minutes or so to
returns error code 121. Un-installing SP2 resolves the issue.

Ideas, continuing to test

"Dave Patrick" wrote:

Posted by Herb Martin on February 6th, 2007



"Wayne" <Wayne@discussions.microsoft.com> wrote in message
news:76F95812-D6DE-4F46-8E52-FA82BB127A4D@microsoft.com...
SP2 works fine for most people so watch out for FIREWALL issues, which
was enabled by default on SP2 new installs.

The only reason for the 10 minute emphasis is to recognize that this is
timing out due to a (likely complete) stoppage of the script, and the GPO
limit being reached.

Suppose you have a "net use * /d" in the script then there will be a prompt
for "Do you want to continue this operation? (Y/N)" and it will hang there
since no one is available to answer the prompt.

Look especially for errors and confirmation points where the script might
halt waiting on "user input".

I keep a file full of "y"s and another full of "n"s in my batch file
directory
just to use with scripts that have commands which cannot be set to auto
confirm or auto-reject such prompts. (Each file has tens of thousands of
lines with either "y" or "n" to answer yes or no to such prompts, depending
on my preference.

So:

net use * /d <c:\bat\n.txt

....will NOT halt and wait on input but will reject the confirmation prompt
by answering N(o).

--
Herb Martin, MCSE, MVP
http://www.LearnQuick.Com
(phone on web site)



Posted by Wayne on February 6th, 2007


Herb, thanks for the update.
We have configured the SP2 install to have the firewall off by default.
I checked the firewall setting in windows=off

c:\net use * /d
clears all mappings.
net use k: \\servername\validsharename (ok)
net use L: \\servername\invalidsharename (10 minutes)
remove SP2
c:\net use * /d
net use L: \\servername\invalidsharename (ok)

Not all computers have this problem.

"Herb Martin" wrote:

Posted by Herb Martin on February 6th, 2007



"Wayne" <Wayne@discussions.microsoft.com> wrote in message
news:C8B6C8C4-D6C4-473F-BBCD-1428CFB02C19@microsoft.com...
So why use an "Invalid Sharename" in a script you have already tested?

Try writing EVERY commands output, both ERROR and STANDARD to a text file.

The syntax for this is very tricky (because it is ORDER dependent unlike
most
command prompt switch etc settings):

COMMAND with switches 2>&1 1>filename.txt

....or for appending:

COMMAND with switches 2>&1 1>>filename.txt

2>&1 puts the standard ERROR to standard output, and the 1> or 1>>
sends both to the file. You must not switch the order of these two items.

--
Herb Martin, MCSE, MVP
http://www.LearnQuick.Com
(phone on web site)



Posted by Wayne on February 6th, 2007


Thanks Herb,
The simple answer would be to confirm that no users scripts ever had an error.
The problem is that with over 25000 users in the organization, it would be
difficult to ensure that changes to multiple script would never cause this
issue.
Let's say for instance we had one server goes down. For anyone mapping to a
share on that server, their script would stall for 10 minutes on login. Or
say someone changes a sharename to be an invalid name, a lot of users could
be stuck at the logon for 10 minutes.
I'm hoping we can identify the issue that has come up since the install of
service pack 2, so that in these cases, the script would error and go by
within 30 seconds, as it has always worked.

"Herb Martin" wrote:

Posted by Herb Martin on February 6th, 2007



"Wayne" <Wayne@discussions.microsoft.com> wrote in message
news:24C1F592-0F5F-4617-8A9F-B8A620F65EA4@microsoft.com...
Truthfully, I am still having a bit of trouble totally believing that the
problem
is an invalid share name and the Net Use command but this one seems like
something you CAN prevent with a proper change control system.*

*Anyone with 25000 users and no NAZI-like change control system is
asking for trouble. I hate these things but they are necessary for large
deployments.

Well, can you repeat it reliably?

IF so, then instrument (a version of) the script and dump the output to a
file as I indicated -- both error and standard output.

THis will prove what is working and what is failing and give you perhaps
an error message you can use.

--
Herb Martin, MCSE, MVP
http://www.LearnQuick.Com
(phone on web site)



Posted by Wayne on February 6th, 2007


C:\>net use m: \\smallville\xrits 2>&1 1>c:\valid.txt

Contents: The command completed successfully.

C:\>net use n: \\smallville\xrit 2>&1 1>c:\invalid.txt
System error 121 has occurred.

The semaphore timeout period has expired.

Output did not go to my txt file, but to the screen.
Note: \\smallville\xrit is invalid sharename
The 121 error is consistent, even if I use the IP address of the server.




"Herb Martin" wrote:

Posted by Herb Martin on February 6th, 2007



"Wayne" <Wayne@discussions.microsoft.com> wrote in message
news:24A4C2AA-B02F-45A0-9F6B-ED566259745E@microsoft.com...
After the first write to the file you must use 1>>c:\etc
or you will erase the previous records.

I apologize -- warned you that the order it PICKY and even I
got it backwards.

Should be: 2>&1 LAST:

C:\>net use n: \\smallville\xrit 1>c:\invalid.txt 2>&1

It is LOGICALLY backwards which is why I keep this in a
text file but that file wasn't handy here.

Sorry.



Posted by Wayne on February 7th, 2007


Herb,
Thank you, I appreciate the knowledge tranfer, this will help me to capture
the problem.
This error and be reproduced on many computers, and on every computer the
problem can be eliminated by removing SP2.
We are in the process of a cleanup of invalid share mappings which were
inherited through an acquisition.
I would still like to understand why the service pack SP2 is effecting the
fundamental net use mapping architecture.

Thanks again for your assistance Herb. Let me know if anything comes to mind
on this one.



"Herb Martin" wrote:

Posted by Herb Martin on February 7th, 2007



"Wayne" <Wayne@discussions.microsoft.com> wrote in message
news:60605450-D84A-4652-99E9-162E9BF91694@microsoft.com...

I should have suggested a Google search earlier. Have you tried looking
through these results (I didn't see anything that jumps out but I didn't
read
them in detail, go to the 2nd page, or keep adjusting the search):

[ site:microsoft.com xp sp2 "net use" logon script ~hangs ]


--
Herb Martin, MCSE, MVP
http://www.LearnQuick.Com
(phone on web site)



Posted by Wayne on February 7th, 2007


I have googled the problem with no relevant success so far, including ms.

"Herb Martin" wrote:

Posted by Wayne on February 14th, 2007


Hi all,
I am still looking for a solution to this problem.

Since SP2, net use hangs on invalid mapping for 10 minutes.

net use k: \\192.168.1.1\validsharename (ok)
net use L:\\192.168.1.1\invalidsharename (hangs 10 minutes)

Anyone seen this problem ?
Remove SP2, all ok.

"Wayne" wrote:

Posted by Tim Radney on April 24th, 2008


Has anyone identified are resolution to this.

Posted by Danny Sanders on April 24th, 2008


You are having the same issue as what? A resolution for what?


DDS

<Tim Radney> wrote in message news:2008424155542rad.tim@gmail.com...


Posted by JohnB on April 24th, 2008


Check Stuart Gormley's post from 4/22


<Tim Radney> wrote in message news:2008424155542rad.tim@gmail.com...


Posted by Herb Martin on April 24th, 2008



<Tim Radney> wrote in message news:2008424155542rad.tim@gmail.com...
Post your question, symptoms, and what you have tried.



Posted by Mike Maddalena on June 25th, 2008


Long timeouts if using the net use command to an invalid share. A down server for example. Anybody figure this out yet?