SQLTransientConnectionException after upgrading MariaDB connector - scala

I've upgraded the "org.mariadb.jdbc" % "mariadb-java-client" connector from 1.5.9 to 1.6.0 and I'd started to fail while connecting to the DB due to timeout exceptions.
I'm using it with HikariCP 2.5.1 and Slick 3.2.0. If I rollback the change again to MariaDB connector 1.5.9 it successfully connects, and if I try to upgrade directly to 2.0.1, it fails with the very same error.
The thing is that based on the 1.6.0 changelog, we shouldn't experiment any breaking change. But according to the differences in the GitHub repository, it could have some more modifications than the ones specified in the changelog :/
Exception with a local DB:
java.sql.SQLTransientConnectionException: xxx.db - Connection is not available, request timed out after 5006ms.
at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:548)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:186)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:145)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:83)
at slick.jdbc.hikaricp.HikariCPJdbcDataSource.createConnection(HikariCPJdbcDataSource.scala:18)
at slick.jdbc.JdbcBackend$BaseSession.<init>(JdbcBackend.scala:439)
at slick.jdbc.JdbcBackend$DatabaseDef.createSession(JdbcBackend.scala:47)
at slick.jdbc.JdbcBackend$DatabaseDef.createSession(JdbcBackend.scala:38)
at slick.basic.BasicBackend$DatabaseDef$class.acquireSession(BasicBackend.scala:218)
at slick.jdbc.JdbcBackend$DatabaseDef.acquireSession(JdbcBackend.scala:38)
at slick.basic.BasicBackend$DatabaseDef$$anon$2.run(BasicBackend.scala:239)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=localhost)(port=3306)(type=master) : Connection refused
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:156)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:118)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.throwException(ExceptionMapper.java:92)
at org.mariadb.jdbc.Driver.connect(Driver.java:108)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:95)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:101)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:341)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:193)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:430)
at com.zaxxer.hikari.pool.HikariPool.access$500(HikariPool.java:64)
at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:570)
at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:563)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 3 common frames omitted
Caused by: java.sql.SQLException: Could not connect to address=(host=localhost)(port=3306)(type=master) : Connection refused
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1020)
at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:481)
at org.mariadb.jdbc.Driver.connect(Driver.java:103)
... 12 common frames omitted
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connect(AbstractConnectProtocol.java:392)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1013)
... 14 common frames omitted
Exception with a remote DB:
java.sql.SQLTransientConnectionException: xxx.db - Connection is not available, request timed out after 5003ms.
at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:548)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:186)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:145)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:83)
at slick.jdbc.hikaricp.HikariCPJdbcDataSource.createConnection(HikariCPJdbcDataSource.scala:18)
at slick.jdbc.JdbcBackend$BaseSession.<init>(JdbcBackend.scala:439)
at slick.jdbc.JdbcBackend$DatabaseDef.createSession(JdbcBackend.scala:47)
at slick.jdbc.JdbcBackend$DatabaseDef.createSession(JdbcBackend.scala:38)
at slick.basic.BasicBackend$DatabaseDef$class.acquireSession(BasicBackend.scala:218)
at slick.jdbc.JdbcBackend$DatabaseDef.acquireSession(JdbcBackend.scala:38)
at slick.basic.BasicBackend$DatabaseDef$$anon$2.run(BasicBackend.scala:239)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

It certainly looks like, at least in the local case, that:
The port is mis-configured. Or,
The pool size exceeds the database maximum. Or,
The username/password is incorrect. Or,
The user does not have permission to connect to the server or the specified database.
java.net.ConnectException: Connection refused is a socket level error. Typically, this indicates that either there was no server running on the specified port, or the server is rejecting the connection for some other reason (security, etc).
You might double check all of the driver/datasource properties to verify that they are correct. It might be useful if you could post your HikariCP configuration.

Disclaimer: I am one of the mariadb developper
In 1.6.0 version, "usePipelineAuth" option has changed the connection implementation.
During connection, different queries are executed. When option is active those queries are send using pipeline (all queries are send, then only all results are reads), permitting faster connection creation.
That permit to saving network latency.
Disabling this option will probably solved your issue.
At the same time, i've create an issue on mariadb tracker.

Related

After few successful updates to solr, throws SolrException: java.util.concurrent.TimeoutException: Could not connect to ZooKeeper

