amttala
(Fresh Scripter)
2003-11-13 05:00 AM
Script Intermittently and randomly hangs

I'm reasonably new to Kix and although I have been successfully using Kix for the last 4 months in my network to do a few minor group-drive mappings and registry key updates, I consider myself a newbie to the scripting world.

My problem - Kix has been running perfectly for the past 4 months however last week it has started intermittently and randomly hanging after the users have logged in. The strange thing is, I can't replicate the problem exactly each time I log in. Sometimes it runs without a hitch, then using the same PC, same login account, logoff then log back on - fails! Restart the PC and then the script maybe fails, maybe works. This happens on any of the PC's and there seems to be no pattern with which to trace this issue. It doesn't matter whether I call the login script from a batch file (locally on the PC, from AD Group Policy Object or Domain Controller Netlogon shares) or directly from the AD Group Policy Object.

I've tried the following and after trawling through this bulletin board, am still at a complete loss as to what the problem is or how to fix it. Any help is much appreciated!

(note here: I manage two separate companies and have kix running at both sites. One site has not had one issue with kix, whereas, I'm experiencing these problems at the other)

- Initially, checked for any inconsistencies between my two sites
- Tried logging in using different login accounts (with varying security rights)
- Tried logging in to different PC's (all PC's are using an SOE, all with identical hardware)
- updated Kix32.exe first to V4.21 then after no luck to v4.22rc1
- copied Kix files/scripts locally to the PC's and calling the login script from there
- Sometimes, while the KIX login window is hung, I can manually navigate to and run the same kix32.exe and login.kix files with the new instance working fine (while the original script is still hung)

Environment:
* Windows 2000 AD - hybrid mode
* 2 x Domain Controllers (win2k sp4)
* 4 x Memeber Servers (win2k sp4)
* 70 * WinXP Pro clients (sp1)
* Kix32.exe (v4.20)(4.21)(4.22rc1)
* Login script is being called from AD Group Policy, User Configuration/Windows Settings/Scripts(logon/logoff)/Logon
* Kix32.exe and script files are located in \\domain\sysvol\domain\scripts


Sealeopard
(KiX Master)
2003-11-13 05:02 AM
Re: Script Intermittently and randomly hangs

Are the scripts replicated correctly?

amttala
(Fresh Scripter)
2003-11-13 05:04 AM
Re: Script Intermittently and randomly hangs

yes.

Howard Bullock
(KiX Supporter)
2003-11-13 05:11 AM
Re: Script Intermittently and randomly hangs

A hang or lockup might indicate communication issues. Have you checked for network and NIC errors?

LonkeroAdministrator
(KiX Master Guru)
2003-11-13 05:12 AM
Re: Script Intermittently and randomly hangs

well, adding some error tracing would help a lot.
create another file with after every line has:
@error " " @time

and maybe a informative message in it.
then use redirectoutput and try that.
you will definitely know where it hangs and start removing the problem.

I found that one of linux server's system drive was screwed that way [Wink]


ShawnAdministrator
(KiX Supporter)
2003-11-13 05:12 AM
Re: Script Intermittently and randomly hangs

would have bet it was replication ... long shot - anything in the eventlog ?

-Shawn


amttala
(Fresh Scripter)
2003-11-13 05:18 AM
Re: Script Intermittently and randomly hangs

Lonkero - will try the error logging and see how that goes, although i forgot to mention that during my troubleshooting so far, i cut the script down to one or two lines and had the same problem
Shawn - my initial thoughts as well.


amttala
(Fresh Scripter)
2003-11-13 05:22 AM
Re: Script Intermittently and randomly hangs

shawn - the only entry in the event log was a message indicating that the script had timed out. if you leave the "hung" script window long enough, it closes although none of the script is actioned.

amttala
(Fresh Scripter)
2003-11-13 05:24 AM
Re: Script Intermittently and randomly hangs

Howard - all 70 PC's are having the same problem. All PC's are < 6 months old, IBM NetVista's with Intel Pro100 NIC's. Core switches are Cisco and PC's are spread across all core switches.

