Getting Connection Reset by Peer Error on Memsql

Hi All,

When we run the following query, we are receiving this error -

file:///opt/dw_installer/dw/etl/logistics_fact/sync_shipment_fact_with_new_records.ktr] org.pentaho.di.core.exception.KettleDatabaseException:
An error occurred executing SQL:
select *, false as is_deleted
from shipment_fact_stg where not exists (select * from shipment_fact where
shipment_fact.shipment_no=shipment_fact_stg.shipment_no and
shipment_fact.creation_org_key=shipment_fact_stg.creation_org_key and
shipment_fact.oltp_id=shipment_fact_stg.oltp_id and
shipment_fact.deleted=false and
shipment_fact.is_historical=false)
and error is null
(conn=34950) Leaf Error (172.31.20.7:3307): Error reading from socket. Errno=104 (Connection reset by peer)
at org.pentaho.di.core.database.Database.openQuery(Database.java:1772)
at org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:236)
at org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:140)
at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.sql.SQLException: (conn=34950) Leaf Error (172.31.20.7:3307): Error reading from socket. Errno=104 (Connection reset by peer)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:255)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:165)
at org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:238)
at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:327)
at org.mariadb.jdbc.MariaDbStatement.executeQuery(MariaDbStatement.java:501)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.pentaho.di.core.database.Database.openQuery(Database.java:1761)
… 4 more
Caused by: java.sql.SQLException: Leaf Error (172.31.20.7:3307): Error reading from socket. Errno=104 (Connection reset by peer)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:255)
at org.mariadb.jdbc.internal.com.read.resultset.SelectResultSet.readNextValue(SelectResultSet.java:440)
at org.mariadb.jdbc.internal.com.read.resultset.SelectResultSet.addStreamingValue(SelectResultSet.java:416)
at org.mariadb.jdbc.internal.com.read.resultset.SelectResultSet.nextStreamingValue(SelectResultSet.java:403)
at org.mariadb.jdbc.internal.com.read.resultset.SelectResultSet.(SelectResultSet.java:212)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readResultSet(AbstractQueryProtocol.java:1721)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1466)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1415)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:227)
at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:321)
… 8 more
)

Why are we seeing connection reset issue here? what does this signify?

Hello, @sdevaiah! Thanks for your question.

I see that you’re using the MariaDB JDBC driver. Are you aware that we have a native SingleStore JDBC driver now? I recommend that you give it a try.

In the meantime, can you please provide me with some more information regarding your issue? Is this consistent or intermittent? Are you building a native app or using a 3rd party tool? What version of SingleStore and JDBC are you using and what is your SingleStore configuration? Can you please provide a snippet of the code that results in the error?

1 Like

We are using Pentaho data integration tool which offers the MariaDB JDBC Driver to connect to Single Store. I wasnt aware of the Single Store JDBC Server, need to check if they have the support. The issue is seen intermittently. We are using PDI(Pentaho data Integration) for our ETL process. The Version of Singlestore is 7.1.3. The code causing the issue is also random and not the same piece of code.