I am using solr version 7.3.1 and using it with 3 external zookeeper nodes.
Below is my zookeeper config for one of the node, all have similar config:
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/Users/<user>/zookeeper/zookdata/zk2/
clientPort=2182
server.1=localhost:2666:3666
server.2=localhost:2667:3667
server.3=localhost:2668:3668
Then, I am using these 3 nodes to start solr. In my application I am using localhost:2182,localhost:2183 to connect to solr, using below code.
List<String> zkHosts = Arrays.asList(solrZkHostPort.split(","));
CloudSolrClient.Builder builder = new CloudSolrClient.Builder(zkHosts, Optional.empty());
solrClient = builder.build();
I am using multiple spark executors to update document to solr. It works fine for some 1100-1300 records update after that update fails with below exception:
Caused by: org.apache.solr.common.SolrException: java.util.concurrent.TimeoutException: Could not connect to ZooKeeper localhost:2182,localhost:2183 within 10000 ms
at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:183)
at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:120)
at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:110)
at org.apache.solr.common.cloud.ZkStateReader.<init>(ZkStateReader.java:285)
at org.apache.solr.client.solrj.impl.ZkClientClusterStateProvider.connect(ZkClientClusterStateProvider.java:155)
at org.apache.solr.client.solrj.impl.CloudSolrClient.connect(CloudSolrClient.java:399)
at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:828)
at org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:818)
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:194)
at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:106)
at com.package.SomeApplicationClass
... 16 more
Caused by: java.util.concurrent.TimeoutException: Could not connect to ZooKeeper localhost:2182,localhost:2183 within 10000 ms
at org.apache.solr.common.cloud.ConnectionManager.waitForConnected(ConnectionManager.java:232)
at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:175)
... 26 more
I get below exception too, not sure though if this has any significance:
18/09/20 12:45:40 WARN ClientCnxn: Session 0x0 for server localhost/127.0.0.1:2183, unexpected error, closing socket connection and attempting reconnect
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:192)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:68)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
any idea what could be the problem? Do I need to change zookeeper config or they way I create solr client needs to change?
Noob mistake.
My spark job was creating more then 1000 spark executors and for each executor, solr client was getting created and I was not closing the solrClient. closed solrclient after executor completed.

Postgres JDBC client getting stuck at reading from socket

I have a PostGIS database and a client built on top of HikariCP to read the data from a database. My client can read the data without any problem on some machines. However, on some other machines client gets stuck and is not able to read any data throwing socket timeout exceptions.
MyClass:120 - Failed to execute HikariProxyPreparedStatement#2091541230 wrapping <my-query>.
org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:332)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:155)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:118)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
...
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:140)
at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:109)
at org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:67)
at org.postgresql.core.PGStream.receiveChar(PGStream.java:293)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1947)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:306)
... 32 more
ProxyConnection:161 - HikariPool-1 - Connection org.postgresql.jdbc.PgConnection#1aafd32f marked as broken because of SQLSTATE(08006), ErrorCode(0)
org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:332)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:155)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:118)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
...
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:140)
at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:109)
at org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:67)
at org.postgresql.core.PGStream.receiveChar(PGStream.java:293)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1947)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:306)
... 31 more
Before client throws SocketTimeoutException on the database side, I monitored pg_stat_activity table. The corresponding row for the query above had wait_event_type=Client and wait_event=ClientWrite. In addition, database server logged messages indicating connection is lost.
LOG: unexpected EOF on client connection with an open transaction
LOG: could not send data to client: Connection timed out
FATAL: connection to client lost
Versions
PostGIS-jdbc: 2.2.1 (postgresql jdbc: 9.4.1208.jre7)
HikariCP: 3.1.0
Postgres server: 10.3
PostGIS server: 2.4.4
If I don't set socketTimeout through jdbc connection string, then connection would get stuck forever. Once the connection reaches it's max life time, it would be dropped and connected again. However, it still cannot read the data. When I set socketTimeout, then exception would be thrown.
UPDATE
If socketTimeout is not set, then pg_stat_activity table would have a row for the connection with the following values: state=idle in transaction, wait_event_type=Client and wait_event=ClientRead.
My guess is that some sort of network setting is blocking the read from the server on the client side. How can I further debug this and find the root cause?
We found out that this was caused by the database server's MTU setting. MTU was set to 9000 by default and resulted in packet loss. Changing it to 1500 resolved the issue.