Howard Bullock
(KiX Supporter)
2003-11-13 05:27 AM
Re: Script Intermittently and randomly hangs

I was referring to the server's NICs or error on the switch or router. We use Cisco product also and have found miss configured NIC to Switch ports (10half vs. 100 FULL) stuff.

[ 13. November 2003, 05:28: Message edited by: Howard Bullock ]


ShawnAdministrator
(KiX Supporter)
2003-11-13 05:27 AM
Re: Script Intermittently and randomly hangs

what is the "source" of the event message ? is it from kixtart or some other sub-system ? might want to post the text for the record.

amttala
(Fresh Scripter)
2003-11-13 05:32 AM
Re: Script Intermittently and randomly hangs

Howard/Shawn - will check both and get back to you in 20 mins as I've got to attend an immediate issue. thanks for the help so far!

I'm sure we'll nail this.


Radimus
(KiX Supporter)
2003-11-13 06:11 AM
Re: Script Intermittently and randomly hangs

try running kix32 on the local machine

amttala
(Fresh Scripter)
2003-11-13 06:12 AM
Re: Script Intermittently and randomly hangs

This is the only event logged locally on the PC after the Kix script window has been left to hang and eventually dissappear.

Event ID: 1217
Source: Winlogon
Type: Warning
Category: None
Message: Execution of GPO scripts has timed out and have been terminated.


LonkeroAdministrator
(KiX Master Guru)
2003-11-13 06:14 AM
Re: Script Intermittently and randomly hangs

eh, did you read the initial post rad?

amttala
(Fresh Scripter)
2003-11-13 06:14 AM
Re: Script Intermittently and randomly hangs

see my initial posting. Already tried copying all files locally to the PC and running kix from there.

LonkeroAdministrator
(KiX Master Guru)
2003-11-13 06:16 AM
Re: Script Intermittently and randomly hangs

could you pass the line you use to call kix.

ShawnAdministrator
(KiX Supporter)
2003-11-13 06:21 AM
Re: Script Intermittently and randomly hangs

are you calling kix32.exe directly or are you calling it from a batch script ? can you put a tracer in the batch script and at the top of the kix script to see which one is hanging.

amttala
(Fresh Scripter)
2003-11-13 06:34 AM
Re: Script Intermittently and randomly hangs

Lonkero;

I'll assume you're familiar with AD and Group Policy so..from the Default AD Group Policy Window, I select Edit/User Configuration/Windows Settings/Script(logon/logoff)/Logon, choose Edit, then navigate to and select the kix32.exe file located in \\domain.com.au\SysVol\domain.com.au\scripts\
and once selected in the "Script Name" window, enter in the "Script Parameters" box below: login.kix

This way, the Group Policy applied to all domain users during logon, calls the kix32.exe file from the \\domain.com.au\SysVol\domain.com.au\scripts folder and passes the login.kix parameter to it.

Using a batch file to call Kix and script caused some problems with the XP clients so this is the method I chose. It's still working without a hitch at company 2.


LonkeroAdministrator
(KiX Master Guru)
2003-11-13 06:40 AM
Re: Script Intermittently and randomly hangs

k, then I must start asking about:
-is there someone else working with the servers?
-is there change in the servers?
-new hardware added?
-did you have problems with the latest viruses?
-what virus software do you use?

oh and most importantly...
could you try using wkix32 instead of kix32.


amttala
(Fresh Scripter)
2003-11-13 06:49 AM
Re: Script Intermittently and randomly hangs

