web stats
Mirth channel need to be manually started everyday for it to process messages - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 04-05-2016, 07:24 AM
Anurag Anurag is offline
Mirth Newb
 
Join Date: Mar 2016
Posts: 6
Anurag is on a distinguished road
Default Mirth channel need to be manually started everyday for it to process messages

Hi,

I am using Mirth Connect Server 3.3.1. and have a channel deployed there to transfer files from one file location to another.
The source connector is a File Reader and reads files from a sftp location. The destination connector is a File Writer which transfers these files to a file location on a server.

The channel is scheduled to run every 40 minutes. However, everyday I need to restart the channel for it to process anything for the first time in the day otherwise no messages are processed. Once the channel is manually restarted, it works fine throughout the day looking for files every 40 mins and transferring them.

Can someone please help me with this issue of channel need to be manually started for it to start processing in the day.

Thanks,
Anurag
Reply With Quote
  #2  
Old 04-06-2016, 02:51 AM
mechanico mechanico is offline
Mirth Newb
 
Join Date: Feb 2016
Location: Switzerland
Posts: 23
mechanico is on a distinguished road
Default

Is there maybe a Deploy Script, that connect to the sftp?
Reply With Quote
  #3  
Old 04-11-2016, 04:12 AM
Anurag Anurag is offline
Mirth Newb
 
Join Date: Mar 2016
Posts: 6
Anurag is on a distinguished road
Default

No, there is no deploy script for the channel
Reply With Quote
  #4  
Old 04-11-2016, 04:16 AM
Anurag Anurag is offline
Mirth Newb
 
Join Date: Mar 2016
Posts: 6
Anurag is on a distinguished road
Default

No, there is no deploy script associated to this channel
Reply With Quote
  #5  
Old 04-11-2016, 05:09 AM
phatneff phatneff is offline
Mirth Guru
 
Join Date: Jun 2014
Location: Cincinnati, OH
Posts: 186
phatneff is on a distinguished road
Send a message via AIM to phatneff
Default

File readers channels are set to deploy with the Initial State of Stopped, from what I've experienced. If you're doing some sort of backup or something every night in which the MC service is being stopped and started again, that file reader channel will be stopped. Change the Initial State in the Summary tab of the channel to Started and that should fix the problem.
Reply With Quote
  #6  
Old 04-15-2016, 03:40 AM
Anurag Anurag is offline
Mirth Newb
 
Join Date: Mar 2016
Posts: 6
Anurag is on a distinguished road
Default

Thank you for the response. The channel though is already been deployed with setting for Initial State to be started.
The concern is that though I am able to see channel being started on Dashboard its not picking any message from sftp to process till I restart the channel.
Thinking that it might be due to time-out issue of getting sftp connection I have changed the time-out value from 10 seconds to 20 seconds. However the same problem still persists.
Reply With Quote
  #7  
Old 04-15-2016, 04:14 AM
jadams4's Avatar
jadams4 jadams4 is offline
OBX.3 Kenobi
 
Join Date: Aug 2015
Posts: 143
jadams4 is on a distinguished road
Default

Do you have "Poll Once on Start" checked?
Reply With Quote
  #8  
Old 04-18-2016, 09:31 AM
phatneff phatneff is offline
Mirth Guru
 
Join Date: Jun 2014
Location: Cincinnati, OH
Posts: 186
phatneff is on a distinguished road
Send a message via AIM to phatneff
Default

Put the following as a Deploy Script in your channel and see what the connection info says:

Code:
 
 com.jcraft.jsch.JSch.setLogger(new com.jcraft.jsch.Logger({
 isEnabled: function(level) {
  var logger = org.apache.log4j.Logger.getLogger('JSch');
   switch (level) {
   case com.jcraft.jsch.Logger.DEBUG:
    return logger.isEnabledFor(org.apache.log4j.Level.DEBUG);
   case com.jcraft.jsch.Logger.INFO:
    return logger.isEnabledFor(org.apache.log4j.Level.INFO);
   case com.jcraft.jsch.Logger.WARN:
    return logger.isEnabledFor(org.apache.log4j.Level.WARN);
   case com.jcraft.jsch.Logger.ERROR:
    return logger.isEnabledFor(org.apache.log4j.Level.ERROR);
   case com.jcraft.jsch.Logger.FATAL:
    return logger.isEnabledFor(org.apache.log4j.Level.FATAL);
  }
 },
 
 log: function(level, message) {
  var logger = org.apache.log4j.Logger.getLogger('JSch');
  
  switch (level) {
   case com.jcraft.jsch.Logger.DEBUG:
    logger.debug(message);
    break;
   case com.jcraft.jsch.Logger.INFO:
    logger.info(message);
    break;
   case com.jcraft.jsch.Logger.WARN:
    logger.warn(message);
    break;
   case com.jcraft.jsch.Logger.ERROR:
    logger.error(message);
    break;
   case com.jcraft.jsch.Logger.FATAL:
    logger.fatal(message);
    break;
  }
 }
}));
return;
Reply With Quote
  #9  
Old 04-18-2016, 06:29 PM
jmendezzz jmendezzz is offline
OBX.2 Kenobi
 
Join Date: Nov 2009
Posts: 85
jmendezzz is on a distinguished road
Default

The same thing happened to me. I was connecting to an SFTP server but Mirth never closes the session. it leaves it open(idle), therefore the only thing you can do is restart Mirth Service or restart the channel. I ended up creating a task scheduler to restart Mirth every night approx 1am. Not ideal, if you have other channels.

please look at the Idea, below. The mirth folks, opened it on my behalf. Please vote for it.

http://www.mirthcorp.com/community/i...wse/MIRTH-3803
Reply With Quote
  #10  
Old 04-19-2016, 07:34 AM
phatneff phatneff is offline
Mirth Guru
 
Join Date: Jun 2014
Location: Cincinnati, OH
Posts: 186
phatneff is on a distinguished road
Send a message via AIM to phatneff
Default

I have several SFTP connections at one of our sites and I never have a problem with them.

One is set to poll every 5 minutes.
One is set to poll every 15 minutes.
One is set to poll every day at 5:00am.
Another one is set to poll every day at 5:00am.
One is set to poll every Sunday and Wednesday at 6:10am.

All have been working with no manual intervention.

Last edited by phatneff; 04-19-2016 at 07:42 AM.
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 05:08 PM.


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