So, you may have noticed this annoying License Expired warning event raised in Orchestrator at times:
This event is not caused by your license expiring. Instead, it is caused by the runbook server losing connectivity to the Orchestrator database.
To fix it, simply restart the Orchestrator Runbook Service on the server affected.
As I am really lazy, and don’t always want to go and manually restart services, I figured I could use Orchestrator to fix itself in this issue. The runbook looks like this:
I use the monitor date/time activity to run the runbook on an hourly basis.
I then use the following query to query the Orchestrator database:
SELECT SourceName, CreationTime, Summary, Description
FROM [Orchestrator].[Microsoft.SystemCenter.Orchestrator.Runtime].[Events]where creationtime between dateadd(mi, -60, getdate()) and getdate()
and summary = ‘License expired’
order by CreationTime desc
The link between the query database activity and the split fields activity is configured to continue if the number of rows returned is larger than 0.
The Start/Stop service properties activity has this configuration:
As I have multiple runbook servers, the server name in the event could vary, which is why it is pulled through from the SQL query.
And then lastly, because I want OpsMgr to notify me when these things happen, I write an event to the event log.
Quick and easy, and no longer do I need to worry about my runbooks failing because of this error.