one change to the servers - one of 3 domain controllers had be demoted to a member server 2 weeks ago and before the problem. (existing and current other 2 DC's not changed)

I know what you're probably thinking and I did initially think that this could be the cause of the problem, however, the demotion was completed without issues at the time and the replication and AD seems to be OK. There are also no errors/problems in the event logs for all domain servers.

Do you think I've missed something here?


amttala
(Fresh Scripter)
2003-11-13 07:19 AM
Re: Script Intermittently and randomly hangs

have to fly - will check bulletin again tomorrow (ESDT)
thanks everyone.


ShawnAdministrator
(KiX Supporter)
2003-11-13 02:05 PM
Re: Script Intermittently and randomly hangs

Here's kind of an odd-ball question. Are you experiencing this scenario:

You will reboot the machine and the logon may work correctly, and if it does work it will keep on working correctly until the machine is rebooted again, at which point it may or may not work correctly ... and if it doesn't work, it will keep on not working until the machine is rebooted again.

Follow ? Or does this happen intermittently between reboots ?

-Shawn

[ 13. November 2003, 14:09: Message edited by: Shawn ]


Howard Bullock
(KiX Supporter)
2003-11-13 02:09 PM
Re: Script Intermittently and randomly hangs

Shawn, that is not an odd-ball question. I thought about that as well but did not ask for clarification.

ShawnAdministrator
(KiX Supporter)
2003-11-13 02:11 PM
Re: Script Intermittently and randomly hangs

ja, thinking it might be some kind of weird secure channel issue, but the fact that the user can authenticate kind of clouds the issue.

Kdyer
(KiX Supporter)
2003-11-13 02:13 PM
Re: Script Intermittently and randomly hangs

Can you post the contents of your script? Or the piece that is giving you trouble?

Kent


Howard Bullock
(KiX Supporter)
2003-11-13 02:13 PM
Re: Script Intermittently and randomly hangs

Or it could be XP's user logon enhancement were the user is logged on prior to the network starting.

ShawnAdministrator
(KiX Supporter)
2003-11-13 02:16 PM
Re: Script Intermittently and randomly hangs

Kent, I think the problem is not what is in the script, but just simply getting the script running - don't think kix is even starting. Have we actually determined this though ? Has he put in a visual tracer/pause as the very first line yet ? Don't think so, have to re-read thread. Think this is important.

Kdyer
(KiX Supporter)
2003-11-13 02:20 PM
Re: Script Intermittently and randomly hangs

OK.. While it may not be the script.. What about how he is calling it?

Sure you can use NTLOGON.BAT, but what about simply KIX32 and the program auto searches out KIXTART.KIX?

There was a guy last week that posted that had a problem with KIX32.EXE itself on one of his DCs. Maybe a CRC/MD5 Checksum is needed.

Kent

[ 13. November 2003, 14:22: Message edited by: kdyer ]


ShawnAdministrator
(KiX Supporter)
2003-11-13 02:27 PM
Re: Script Intermittently and randomly hangs

I think he stated that he replaced kix32.exe on his netlogons and even ran it locally but should verify this ... he must replace all copies of kix32.exe on both (all) his DC's ... he also states that he calls kix32.exe right out of user manager so no batch file involved - although I like the idea of maybe temp. replacing this statement with a call to a dummy bat file that has a PAUSE in it ...

Think we need to know whether kix32 gets started or not, only way is to put a tracer in or check-out task manager or something.

By the way, wonder if he's running synchronous or asynchronous scripts ... sounds like he's running asynch so maybe he could flip that to see if any diff.


Les
(KiX Master)
2003-11-13 02:44 PM
Re: Script Intermittently and randomly hangs

The DNS and the demoted DC is where I would focus. Look through your DNS for orphaned SRV records.

Les
(KiX Master)
2003-11-13 02:45 PM
Re: Script Intermittently and randomly hangs

BTW Shawn, GPO scrips always run async. [Roll Eyes]

ShawnAdministrator
(KiX Supporter)
2003-11-13 02:47 PM
Re: Script Intermittently and randomly hangs

just re-read thread and it seems that he has tried all these things ... would like to know:

1) Has you tried configuring the login script from the user properites dialog itself, instead of from GPO's ?

2) Check which domain controller is authenticating you every time you login by echoing %logonsever%, it it always the same DC that is timing out ?

3) Still fuzzy in terms of what is starting and what is not. I think your hinting that kix32.exe is starting but is hanging, but is it finding and reading the script ?


Les
(KiX Master)
2003-11-13 02:54 PM
Re: Script Intermittently and randomly hangs