SSH tunnelling failure between Metabase and Postgresql

Trying to add a Postgres database on Metabase via SSH tunneling I ran into an error giving me the following error message: "Server error encountered"
My logs are very similar to #williamjacksn 's logs on the post:
http://discourse.metabase.com/t/ssh-tunnel-failure/2469
I am certain that my credentials are OK since I use the same for a Postico SSH connection as well as a DBeaver connection.
I already checked the following fix: https://github.com/metabase/metabase/pull/6970
Howerver I have no idea how to use it as i cannot find the ssh.clj file on my machine.
Would there be a fix for this ?
Extra info:
Install via the .jar file. Working on Firefox 58.0.2 | Mac OSX 10.10.5
Thanks in advance
Log:
03-12 10:16:48 INFO util.ssh :: creating ssh tunnel metabase#192.168.1.2:22 -L 56334:localhost:5432
03-12 10:16:53 ERROR metabase.driver :: Failed to connect to database: Timed out after 5000 milliseconds.
03-12 10:16:53 DEBUG metabase.middleware :: POST /api/setup/validate 400 (5 s) (0 DB calls)
{:errors {:dbname "Timed out after 5000 milliseconds."}}
Mar 12, 2018 10:16:53 AM org.postgresql.Driver connect
SEVERE: Connection error:
org.postgresql.util.PSQLException: The connection attempt failed.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:275)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at org.postgresql.jdbc.PgConnection.(PgConnection.java:194)
at org.postgresql.Driver.makeConnection(Driver.java:450)
at org.postgresql.Driver.connect(Driver.java:252)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:678)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:190)
at clojure.java.jdbc$get_connection.invokeStatic(jdbc.clj:364)
at clojure.java.jdbc$get_connection.invoke(jdbc.clj:226)
at clojure.java.jdbc$db_query_with_resultset_STAR_.invokeStatic(jdbc.clj:1014)
at clojure.java.jdbc$db_query_with_resultset_STAR_.invoke(jdbc.clj:996)
at clojure.java.jdbc$query.invokeStatic(jdbc.clj:1090)
at clojure.java.jdbc$query.invoke(jdbc.clj:1047)
at clojure.java.jdbc$query.invokeStatic(jdbc.clj:1063)
at clojure.java.jdbc$query.invoke(jdbc.clj:1047)
at metabase.driver.generic_sql$can_connect_QMARK_.invokeStatic(generic_sql.clj:220)
at metabase.driver.generic_sql$can_connect_QMARK_.invoke(generic_sql.clj:217)
at metabase.driver$fn__25577$G__25354__25584.invoke(driver.clj:51)
at metabase.driver$can_connect_with_details_QMARK_$fn__25710.invoke(driver.clj:451)
at clojure.core$binding_conveyor_fn$fn__4676.invoke(core.clj:1938)
at clojure.lang.AFn.call(AFn.java:18)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.net.SocketTimeoutException: connect timed out
at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:400)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:243)
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:225)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:402)
at java.base/java.net.Socket.connect(Socket.java:591)
at org.postgresql.core.PGStream.(PGStream.java:68)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:144)
... 24 more
Mar 12, 2018 10:16:58 AM org.postgresql.Driver connect
SEVERE: Connection error:
org.postgresql.util.PSQLException: The connection attempt failed.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:275)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at org.postgresql.jdbc.PgConnection.(PgConnection.java:194)
at org.postgresql.Driver.makeConnection(Driver.java:450)
at org.postgresql.Driver.connect(Driver.java:252)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:678)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:190)
at clojure.java.jdbc$get_connection.invokeStatic(jdbc.clj:364)
at clojure.java.jdbc$get_connection.invoke(jdbc.clj:226)
at clojure.java.jdbc$db_query_with_resultset_STAR_.invokeStatic(jdbc.clj:1014)
at clojure.java.jdbc$db_query_with_resultset_STAR_.invoke(jdbc.clj:996)
at clojure.java.jdbc$query.invokeStatic(jdbc.clj:1090)
at clojure.java.jdbc$query.invoke(jdbc.clj:1047)
at clojure.java.jdbc$query.invokeStatic(jdbc.clj:1063)
at clojure.java.jdbc$query.invoke(jdbc.clj:1047)
at metabase.driver.generic_sql$can_connect_QMARK_.invokeStatic(generic_sql.clj:220)
at metabase.driver.generic_sql$can_connect_QMARK_.invoke(generic_sql.clj:217)
at metabase.driver$fn__25577$G__25354__25584.invoke(driver.clj:51)
at metabase.driver$can_connect_with_details_QMARK_$fn__25710.invoke(driver.clj:451)
at clojure.core$binding_conveyor_fn$fn__4676.invoke(core.clj:1938)
at clojure.lang.AFn.call(AFn.java:18)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.net.SocketTimeoutException: connect timed out
at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:400)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:243)
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:225)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:402)
at java.base/java.net.Socket.connect(Socket.java:591)
at org.postgresql.core.PGStream.(PGStream.java:68)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:144)
... 24 more`
I already checked the following fix: https://github.com/metabase/metabase/pull/6970 Howerver I have no idea how to use it as i cannot find the ssh.clj file on my machine.
To try out the ssh.clj changes proposed in the pull request you need to get the source code from GitHub, then build Metabase yourself from source code. I just happen to have described the steps over on the Metabase discussion forum for someone in a similar situation (though needing a different PR for a different purpose):
http://discourse.metabase.com/t/snowflake-driver-test/3110

Mirth Connect: Failed to start channel_Failed to start HTTP Listener

I'm fairly new to using Mirth Connect. The Mirth Connect Administrator dashboard opens up, but the status of the channel is stopped. When starting it an ERROR occurs that says Failed to start channel XYZ and Failed to start HTTP Listener. I want to get my channel to successfully start and looking help with any solutions to doing this. Any suggestions?
Below is the error that occurs:
[2017-12-07 11:45:54,951] ERROR (com.mirth.connect.server.channel.ErrorTaskHandler:25): com.mirth.connect.donkey.server.StartException: Failed to start channel XYZ (27355de6-a).
at com.mirth.connect.donkey.server.channel.Channel.start(Channel.java:716)
at com.mirth.connect.server.controllers.DonkeyEngineController$DeployTask.doDeploy(DonkeyEngineController.java:1838)
at com.mirth.connect.server.controllers.DonkeyEngineController$DeployTask.execute(DonkeyEngineController.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(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.mirth.connect.donkey.server.ConnectorTaskException: Failed to start HTTP Listener
at com.mirth.connect.connectors.http.HttpReceiver.onStart(HttpReceiver.java:301)
at com.mirth.connect.donkey.server.channel.SourceConnector.start(SourceConnector.java:104)
at com.mirth.connect.donkey.server.channel.Channel.start(Channel.java:692)
... 8 more
Caused by: java.net.SocketException: Permission denied
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:317)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:235)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:401)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at com.mirth.connect.connectors.http.HttpReceiver.onStart(HttpReceiver.java:297)
... 10 more
I want to get the status of the channel to successfully start and deploy.
Currently, that status of the channel is Stopped.
I am not sure if this is your case, but the default HTTP listening port is 80. If you are running mirth over a linux system ports below 1024 are not available to regular users.
At least from my experience, binding and permission denied error are usually related to low ports.
Try using a higher port and let us know if that was the cause of the problem.

XMPP : BOSH client using Blabber not getting response over proxy

I am trying establish BOSH connection to a openfire server on port 7070 with firewall unblocked and openfire actively listening. Without proxy it works well with openfire running on same network but with proxy getting the following error,
java.io.IOException: java.net.SocketTimeoutException: Read timed out
at rocks.xmpp.core.session.XmppSession.connect(XmppSession.java:737)
at com.geo.XMPPBosh.XMPPDemo.main(XMPPDemo.java:45)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at rocks.xmpp.extensions.httpbind.BoshConnection$2.run(BoshConnection.java:564)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "main" java.lang.IllegalStateException: You must be connected to the server before trying to login.
at rocks.xmpp.core.session.XmppSession.login(XmppSession.java:827)
at com.geo.XMPPBosh.XMPPDemo.main(XMPPDemo.java:52)
Below is the code,
BoshConnectionConfiguration boshConfiguration = BoshConnectionConfiguration
.builder().hostname("remote address").port(7070)
.proxy(new Proxy(Proxy.Type.HTTP,new InetSocketAddress("proxy address", 10015))).file("/http-bind/").wait(5000).build();
Pl help on what might be the cause or the solution.