Page 1 of 1 1
Topic Options
#212057 - 2016-10-26 05:31 PM Problems on Server 2008 (not R2) of late
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
We've been using Kix to perform several different maintenance and monitoring tasks across about 2500 different machines. It's a broad mix - a couple of XP and 2003 systems waiting for upgrade, mostly W7, 8.1, and 10 workstations and Server 2008r2 and 2012/2012r2 platforms. The Kix utilities are running as expected on all of these. The Server 2008 platforms, however, are another story. Kix itself works fine, but the UDFs that we use to perform WMI queries are mostly failing. In particular, I'm using the WMIUptime UDF and several generic WMI queries to obtain lists of local hard drives. What is frustrating is that WMI queries made directly from our monitoring server on each subnet seem to work properly.

The Kixforms.dll (latest ver) is also having problems on the Server 2008 platforms - we can register it fine (apparently). I have test code that simply instantiates the DLL, which works, but when I run a utility that actually uses the DLL functionality, it throws an error dialog box: "Windows - Unable To Locate Component", followed by "Exception Processing Message 0xc0000135" followed by parameters when the DLL is instantiated.
 Code:
$SYSTEM = CreateObject('Kixtart.System')
If VarType($SYSTEM) <> 9 or @ERROR
  If Exist(@SCRIPTDIR + '\kixforms.dll')
    Shell 'RegSvr32 /s ' + @SCRIPTDIR + '\KixForms.dll'
    $SYSTEM = CreateObject('Kixtart.System')
    If VarType($SYSTEM) <> 9 or @ERROR
      fError('Unable to register and instantiate KF.DLL', 1)
    EndIf
  Else
    fError('KF.DLL is not present', 2)
  EndIf
EndIf
This is the basic logic I use to verify that Kixforms.dll is present and can be used.

I'm still digging into the issue, but if anyone has seen this and shed more light on the issue, it would be greatly appreciated.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#212058 - 2016-10-26 09:33 PM Re: Problems on Server 2008 (not R2) of late [Re: Glenn Barnas]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4562
Loc: USA
Maybe a .Net version issue?
Top
#212059 - 2016-10-27 09:14 AM Re: Problems on Server 2008 (not R2) of late [Re: Allen]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
I agree with Allen, try updating Visual C++
Top
#212060 - 2016-10-27 12:52 PM Re: Problems on Server 2008 (not R2) of late [Re: Arend_]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
Yeah - I ran into a TechNet article that referenced the Visual C components as well. Will try that today.
_________________________
Actually I am a Rocket Scientist! \:D

Top
#212061 - 2016-10-27 02:44 PM Re: Problems on Server 2008 (not R2) of late [Re: Allen]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
It's weird that it is EVERY Server 2008 box, though. These UDFs were functioning in my environment prior to upgrading to Server 2012, so I can't test 2008 anymore internally.

The systems that are failing are failing consistently only on 2K8, and are distributed between at least 20 different companies. If it were just some hosts, or hosts at just one or two clients, I'd think platform.

The CheckSum UDF turned out to have a DotNet dependency on 3.5. It doesn't work on 2012 platforms that only have DotNet 4.x (which is odd itself, as it should be backward compatible).
_________________________
Actually I am a Rocket Scientist! \:D

Top
#212062 - 2016-10-28 10:33 AM Re: Problems on Server 2008 (not R2) of late [Re: Glenn Barnas]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Yeah, from 2008 R2 and up you need to install .Net Framework 3.5 as a Feature.
It gets enabled by certain Roles as dependency.
.Net Framework 3.5 is a funny thing, it's not really 3.5.
3.5 is a collection of 2.0 and 3.0, 3.5 itself doesn't exist as a framework.
.Net 4.0 is a separate framework, different sandbox altogether.
Apparently they didn't include the cryptography in 4.

Top
#212063 - 2016-10-28 04:48 PM Re: Problems on Server 2008 (not R2) of late [Re: Arend_]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
Gotta love it..

We're not in a position to install Dot Net 3.5 on hundreds of customer machines, sadly.