Shawn,
quote:
Check which domain controller is authenticating you every time you login by echoing %logonsever%...
I was troubleshooting a problem that stemmed from rogue SRV records and tried that very thing. Had a one-liner GPO script echo %COMPUTERNAME% and %LOGONSERVER%. More often than not, %LOGONSERVER% was blank. Go figure!


ShawnAdministrator
(KiX Supporter)
2003-11-13 06:05 PM
Re: Script Intermittently and randomly hangs

Les,

Was kinda figuring that amttala would just pop in here and minute and say you nailed it ! ... Do think your on to something here.

-Shawn


MCA
(KiX Supporter)
2003-11-13 06:13 PM
Re: Script Intermittently and randomly hangs

Dear,

For another way of debugging your code see Debugging script without user input. also during logging on. the advanced way.
greetings.


Les
(KiX Master)
2003-11-13 06:22 PM
Re: Script Intermittently and randomly hangs

Shawn,
Gee, was hoping you had an answer for my "Go Figure" thingy. Nah, that'd be hijaaking... fer-ged-aboud-it

I took a week long Troubleshooting AD course and the top three things they stressed over and over and over were:

1 - Check the DNS
2 - Double Check the DNS
3 - Triple Check the DNS


MCA
(KiX Supporter)
2003-11-16 11:19 PM
Re: Script Intermittently and randomly hangs

Dear,

Possible, that above links don't work anymore.
On our site those information is still available.
greetings.


amttala
(Fresh Scripter)
2003-11-18 03:31 AM
Re: Script Intermittently and randomly hangs

Hi people - many apologies for not popping back in earlier, although I did try a few times over the last few days and got a "cgi-script" error when acccessing this forum.
First - thanks for all your help so far, I've read through all the threads since my last visit and have tried a couple of your ideas.
What I did in the end (due to time constraints) that seems to have sorted it all out was and old but sometimes effective method: I removed all kix32.exe and *.kix scripts from all my domain controllers and from the XP workstations, removed the group policy object from the A.D, deleted all copies of C:\Windows\prefetch\kix* files from my XP workstations. THEN started again, re-created GPO in AD, created a shutdown script in the GPO (batch file) that copied the latest kix32.exe and logon.kix files a newly created C:\kix folder of my XP workstations, setup configured the scripts to run locally on the workstations and to be called directly from the GPO (no batch file).

Since then, the scripts seem to be working OK. What is still annoying, though, is that I don't really know why they behaved the way they did in the first place? I'm sure we've all been there before, where ANYTHING to get a problem resolved is a welcomed relief, even though you're still not sure what it was that fixed the problem.

I will continue to try and track the seemingly obscure source of my issue so that others may not feel the same frustration and will post any updates I think are relevant.

I have a horrible feeling that my issue may only be temporarily resolved.


kjhoskin
(Fresh Scripter)
2004-02-04 02:26 PM
Re: Script Intermittently and randomly hangs

Hi All,

Iím experiencing the exact same problems on my site, there are a few slight differences in our setup which might shed some light on things.

We have one site, 4 DCís, 2 w2k and 2 w2k3, the w2k DC are about to be demoted. Weíre a w2k pro shop with around 250 workstations, up until now that is. I have just configured 2 WinXP SP1 workstations for myself and a colleague so we can run the w2k3 server tools. Both workstations are experiencing the problem of random hanging at the applying your personnel setting stage. If you leave the workstation it will eventually login, after an hour or so, and give the 1217 error in the event log.

The problem ONLY happens with WinXP SP1 clients. We use a number of group policies and run with Always wait for the network at computer startup and logon setting enabled as to is the Run logon scripts synchronously setting.

I would say the problem occurs 1 out of 5 logons, making it a pain to troubleshoot. Restarting the PC and logging back in under the same ID doesnít work, restarting in Safemode with networking and logging in seems to clear the problem. Kix32.exe is run locally and I have just upgraded to the latest version.

Cheers

Kerry


Kdyer
(KiX Supporter)
2004-02-04 03:01 PM
Re: Script Intermittently and randomly hangs

Is there a reason for you hijakking this thread? You should have started a new one and referred back to this.

