web stats
"on fail try again every" [] hours [] day etc... - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-18-2018, 01:20 PM
StickyBandit's Avatar
StickyBandit StickyBandit is offline
Mirth Guru
 
Join Date: Aug 2013
Location: Home Alone
Posts: 960
StickyBandit is on a distinguished road
Wink "on fail try again every" [] hours [] day etc...

We have an SFTP channel that is stopped once in a while. My guess is that
the server where Mirth Connect is running was not able to connect to the other SFTP server.
The problem is that after so many tries (?how many?) mirth connect puts the channel in stopped mode.
We need the channel to keep trying again every hour to connect.

Can Mirth add a feature like "on fail try again every" [] hour [] day etc... ?

or is there something I am not comprehending?

My current idea is to write another channel that will check the status of this channel, and if it is stopped, it will start it. And the new channel can run every hour.

Does this seem like a good idea?

I welcome comments on any of this.


Mirth Connect Server 3.6.1
Built on July 13, 2018
Reply With Quote
  #2  
Old 10-18-2018, 02:43 PM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,181
agermano is on a distinguished road
Default

I was unaware that mirth would automatically stop your channel, but if that is the case, I think your idea of having a monitor channel to restart it is a good one.
Reply With Quote
  #3  
Old 10-22-2018, 01:08 AM
siddharth siddharth is offline
Mirth Guru
 
Join Date: Feb 2013
Posts: 841
siddharth is on a distinguished road
Default

Maybe we should investigate why channel status goes to Stopped. I think that it should throw an SFTP connection error, but will keep the channel status to Started instead of stopped. I think there is something more serious which is causing the channel to go into stopped mode. The only situations I have seen is when there is a Donkey exception where the channel would stop, and that also happens when there are 2 different channels trying to connect to same destination on same port.
__________________
HL7v2.7 Certified Control Specialist!
Reply With Quote
  #4  
Old 10-31-2018, 12:08 PM
StickyBandit's Avatar
StickyBandit StickyBandit is offline
Mirth Guru
 
Join Date: Aug 2013
Location: Home Alone
Posts: 960
StickyBandit is on a distinguished road
Thumbs up

Implemented the hourly Watcher/Starter Channel.

If you are curious, this is what I have in the JS Source Connector.


if(ChannelUtil.getChannelState('???') == Packages.com.mirth.connect.server.userutil.Deploye dState.STOPPED) {
ChannelUtil.startChannel('???');
return "Started";
}
else { return "n/a"; }
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:32 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation