nextgenhealthcare / connect

The swiss army knife of healthcare integration.
Other
869 stars 265 forks source link

Upgrading mirth 3.5.2 to 4.4.2 failed to start #6007

Closed tangzhiqiangh closed 7 months ago

tangzhiqiangh commented 7 months ago

Describe the bug After downloading the Windows installer and upgrading to mirth connect 4.4.2, starting mirth fails.

Expected behavior Downloading the Windows installer to upgrade mirth connect 4.4.2 failed.

Actual behavior Download Windows installer to upgrade mirth connect 4.4.2 mirth startup failed.

Screenshots image

image

image

image

image

image

Environment (please complete the following information):

Workaround(s) Are there one or more workarounds for this issue currently?

Additional context ERROR 2023-12-05 07:16:11.124 [Main Server Thread] com.mirth.connect.server.Mirth: Error establishing connection to database, retrying startup in 10000 milliseconds com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:512) ~[HikariCP-2.5.1.jar:?] at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:105) ~[HikariCP-2.5.1.jar:?] at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:94) ~[HikariCP-2.5.1.jar:?] at org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:131) ~[mybatis-3.1.1.jar:3.1.1] at org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:58) ~[mybatis-3.1.1.jar:3.1.1] at org.apache.ibatis.session.defaults.DefaultSqlSession.getConnection(DefaultSqlSession.java:220) ~[mybatis-3.1.1.jar:3.1.1] at org.apache.ibatis.session.SqlSessionManager.getConnection(SqlSessionManager.java:221) ~[mybatis-3.1.1.jar:3.1.1] at com.mirth.connect.server.Mirth.startup(Mirth.java:255) ~[mirth-server.jar:?] at com.mirth.connect.server.Mirth.run(Mirth.java:168) ~[mirth-server.jar:?] Caused by: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:835) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:455) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:95) ~[HikariCP-2.5.1.jar:?] at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:101) ~[HikariCP-2.5.1.jar:?] at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:341) ~[HikariCP-2.5.1.jar:?] at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:506) ~[HikariCP-2.5.1.jar:?] ... 8 more Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_372] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_372] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_372] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_372] at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:361) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.protocol.a.NativeAuthenticationProvider.negotiateSSLConnection(NativeAuthenticationProvider.java:777) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.protocol.a.NativeAuthenticationProvider.proceedHandshakeWithPluggableAuthentication(NativeAuthenticationProvider.java:486) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.protocol.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:202) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1452) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.NativeSession.connect(NativeSession.java:165) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:955) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:825) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:455) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:95) ~[HikariCP-2.5.1.jar:?] at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:101) ~[HikariCP-2.5.1.jar:?] at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:341) ~[HikariCP-2.5.1.jar:?] at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:506) ~[HikariCP-2.5.1.jar:?] ... 8 more Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate) at sun.security.ssl.HandshakeContext.(HandshakeContext.java:171) ~[?:1.8.0_372] at sun.security.ssl.ClientHandshakeContext.(ClientHandshakeContext.java:103) ~[?:1.8.0_372] at sun.security.ssl.TransportContext.kickstart(TransportContext.java:227) ~[?:1.8.0_372] at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:433) ~[?:1.8.0_372] at com.mysql.cj.protocol.ExportControlled.performTlsHandshake(ExportControlled.java:316) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.protocol.StandardSocketFactory.performTlsHandshake(StandardSocketFactory.java:188) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.protocol.a.NativeSocketConnection.performTlsHandshake(NativeSocketConnection.java:99) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:352) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.protocol.a.NativeAuthenticationProvider.negotiateSSLConnection(NativeAuthenticationProvider.java:777) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.protocol.a.NativeAuthenticationProvider.proceedHandshakeWithPluggableAuthentication(NativeAuthenticationProvider.java:486) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.protocol.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:202) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1452) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.NativeSession.connect(NativeSession.java:165) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:955) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:825) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:455) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199) ~[mysql-connector-java-8.0.16.jar:8.0.16] at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:95) ~[HikariCP-2.5.1.jar:?] at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:101) ~[HikariCP-2.5.1.jar:?] at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:341) ~[HikariCP-2.5.1.jar:?] at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:506) ~[HikariCP-2.5.1.jar:?] ... 8 more ERROR 2023-12-05 07:16:21.130 [Main Server Thread] com.mirth.connect.server.Mirth: Error establishing connection to database, aborting startup. Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. INFO 2023-12-05 07:16:21.133 [Shutdown Hook Thread] com.mirth.connect.server.Mirth: shutting down mirth due to normal request

ab-mg-23 commented 7 months ago

What version of MySQL are you using? Per the release notes for Connector/J 8.0.16:

Version 8.0.16 is the latest General Availability release of the 8.0 series of MySQL Connector/J. It is suitable for use with MySQL Server versions 8.0, 5.7, and 5.6. It supports the Java Database Connectivity (JDBC) 4.2 API, and implements the X DevAPI.

The release notes for version Connector/J 5.1.32 included with Mirth 3.5.X states:

Version 5.1.32 is a maintenance release of the production 5.1 branch. It is suitable for use with MySQL Server versions 5.5, and 5.6.

pacmano1 commented 7 months ago

I'd also add that direct upgrades from versions that far apart haven't been officially supported from what I recall, and certainly not without out reading all releases notes from your current version to the latest version to identify any update that might affect your upgrade.

tangzhiqiangh commented 7 months ago

Using MySQL 5.7 image

pacmano1 commented 7 months ago

English please.

tangzhiqiangh commented 7 months ago

Using MySQL 5.7 Why does the mirth.properties file automatically add content when starting the service?

# In version 3.7.0 the default protocols / cipher suites were updated to reflect the latest security best practices. The old value for https.client.protocols, in case you need it, is below.
# If you no longer need it, you can delete this property.
https.client.protocols.old = TLSv1.3,TLSv1.2

# In version 3.7.0 the default protocols / cipher suites were updated to reflect the latest security best practices. The old value for https.server.protocols, in case you need it, is below.
# If you no longer need it, you can delete this property.
https.server.protocols.old = TLSv1.3,TLSv1.2,SSLv2Hello

# In version 3.7.0 the default protocols / cipher suites were updated to reflect the latest security best practices. The old value for https.ciphersuites, in case you need it, is below.
# If you no longer need it, you can delete this property.
https.ciphersuites.old = TLS_CHACHA20_POLY1305_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256,TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_DSS_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_DSS_WITH_AES_128_GCM_SHA256,TLS_EMPTY_RENEGOTIATION_INFO_SCSV

# The following properties were automatically added on startup for version 3.7.0

# If true, various read-only statements are separated into their own connection pool.
# By default the read-only pool will use the same connection information as the master pool,
# but you can change this with the "database-readonly" options. For example, to point the
# read-only pool to a different JDBC URL:
# database-readonly.url = jdbc:...
database.enable-read-write-split = true

# Maximum number of connections allowed for the read-only connection pool
database-readonly.max-connections = 20

# The language version for the Rhino JavaScript engine.
rhino.languageversion = default

# The following properties were automatically added on startup for version 3.11.0

# On startup, Maximum number of retries to establish database connections in case of failure
database.connection.maxretry = 2

# On startup, Maximum wait time in millseconds for retry to establish database connections in case of failure
database.connection.retrywaitinmilliseconds = 10000

# The following properties were automatically added on startup for version 3.12.0

# If set to true, the Connect REST API will require all incoming requests to contain an "X-Requested-With" header.
# This protects against Cross-Site Request Forgery (CSRF) security vulnerabilities.
server.api.require-requested-with = true

# The algorithm to use when decrypting old message content.
encryption.fallback.algorithm = AES

# The character set encoding to use when decrypting old message content
encryption.fallback.charset = windows-1252

# Allows old digest values to be verified
digest.fallback.algorithm = SHA256
digest.fallback.iterations = 1000
digest.fallback.usepbe = 0

# Only used for migration purposes, do not modify
version = 4.4.2
ab-mg-23 commented 7 months ago

I didn't read deep enough into the stack trace, the key is here: Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate) at sun.security.ssl.HandshakeContext.(HandshakeContext.java:171) ~[?:1.8.0_372] at sun.security.ssl.ClientHandshakeContext.(ClientHandshakeContext.java:103) ~[?:1.8.0_372]

The driver and the MySQL server don't agree on what version of TLS to use or don't agree on a set of ciphers.

pacmano1 commented 7 months ago

Converting to Discussion, this is not a bug.