You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A halted polling channel cannot be deployed again on the same engine #571
After a polling channel is halted and undeployed, deploying it again on the same engine fails.
On 4.7.0, a fresh engine on Derby with nothing added:
A channel with a JavaScript Reader source (return 'tick';, polling every second) and a JavaScript Writer destination.
Deploy it. It polls.
Halt it: POST /api/channels/{id}/_halt (204).
Undeploy it (204).
Deploy it again: HTTP 500.
com.mirth.connect.donkey.server.StartException: Failed to start channel repro poller halt (06930d83-12e6-42a0-b050-649473a03705).
at com.mirth.connect.donkey.server.channel.Channel.start(Channel.java:792)
at com.mirth.connect.server.controllers.DonkeyEngineController$DeployTask.doDeploy(DonkeyEngineController.java:2036)
...
Caused by: com.mirth.connect.donkey.server.ConnectorTaskException: org.quartz.ObjectAlreadyExistsException: Unable to store Job : '06930d83-12e6-42a0-b050-649473a03705.PollConnector06930d83-12e6-42a0-b050-649473a03705', because one already exists with this identification.
at com.mirth.connect.donkey.server.channel.PollConnector.start(PollConnector.java:44)
With Stop instead of Halt in step 3, the deploy in step 5 works and the channel polls again.
PollConnector.stop() shuts the poller's Quartz scheduler down (scheduler.shutdown(true)). PollConnector.halt() only interrupts the running job (scheduler.interrupt(job.getKey())), so the job is still registered when the channel is deployed again. Measured with a JavaScript Reader; the File Reader and the Database Reader use the same PollConnector. Shutting the scheduler down at the end of halt, as stop does, looks like the fix; not tested.
Activity