Workflow initialization errors - whats causing them?
Hi, I'm regularly getting a number of these alerts, Worklow Initialization: Failed to start a workflow that runs a process or script. Its across a handful of machines in my environment and I'm not sure why, up to now I've manually closed
the alerts as no apparent issues on the machine. I'm tempted to override but that would be a last resort as I'd like to fix the problem if there is one first!
Ive read a number of posts inc Kevins one (http://blogs.technet.com/b/kevinholman/archive/2010/07/21/opsmgr-2007-r2-core-mp-s-updated-6-1-7672-0.aspx)
which indicates that this is a new rule within the MP which ties in with the time I updated my core MP to 6.17672.0 and when I'm now getting the alerts in the console. I've confirmed the path to the scripts are valid and that the servers are have resource
to execute them and all seems OK. 99% of our servers are virtual and built from standard image so cant think why only a handful of machines are affected of if it was permissions on agent executing the scripts why other machines not affected.
If there's not easy answer then I know I can use an override to mask the problem. Any advice much appreciated...
Cheers
October 20th, 2010 2:21pm
Hi,
There is a LOT of things that can cause script failures. Read alert decription. In most cases alert description can help.
First, check this thread:
http://www.systemcentercentral.com/Forums/tabid/60/indexid/72318/Default.aspx?tag=Forums+Operations_Manager
You can post a descriptions here and we'll try to help you.http://OpsMgr.ru/
Free Windows Admin Tool Kit Click here and download it now
October 20th, 2010 3:48pm
Alexey, I had read the description of alert before posting but didn't clarify much - though was able to confirm the path details that 'should' allow the script to run were valid. I have 5 alerts atm from 4 different servers which are all trying
to run different cscript commands - I have pasted one in as example:
The only common theme is they all have the same exit code policy expression [^0]+
the matching output is either 259, -1 or 3 in my other examples. the scripts trying to run are 1) DiscoverVirtualServer.vbs 2) DiscoverHealthServiceCommunicationRelationship.js 3) getSQL2005DBSpace.js 4) discoverClustering.vbs 5) IsHostingMSCS.vbs
Data was found in the output, but has been dropped because the Event Policy for the process started at 20:33:06 has detected errors.
The 'ExitCode' policy expression:
[^0]+
matched the following output:
259
Command executed: "C:\WINDOWS\system32\cscript.exe" /nologo "DiscoverVirtualServerType.vbs" {6A95A70F-C789-8830-79C3-7829C003461F} {1A456E75-DA58-3916-F816-AE2FEFCA513C}
MYSERVER1.MYDOMAIN.LOCAL
MYSERVER1
Working Directory: C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 198\975\
One or more workflows were affected by this.
Workflow name: System.Mom.BackwardCompatibility.Computer.VirtualServerType.Discovery
Instance name:
MYSERVER1.MYDOMAIN.LOCAL
Instance ID: {1A456E75-DA58-3916-F816-AE2FEFCA513C}
Management group:
MYMGMTGRP
October 20th, 2010 4:45pm
Hmm.
Try to run this script manually with parameters:
"C:\WINDOWS\system32\cscript.exe" /nologo "DiscoverVirtualServerType.vbs" {6A95A70F-C789-8830-79C3-7829C003461F} {1A456E75-DA58-3916-F816-AE2FEFCA513C}
MYSERVER1.MYDOMAIN.LOCAL MYSERVER1
and post output here...http://OpsMgr.ru/
Free Windows Admin Tool Kit Click here and download it now
October 20th, 2010 5:03pm
Alexey, I've discovered a few things...
4 out of the 5 alerts have a problem with the path. From example above path for working directory was trying C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 198\975\ BUT.
the correct directory was C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files
200\975\ - ie the host temp files number was different, so is understandible that it not found. However now I'm wondering what/how the different temp host files number is generated and could this be a sign of a bigger issue. Anyway
when manually run from command prompt and code the correct path the script runs.
However one of the alerts does have the correct path information. Its original error description was below. I can't get the script to run just but pasting "C:\WINDOWS\system32\cscript.exe" /nologo "GetSQL2005DBSpace.js" MYSERVER2 into
run command, but I CAN get it to run when hardcod the path in as per cscript.exe /nologo "c:\Program Files\ystem Center Operations manager 2007\Health Service state\Monitoring host Temporary files 4\432\getSQL2005DBSpace.js" MYSERVER2
Dont know if this clarifies anything...
Data was found in the output, but has been dropped because the Event Policy for the process started at 21:21:04 has detected errors.
The 'ExitCode' policy expression:
[^0]+
matched the following output:
3
Command executed: "C:\WINDOWS\system32\cscript.exe" /nologo "GetSQL2005DBSpace.js" MYSERVER2
Working Directory: C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 4\432\
One or more workflows were affected by this.
Workflow name: many
Instance name: many
Instance ID: many
Management group: MYMGMTGRP
October 20th, 2010 6:05pm
> However now I'm wondering what/how the different temp host files number is generated and could this be a sign of a bigger issue.
> but I CAN get it to run when hardcod the path
It's okay.
> Anyway when manually run from command prompt and code the correct path the script runs.
Runs and outputs nothing? Or?http://OpsMgr.ru/
Free Windows Admin Tool Kit Click here and download it now
October 20th, 2010 6:30pm
Alexey, when manually runing from command prompt and supplying explicit path it seems to run and output - below is the output from first example for DiscoverVirtualServerType.vbs which has WRONG path in working directory of script:
C:\WINDOWS\system32>cscript.exe /nologo "c:\Program Files\System Center Operatio
ns Manager 2007\Health Service State\Monitoring Host Temporary Files 200\975\Dis
coverVirtualServerType.vbs" {6A95A70F-C789-8830-79C3-7829C003461F} {1A456E75-DA5
8-3916-F816-AE2FEFCA513C} BELMM02.BELFASTTRUST.LOCAL BELMM02
<DataItem type="System.DiscoveryData" time="2010-10-20T15:39:26.6263616+01:00" s
ourceHealthServiceId="15C673E2-45EF-76C8-6B4A-952B115D0B16"><DiscoveryType>0</Di
scoveryType><DiscoverySourceType>0</DiscoverySourceType><DiscoverySourceObjectId
>{6A95A70F-C789-8830-79C3-7829C003461F}</DiscoverySourceObjectId><DiscoverySourc
eManagedEntity>{1A456E75-DA58-3916-F816-AE2FEFCA513C}</DiscoverySourceManagedEnt
ity><ClassInstances><ClassInstance TypeId="{74F79C70-9252-CB16-0F40-2B27E4F7983E
}"><Settings><Setting><Name>{5C324096-D928-76DB-E9E7-E629DCC261B1}</Name><Value>
BELMM02.BELFASTTRUST.LOCAL</Value></Setting><Setting><Name>{B47C3368-C0A0-F2B6-5
DEE-3F7E44B574EA}</Name><Value></Value></Setting></Settings></ClassInstance></Cl
assInstances></DataItem>
This output below is from the script which had the CORRECT path credentials yet caused the alert, but I CAN run it direct from command prompt as below (just an excerpt as it produced screenfulls of output):
C:\WINDOWS\system32>cscript.exe /nologo "c:\Program Files\System Center Operatio
ns Manager 2007\Health Service State\Monitoring Host Temporary Files 4\432\getSQ
L2005DBSpace.js" Belsql03
<Collection><DataItem type="System.PropertyBagData" time="2010-10-20T15:54:10.09
00590+01:00" sourceHealthServiceId="567A6EBE-69A2-2D3A-C488-ACBF3E4E4300"><Conve
rsionType>PerformanceData</ConversionType><Property Name="Database" VariantType=
"8">master</Property><Property Name="TransactionLogSize" VariantType="3">3</Prop
erty><Property Name="TransactionLogFree" VariantType="5">1.9755859375</Property>
<Property Name="TransactionLogPercentFree" VariantType="5">65.8528645833333</Pro
perty><Property Name="DBSize" VariantType="3">5</Property><Property Name="DBFree
" VariantType="5">1.109375</Property><Property Name="DBPercentFree" VariantType=
"5">22.1875</Property></DataItem><DataItem type="System.PropertyBagData" time="2
010-10-20T15:54:10.0900590+01:00" sourceHealthServiceId="567A6EBE-69A2-2D3A-C488
-ACBF3E4E4300"><ConversionType>PerformanceData</ConversionType><Property Name="D
atabase" VariantType="8">tempdb</Property><Property Name="TransactionLogSize" Va
riantType="3">2910</Property><Property Name="TransactionLogFree" VariantType="5"
>1448.0595703125</Property><Property Name="TransactionLogPercentFree" VariantTyp
e="5">49.7614972615979</Property><Property Name="DBSize" VariantType="3">9160</P
roperty><Property Name="DBFree" VariantType="5">9147.51953125</Property><Propert
y Name="DBPercentFree" VariantType="5">99.8637503411572</Property></DataItem><Da
taItem type="System.PropertyBagData" time="2010-10-20T15:54:10.1056842+01:00" so
urceHealthServiceId="567A6EBE-69A2-2D3A-C488-ACBF3E4E4300"><ConversionType>Perfo
rmanceData</ConversionType><Property Name="Database" VariantType="8">model</Prop
erty><Property Name="TransactionLogSize" VariantType="3">0</Property><Property N
ame="TransactionLogFree" VariantType="3">0</Property><Property Name="Transaction
LogPercentFree" VariantType="3">0</Property><Property Name="DBSize" VariantType=
"3">3</Property><Property Name="DBFree" VariantType="5">1.060546875</Property><P
roperty Name="DBPercentFree" VariantType="5">35.3515625</Property></DataItem><Da
taItem type="System.PropertyBagData" time="2010-10-20T15:54:10.1056842+01:00" so
urceHealthServiceId="567A6EBE-69A2-2D3A-C488-ACBF3E4E4300"><ConversionType>Perfo
rmanceData</ConversionType><Property Name="Database" VariantType="8">msdb</Prope
rty><Property Name="TransactionLogSize" VariantType="3">99</Property><Property N
ame="TransactionLogFree" VariantType="5">84.0185546875</Property><Property Name=
"TransactionLogPercentFree" VariantType="5">84.8672269570707</Property><Property
Name="DBSize" VariantType="3">175</Property><Property Name="DBFree" VariantType
="5">11.1796875</Property><Property Name="DBPercentFree" VariantType="5">6.38839
285714286</Property></DataItem><DataItem type="System.PropertyBagData" time="201
0-10-20T15:54:10.1056842+01:00" sourceHealthServiceId="567A6EBE-69A2-2D3A-C488-A
CBF3E4E4300"><ConversionType>PerformanceData</ConversionType><Property Name="Dat
abase" VariantType="8">BPI</Property><Property Name="TransactionLogSize" Variant
Type="3">4096</Property><Property Name="TransactionLogFree" VariantType="5">3878
.4794921875</Property><Property Name="TransactionLogPercentFree" VariantType="5"
>94.6894407272339</Property><Property Name="DBSize" VariantType="3">3658</Proper
ty><Property Name="DBFree" VariantType="3">1117</Property><Property Name="DBPerc
entFree" VariantType="5">30.5358119190815</Property></DataItem><DataItem type="S
ystem.PropertyBagData" time="2010-10-20T15:54:10.1213094+01:00" sourceHealthServ
iceId="567A6EBE-69A2-2D3A-C488-ACBF3E4E4300"><ConversionType>PerformanceData</Co
nversionType><Property Name="Database" VariantType="8">BELFASTTRUST_DBA</Propert
y><Property Name="TransactionLogSize" VariantType="3">0</Property><Property Name
="TransactionLogFree" VariantType="3">0</Property><Property Name="TransactionLog
PercentFree" VariantType="3">0</Property><Property Name="DBSize" VariantType="3"
>3</Property><Property Name="DBFree" VariantType="5">1.248046875</Property><Prop
erty Name="DBPercentFree" VariantType="5">41.6015625</Property></DataItem><DataI
Hope this helps...
October 21st, 2010 10:29am
It looks like it works fine when started from commanline under your account.
1. Do you run OpsMgr Agent (system center management service) under local system account?
2. Check if SQL MP and Backward Compatibility MP have a latest versions. http://OpsMgr.ru/
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2010 11:18am
I'll check versions of those 2 MP's - I think I'm behind in the SQL one as I vaugly remember reading the update doc and thought there where a couple of gottcha's (considering my SQL MP is heavily tuned thought it was safer just to leave alone!) anyway
happy to review again and in general I like to keep up to latest versions.
Thanks for your help...
October 21st, 2010 11:29am
In general, when a script runs from your credentials but fails under agent credentials, you need to read the guide and look at the section that describes running in low privilege environment. Any script that runs with the defaut run-as account of localsystem
will also fail if the script tries to access network resources (localsystem is prevented from looking outside of the single OS instance it is a part of).
Microsoft Corporation
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2010 6:34pm