web stats
Channel not starting after restart - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 05-18-2018, 07:39 AM
mendozamm mendozamm is offline
Mirth Newb
 
Join Date: Jan 2016
Posts: 6
mendozamm is on a distinguished road
Default Channel not starting after restart

Hello All,

I have a File Reader channel directed to an SFTP site. After server restarts, due to server maintenance or updates, the channel is deployed in a stopped state. The channel is set to have an initial state of 'Started'. I'm seeing a timeout socket is not established message. I can start the channel manually...but does anyone know why the channel fails to start automatically?

The log I see is as follows:
ERROR (com.mirth.connect.server.channel.LoggingTaskHandl er:25): com.mirth.connect.donkey.server.StartException: Failed to start channel XXXXXXXXXXXXX (XXXXXXXXXXXXXXXXXXX).

at com.mirth.connect.donkey.server.channel.Channel.st art(Channel.java:716)

at com.mirth.connect.server.controllers.DonkeyEngineC ontroller$DeployTask.doDeploy(DonkeyEngineControll er.java:1838)

at com.mirth.connect.server.controllers.DonkeyEngineC ontroller$DeployTask.execute(DonkeyEngineControlle r.java:1731)

at com.mirth.connect.server.channel.ChannelTask.call( ChannelTask.java:67)

at com.mirth.connect.server.channel.ChannelTask.call( ChannelTask.java:16)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)

at java.lang.Thread.run(Unknown Source)
Caused by: com.mirth.connect.donkey.server.ConnectorTaskExcep tion: timeout: socket is not established

at com.mirth.connect.connectors.file.FileReceiver.onS tart(FileReceiver.java:146)

at com.mirth.connect.donkey.server.channel.SourceConn ector.start(SourceConnector.java:104)

at com.mirth.connect.donkey.server.channel.PollConnec tor.start(PollConnector.java:32)

at com.mirth.connect.donkey.server.channel.Channel.st art(Channel.java:692)

... 8 more
Caused by: com.jcraft.jsch.JSchException: timeout: socket is not established

at com.jcraft.jsch.Util.createSocket(Util.java:394)

at com.jcraft.jsch.Session.connect(Session.java:215)

at com.mirth.connect.connectors.file.filesystems.Sftp Connection.<init>(SftpConnection.java:160)

at com.mirth.connect.connectors.file.filesystems.File SystemConnectionFactory.makeObject(FileSystemConne ctionFactory.java:140)

at org.apache.commons.pool2.impl.GenericObjectPool.cr eate(GenericObjectPool.java:861)

at org.apache.commons.pool2.impl.GenericObjectPool.bo rrowObject(GenericObjectPool.java:435)

at org.apache.commons.pool2.impl.GenericObjectPool.bo rrowObject(GenericObjectPool.java:363)

at com.mirth.connect.connectors.file.FileConnector.ge tConnection(FileConnector.java:174)

at com.mirth.connect.connectors.file.FileReceiver.onS tart(FileReceiver.java:141)
Reply With Quote
  #2  
Old 05-18-2018, 08:26 AM
AlexNeiva AlexNeiva is offline
Mirth Guru
 
Join Date: Oct 2013
Location: Portugal
Posts: 277
AlexNeiva is on a distinguished road
Default

Hello,


when you manually start the channel, you wait some time or it is like 2sec and starts?
__________________
Best Regards,
Alex Neiva
Reply With Quote
  #3  
Old 05-18-2018, 09:21 AM
mendozamm mendozamm is offline
Mirth Newb
 
Join Date: Jan 2016
Posts: 6
mendozamm is on a distinguished road
Default

It starts pretty quickly. So I would say it spins up in like 2 secs
Reply With Quote
  #4  
Old 05-18-2018, 10:23 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,028
agermano is on a distinguished road
Default

Is there a VPN tunnel that needs to be reestablished the first time it attempts to start that may cause it to take longer?
Reply With Quote
  #5  
Old 05-18-2018, 10:27 AM
mendozamm mendozamm is offline
Mirth Newb
 
Join Date: Jan 2016
Posts: 6
mendozamm is on a distinguished road
Default

No. It is an SFTP site that we access through an IP addy.
Reply With Quote
  #6  
Old 05-21-2018, 02:48 AM
AlexNeiva AlexNeiva is offline
Mirth Guru
 
Join Date: Oct 2013
Location: Portugal
Posts: 277
AlexNeiva is on a distinguished road
Default

Hello,


inside the channel, on Script tab, put some delay on Deploy Script, just to see the way it will perform:


Code:
// This script executes once when the channel is deployed
// You only have access to the globalMap and globalChannelMap here to persist data
// 5sec delay

Packages.java.lang.Thread.sleep(5000);
return;
__________________
Best Regards,
Alex Neiva
Reply With Quote
  #7  
Old 05-24-2018, 07:03 AM
mendozamm mendozamm is offline
Mirth Newb
 
Join Date: Jan 2016
Posts: 6
mendozamm is on a distinguished road
Default

I applied the delay start script; however, after a server restart...the channel remains in a stopped state. Nice thought attempt though.
Reply With Quote
  #8  
Old 05-24-2018, 11:24 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,028
agermano is on a distinguished road
Default

Quote:
Originally Posted by mendozamm View Post
No. It is an SFTP site that we access through an IP addy.
It's common to use the ip address when accessing a sftp site over a vpn tunnel because the host probably is not in your local dns.

Do these reboots happen at a set time where the sftp server may actually not be available?

How soon after the reboot do you bounce the channel?
Reply With Quote
  #9  
Old 05-25-2018, 11:07 AM
mendozamm mendozamm is offline
Mirth Newb
 
Join Date: Jan 2016
Posts: 6
mendozamm is on a distinguished road
Default

The server restarts are monthly. However, I can restart the server at anytime and the channels will be in a stop state. For the scripting above, I performed the restart/testing outside normal maintenance windows and the channels did not start. In this test...I started the channels immediately after a restart (I applied the delay script to some of the channels...keeping the rest as the baseline group).

For the monthly server restarts...I bounce the channels the morning after.
Reply With Quote
  #10  
Old 01-22-2019, 09:38 AM
nightdenizen nightdenizen is offline
What's HL7?
 
Join Date: Jan 2019
Posts: 1
nightdenizen is on a distinguished road
Default

No post in a long time; don't know if the question was ever answered.

If you are running on windows, have you tried setting the mirth services to Automatic (Delayed) to allow the system to come up completely prior to mirth starting. It could prevent the error.
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 09:27 PM.


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