Check the Status of the Version Control Service
The Version Control Web Service has indicated it is not in a "running" state. Please check the following. (1) The Version Control Database named "TfsVersionControl" on the Data Tier machine (2) The IIS Application pool for TFS.
http://msdn.microsoft.com/en-us/library/ms252442.aspx
Target | TeamFoundationServer2008.TFSVersionControlWebService | ||
Parent Monitor | System.Health.AvailabilityState | ||
Category | Custom | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.Windows.TimedScript.TwoStateMonitorType | ||
Remotable | True | ||
Accessibility | Internal | ||
Alert Message |
| ||
RunAs | TFSUserProfile |
<UnitMonitor ID="TeamFoundationServer2008.VersionControlServiceStateCheck" Accessibility="Internal" Enabled="onEssentialMonitoring" Target="TeamFoundationServer2008.TFSVersionControlWebService" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" RunAs="TFSUserProfile" TypeID="Windows!Microsoft.Windows.TimedScript.TwoStateMonitorType" ConfirmDelivery="true">
<Category>Custom</Category>
<AlertSettings AlertMessage="TeamFoundationServer2008.VersionControlServiceStateCheck_AlertMessageResourceID">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
</AlertSettings>
<OperationalStates>
<OperationalState ID="UIGeneratedOpStateId7e9289fe28c9425da8696780af22ef7e" MonitorTypeStateID="Success" HealthState="Success"/>
<OperationalState ID="UIGeneratedOpStateId97d648b84df5499bb5d2de113805f3ac" MonitorTypeStateID="Error" HealthState="Error"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>900</IntervalSeconds>
<SyncTime/>
<ScriptName>VersionControlServiceStatus.vbs</ScriptName>
<Arguments/>
<ScriptBody> ' Enter a script that outputs a property bag
' Example VBScript:
'
Dim oAPI, oBag
Set oAPI = CreateObject("MOM.ScriptAPI")
Set oBag = oAPI.CreatePropertyBag()
Dim WebServiceURL, WebMethodName, xmlDOC2, soapStr, requestHTTP, serviceName, serviceUrl
WebServiceURL = GetTfsUrl() & "/VersionControl/v1.0/Administration.asmx"
'Call TraceLogMessage("RE-CONSTRUCTED URL = ["& WebServiceURL & "]")
'Call TraceLogMessage("Begin Web Service build up")
'========================================================================
' Set the "environment variables"
'========================================================================
'WebServiceURL = "http://localhost:8080/VersionControl/v1.0/Administration.asmx"
'========================================================================
' Now call the web methods
'========================================================================
WebMethodName = "QueryServerInformation"
'=========================================================================
' main logic of SOAPClient
'=========================================================================
'Get the Properties of the DOM right
Set xmlDOC2 = CreateObject("MSXML.DOMDocument")
xmlDOC2.SetProperty "SelectionLanguage", "XPath"
XmlDOC2.Async = false
'Call TraceLogMessage("Create SOAP Envelope")
' Create the soapEnvelope as a string body
soapStr = soapStr & "<?xml version=""1.0"" encoding=""utf-8""?>" & vbCrLf
soapStr = soapStr & "<soap:Envelope "
soapStr = soapStr & " xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"""
soapStr = soapStr & " xmlns:xsd=""http://www.w3.org/2001/XMLSchema"""
soapStr = soapStr & " xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">"
soapStr = soapStr & vbCrLf
soapStr = soapStr & " <soap:Body>" & vbCrLf
soapStr = soapStr & " <QueryServerInformation xmlns=""http://schemas.microsoft.com/TeamFoundation/2005/06/VersionControl/Admin/03"" /> "
soapStr = soapStr & vbCrLf
soapStr = soapStr & " </soap:Body>" & vbCrLf
soapStr = soapStr & " </soap:Envelope>" & vbCrLf
'Call TraceLogMessage("submitted SOAPSTRING:=>" & soapStr)
'Call TraceLogMessage("Set the RequestHTTP object and properties")
Set requestHTTP = CreateObject("Microsoft.XMLHTTP")
requestHTTP.open "POST", WebServiceURL, false
requestHTTP.setrequestheader "Content-Type", "text/xml"
requestHTTP.setrequestheader "SOAPAction", "http://schemas.microsoft.com/TeamFoundation/2005/06/VersionControl/Admin/03/QueryServerInformation"
requestHTTP.Send soapStr
'''''''DO the XML processing''''''''''''''''''
'========================================================================
' Load the respone.xml into DOM for XPATH processing
'========================================================================
bOK = xmlDOC2.load(requestHTTP.responseXML)
' get the SOAP response and save it to disk
Dim responseTextResults, recordSet, recordSet9
responseTextResults = requestHTTP.responseText
recordSet = split(responseTextResults, " ")
'Call TraceLogMessage("R9 = " &recordSet(9))
recordSet9 = recordSet(9)
Call oBag.AddValue("Status", recordSet(9))
Call oAPI.Return(oBag)
'''########## BEGIN FUNCTION : TraceLogMessage ############################################
Function TraceLogMessage(ByVal sMessage)
Dim lsEventInformation
WScript.Echo sMessage
' Retrieve the name of this (running) script
Dim FSO, ScriptFileName
Set FSO = CreateObject("Scripting.FileSystemObject")
ScriptFileName = FSO.GetFile(WScript.ScriptFullName).Name
Set FSO = Nothing
On Error Resume Next
Dim oAPITemp
Set oAPITemp = CreateObject("MOM.ScriptAPI")
lsEventInformation = 3
oAPITemp.LogScriptEvent ScriptFileName, 4000, lsEventInformation, sMessage
On Error Goto 0
End Function
'''########## END FUNCTION : TraceLogMessage ############################################
Function GetTfsInstallFolder()
Dim WSHShell, RegKey, sFolder
Set WSHShell = CreateObject("WScript.Shell")
RegKey = "HKLM\SOFTWARE\Microsoft\VisualStudio\9.0\TeamFoundation\ATInstallPath"
sFolder = WSHShell.RegRead(RegKey)
GetTfsInstallFolder = sFolder
End Function
Function GetTfsUrl()
Dim sTfsWebConfigFile, xmlWebConfig, nodeTfsUrl, bConfigFileLoaded
sTfsWebConfigFile= GetTfsInstallFolder() & "Web Services\Web.Config"
Set xmlWebConfig = CreateObject("MSXML.DOMDocument")
xmlWebConfig.SetProperty "SelectionLanguage", "XPath"
xmlWebConfig.Async = false
bConfigFileLoaded = xmlWebConfig.load(sTfsWebConfigFile)
If bConfigFileLoaded = False Then
Exit Function
End If
Set nodeTfsUrl = xmlWebConfig.selectSingleNode("//add[@key = 'TFSNameUrl']/@value")
If nodeTfsUrl Is Nothing Then
Exit Function
End If
GetTfsUrl = nodeTfsUrl.Value
End Function
</ScriptBody>
<TimeoutSeconds>300</TimeoutSeconds>
<ErrorExpression>
<RegExExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='Status']</XPathQuery>
</ValueExpression>
<Operator>DoesNotContainSubstring</Operator>
<Pattern>Running</Pattern>
</RegExExpression>
</ErrorExpression>
<SuccessExpression>
<RegExExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='Status']</XPathQuery>
</ValueExpression>
<Operator>ContainsSubstring</Operator>
<Pattern>Running</Pattern>
</RegExExpression>
</SuccessExpression>
</Configuration>
</UnitMonitor>