rbeckman-nextgen / test-mc2

0 stars 0 forks source link

Error polling in channel due to a bug in the JSch library #4058

Open rbeckman-nextgen opened 4 years ago

rbeckman-nextgen commented 4 years ago

There is an issue involving a channel that polls from a sftp server and Mirth Connect will throw an error in the server log:

[2017-05-16 01:07:00,276] ERROR (com.mirth.connect.connectors.file.FileReceiver:207): Error polling in channel: b34b5ec1-c36e-4407-9d98-02180d3a770e com.jcraft.jsch.JSchException: Session.connect: java.security.SignatureException: Invalid encoding for signature at com.jcraft.jsch.Session.connect(Session.java:565) at com.mirth.connect.connectors.file.filesystems.SftpConnection.(SftpConnection.java:160) at com.mirth.connect.connectors.file.filesystems.FileSystemConnectionFactory.makeObject(FileSystemConnectionFactory.java:140) at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:861) at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435) at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363) at com.mirth.connect.connectors.file.FileConnector.getConnection(FileConnector.java:174) at com.mirth.connect.connectors.file.FileReceiver.listFiles(FileReceiver.java:552) at com.mirth.connect.connectors.file.FileReceiver.poll(FileReceiver.java:203) at com.mirth.connect.donkey.server.channel.PollConnectorJob.execute(PollConnectorJob.java:49) at org.quartz.core.JobRunShell.run(JobRunShell.java:213) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)

Believe this issue may be caused by a bug in the JSch library that Mirth Connect uses: https://sourceforge.net/p/jsch/bugs/111/.

Imported Issue. Original Details: Jira Issue Key: MIRTH-4203 Reporter: kgouw Created: 2017-07-27T09:10:31.000-0700

rbeckman-nextgen commented 4 years ago

Looks like someone made an unofficial fix for it: [https://sourceforge.net/p/jsch/bugs/111/#b2eb]

As a workaround you might try including jsch-111-bugfix-1.0.0.jar (either directly in server-lib, or in custom-lib with includecustomlib enabled in mirth.properties).

Then in a global deploy script:

org.jurr.jsch.bugfix111.JSCH111BugFix.init();

It's unofficial and an "at your own risk" sort of thing though.

Imported Comment. Original Details: Author: narupley Created: 2017-09-20T16:19:41.000-0700