I’ve added a new event to the repository, then went to the monitor, and clicked Configure Events. Without changing any settings (just navigated around the menu), i clicked OK.
Got this exception:
Save Event Plugins Exceptions
An unexpected error occurred while Saving Event Plugin Settings:
Object reference not set to an instance of an object. (Deadline.Plugins.PluginException)
at Deadline.Events.SandboxedEventManager.a(DeadlineMessage A_0)
at Deadline.Events.SandboxedEventManager.CheckForUpdates()
at Deadline.Monitor.WorkItems.SaveEventPluginSettingsWI.InternalDoWork()
at Deadline.Monitor.MonitorWorkItem.DoWork()
Even after removing that event plugin, i get an exception (a different one though):
2015-12-07 09:36:46: An unexpected error occurred while Saving Event Plugin Settings:
2015-12-07 09:36:46: The given key was not present in the dictionary. (Deadline.Plugins.PluginException)
2015-12-07 09:36:46: at Deadline.Events.SandboxedEventManager.a(DeadlineMessage A_0)
2015-12-07 09:36:46: at Deadline.Events.SandboxedEventManager.CheckForUpdates()
2015-12-07 09:36:46: at Deadline.Monitor.WorkItems.SaveEventPluginSettingsWI.InternalDoWork()
2015-12-07 09:36:46: at Deadline.Monitor.MonitorWorkItem.DoWork()
I’ve attached the event plugin Scanline.zip (1.58 KB)
So the problem is that your event plugin’s .param does not conform to the new requirements ( which are not currently up in the docs yet ) for an event plugin. The .param file needs to contain the following values instead of Enabled
[State]
Type=Enum
Items=Global Enabled;Opt-In;Disabled
Category=Options
CategoryOrder=0
Index=0
Label=State
Default=Disabled
Description=How this event plug-in should respond to events. If Global, all jobs and slaves will trigger the events for this plugin. If Opt-In, jobs and slaves can choose to trigger the events for this plugin. If Disabled, no events are triggered for this plugin.
[EventCallbacks]
Type=Label
Category=Options
CategoryOrder=0
Index=2
Description=The Event Callbacks that this Event Plugin subscribes to.
Default=OnJobFinished
Event plugins now use a tri-state instead of a boolean for their enabled state, and all event plugins report which callbacks they subscribe to directly in the .param file. Unfortunately, your db now has some invalid data in it. To fix this, edit the contents of the .param file to match what I posted above, and then open the monitor and edit the state of the “Scanline” event plugin. Upon accepting the dialog you will get a similar error message to what you reported before. Restart the monitor and the problem should be fixed. This should also fix the problems you were having with House Cleaning, Repository Repair and Pending Job Scan. Note that any instances of the monitor, slave or pulse on your farm will need to be restarted before the error will be fixed.
Sorry for the inconvenience, we will be updating the documentation for 8 soon to prevent errors like this one!
The monitor exception is fixed by this patch, but the repo repair / housecleaning / pending job scan exceptions still occur:
repo repair:
2015-12-07 10:44:53: Triggering Repository Repair Events
2015-12-07 10:44:53: Error occurred during repository repair:
2015-12-07 10:44:53: Object reference not set to an instance of an object (System.NullReferenceException)
2015-12-07 10:44:53: at Deadline.Scheduling.RepositoryRepair.a (Boolean A_0, Boolean A_1, Boolean A_2, Boolean A_3) [0x00000] in <filename unknown>:0
house cleaning:
2015-12-07 10:45:06: Triggering House Cleaning Events
2015-12-07 10:45:06: Error occurred during house cleaning:
2015-12-07 10:45:06: Object reference not set to an instance of an object (System.NullReferenceException)
2015-12-07 10:45:06: at Deadline.Scheduling.HouseCleaning.a (Boolean A_0, Boolean A_1, Boolean A_2, Boolean A_3) [0x00000] in <filename unknown>:0
pending job scan:
2015-12-07 10:45:55: Processing Pending Job Events
2015-12-07 10:45:55: Pending Job Events - Checking for pending job events
2015-12-07 10:45:55: Pending Job Events - Processing 0 job events
2015-12-07 10:45:55: Pending Job Events - Error checking for pending events: Object reference not set to an instance of an object (System.NullReferenceException)
2015-12-07 10:45:55: Pending Job Events - Done.
I tried removing the document, and having deadline readd it by editing its settings. And the ‘enabled’ param keeps showing up. Not sure if this is related to those exceptions though…
The Enabled property is still stored in the db currently and its value is set when setting the state: If the state is Global enabled or Opt-In then the Enabled property will be true. The problem with the event plugin’s param file before was not the existence of the Enabled property, but the lack of the State property.
This is a bit of an odd requirement, could you explain why its needed, and what happens if a script fails to subscribe via the param file, but adds its callbacks in the init call?
It is not actually necessary for custom events as it is currently only used for display purposes. So you do not actually have to worry about including those in your param file. Adding the events in the init will suffice. My mistake