Anyway, have you had a look at - Windows XP Professional Fast Logon Optimization? Also, there are a number FAQ topics that may help you as well while you are perusing that Forum.

Kent



kjhoskin
(Fresh Scripter)
2004-02-04 03:34 PM
Re: Script Intermittently and randomly hangs

I'm not hijakking the thread its the same topic, its the same problem, and its nothing to do with WinXP Fast Logon as this is turned off on our site.

Cheers


Sealeopard
(KiX Master)
2004-02-04 04:44 PM
Re: Script Intermittently and randomly hangs

See http://www.eventid.net/display.asp?eventid=1217

How exactly are you calling the scripts in the GPO?


kjhoskin
(Fresh Scripter)
2004-02-04 05:09 PM
Re: Script Intermittently and randomly hangs

eventid was my first port of call! The kix script is being called from a bat file which is run from a GPO. As I said it only sporadically effects XP boxes w2k boxes work fine, grrrrrrrrrrr

Kerry


Sealeopard
(KiX Master)
2004-02-04 05:16 PM
Re: Script Intermittently and randomly hangs

So, what's the content of the batch file, then?

kjhoskin
(Fresh Scripter)
2004-02-04 05:25 PM
Re: Script Intermittently and randomly hangs

just the bog standard bat file

@Echo Off
CLS
XCOPY %0\..\KIX32.EXE c:\kix\2001\ /D /H /I /R /V > NUL
SET KIXDIR=c:\kix\2001
%KIXDIR%\KIX32.EXE %0\..\logon.KIX
exit



Sealeopard
(KiX Master)
2004-02-04 06:34 PM
Re: Script Intermittently and randomly hangs

Quote:

just the bog standard bat file



Not really!

See our fine FAQ Forum under Use of %0\..\ to launch KiX


kjhoskin
(Fresh Scripter)
2004-02-05 12:30 PM
Re: Script Intermittently and randomly hangs

Ok I have amended the script to get rid of the %0 and I have also turned off the Run logon scripts synchronously GPO setting, still getting the problem

Sealeopard
(KiX Master)
2004-02-05 01:47 PM
Re: Script Intermittently and randomly hangs

Does it happen with batch files, too? Are the login scripts replicated correctly among the DCS? It sounds to me like a non-KiXtart problem but a problem with your AD or network.

LonkeroAdministrator
(KiX Master Guru)
2004-02-05 02:42 PM
Re: Script Intermittently and randomly hangs

k, you say same problem but does the batch file fire up?

[wow, I had this same post open for about 2 hours before got my reply in. now is that wicked or what?]


kjhoskin
(Fresh Scripter)
2004-02-05 08:28 PM
Re: Script Intermittently and randomly hangs

Ok the bat file fires upo just fine as does the kix script, it is a sporadic problem that happens maybe 1 out of 4 or 5 logons, making it a pain to troubleshoot! The scripts are replicating fine we don't have any replication issues, and the problem ONLY affects WinXP workstations, we have over 230 w2k workstations that work just fine. I'm going to move the offending PC's to an OU where no scripts run and see what happens

Cheers

Kerry


Les
(KiX Master)
2004-02-05 08:57 PM
Re: Script Intermittently and randomly hangs

I run AD on 2K and have a GPO based logon script that runs every time on my XP/SP1. The error you report is a GPO issue, not a KiX issue. That, of course is of no comfort to you as you simply want to resolve the issue.

Intermittent problems are a bitch to solve, but the place to start is to run network sniffer traces.


kjhoskin
(Fresh Scripter)
2004-02-05 09:01 PM
Re: Script Intermittently and randomly hangs

Yeah I think you're probably right. I was just having a peak on here and found someone else with the same problem, there are a couple others I've found on Google with the same problems, grrrrrrrrrrr

LonkeroAdministrator
(KiX Master Guru)
2004-02-06 06:39 AM
Re: Script Intermittently and randomly hangs

I still think kent was right in the beginning...
would have been lot better to start a new thread and just point to this one.
and yes, I'm not sure these are the same problems.
nor I think the problem solving has been done in the same way.