We had to use an alternate Checksum method using the CertUtil tool, but again, on Server 2008, it doesn't support SHA256, only R2 and higher. So - ErrorCheck and use another tool.

Fortunately, only about 15% of the 380+ installed server base is 2008, and les than 10 are still 2003.
_________________________
Actually I am a Rocket Scientist! \:D

Top
#212064 - 2016-10-28 09:24 PM Re: Problems on Server 2008 (not R2) of late [Re: Glenn Barnas]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
.net 4, even though it claims, does not contain bits for .net 1.1, 2 or even 3.

Found that out the hard way when that junk came out and everything relying on older versions quit working.
_________________________
!

download KiXnet

Top
#212070 - 2016-11-03 09:29 PM Re: Problems on Server 2008 (not R2) of late [Re: Lonkero]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
OK - so did some digging on this today. One of the disk space monitors was failing to collect WMI data. I knew that the code was pretty much right out of KOM, so I copied the raw KOM source to the machine and damned if it didn't work!
 Code:
Break On
$oWMIService = GetObject("winmgmts:\\.\root\cimv2")
$cItems = $oWMIService.ExecQuery("Select * from Win32_Volume",,48)
For each $oItem in $cItems
  "Capacity: " + $oItem.Capacity ?
  "Caption: " + $oItem.Caption ?
Next
The only change from direct KOM output was hard coding the "." and changing the 3-char variable prefix to a single char.

So - what's different from my code???

Well, good code practices , for one.. I declare my vars and set strict options. I inserted the following after the Break On statement:
 Code:
Dim $Rc, $objWMIService, $colItems, $objItem, $Item

$Rc = SetOption('Explicit', 'On')
$Rc = SetOption('WrapAtEOL', 'On')
$Rc = SetOption('NoVarsInStrings', 'On')
$Rc = SetOption('NoMacrosInStrings', 'On')
$Rc = SetOption('WOW64FileRedirection', 'Off')
$Rc = SetOption('WOW64AlternateRegView', 'Off')
Sure enough, the @SERROR now reports "Invalid Syntax" and the script dies with a totally misleading error:
 Code:
ERROR : expected ')'!
Script: C:\KRMMwork\Bin\z.bms
Line  : 14
Eliminating the WOW64FileRedirection option resolved the problem. WTH??

Any thoughts on this? This issue only exists on Server 2008, works fine on Server 2008R2 and higher.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#212077 - 2016-11-04 02:35 PM Re: Problems on Server 2008 (not R2) of late [Re: Glenn Barnas]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 687
Loc: Maryland, USA
Are you sure the 2008 servers aren't 32 bit? 2008 was the last server OS that Microsoft release a 32 bit version for.
Top
#212078 - 2016-11-04 04:41 PM Re: Problems on Server 2008 (not R2) of late [Re: BradV]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
It was an x64 platform. The WOW64FileRedirection setting should be ignored on an x86 platform.
_________________________
Actually I am a Rocket Scientist! \:D

Top
#212079 - 2016-11-04 07:21 PM Re: Problems on Server 2008 (not R2) of late [Re: Glenn Barnas]
mole Offline
Getting the hang of it

Registered: 2003-01-01
Posts: 80
Loc: Indian Head, Maryland, USA
I was thinking along the same lines as BradV. What does @onwow64 return. Not saying you are not correct about the x64 platform but what does the OS report it is?
_________________________
mole

Who is John Galt?

Top
#212081 - 2016-11-05 02:10 AM Re: Problems on Server 2008 (not R2) of late [Re: mole]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
Our management system reports that just 25 of the 322 Windows servers that we manage are running Windows 2008. Of those, only 8 are 32-bit. I checked the logs on the 32-bit platforms and the error is not reported. On the 64-bit platforms, the script reports the inability to obtain the list of volumes in the log and exits when the error is trapped.

The server I was testing on is definitely X64. The fact that the error is not thrown on 32-bit platforms confirms my earlier statement that the WOW64FileRedirection has no effect on 32-bit platforms.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
Page 1 of 1 1


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

Who's Online
0 registered and 601 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.069 seconds in which 0.03 seconds were spent on a total of 13 queries. Zlib compression enabled.

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