dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Bug] [Worker] SQL query Error when executequery in doris after every interval, what ever jdbc version.

Open siriume opened this issue 4 years ago • 10 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

doris (1.0, 1,1.x, 1.2-dev), execute sql query job failed.

[ERROR] 2022-09-30 14:00:00.749 +0800 [taskAppId=TASK-20220930-6742655646304_15-13157-516059] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[211] - execute sql error: Communications link failure

The last packet successfully received from the server was 108 milliseconds ago. The last packet sent successfully to the server was 108 milliseconds ago.
[ERROR] 2022-09-30 14:00:00.750 +0800 [taskAppId=TASK-20220930-6742655646304_15-13157-516059] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet successfully received from the server was 108 milliseconds ago. The last packet sent successfully to the server was 108 milliseconds ago.
	at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1061)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1009)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1320)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:994)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
	at org.apache.dolphinscheduler.plugin.task.sql.SqlTask.executeUpdate(SqlTask.java:305)
	at org.apache.dolphinscheduler.plugin.task.sql.SqlTask.executeFuncAndSql(SqlTask.java:202)
	at org.apache.dolphinscheduler.plugin.task.sql.SqlTask.handle(SqlTask.java:158)
	at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:208)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
	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.mysql.cj.exceptions.CJCommunicationsException: Communications link failure

The last packet successfully received from the server was 108 milliseconds ago. The last packet sent successfully to the server was 108 milliseconds ago.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
	at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
	at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:581)
	at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:761)
	at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:700)
	at com.mysql.cj.protocol.a.NativeProtocol.sendQueryPacket(NativeProtocol.java:1051)
	at com.mysql.cj.NativeSession.execSQL(NativeSession.java:665)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:893)
	... 17 common frames omitted
Caused by: java.net.SocketException: Socket closed
	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 com.mysql.cj.protocol.ReadAheadInputStream.fill(ReadAheadInputStream.java:107)
	at com.mysql.cj.protocol.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:150)
	at com.mysql.cj.protocol.ReadAheadInputStream.read(ReadAheadInputStream.java:180)
	at java.io.FilterInputStream.read(FilterInputStream.java:133)
	at com.mysql.cj.protocol.FullReadInputStream.readFully(FullReadInputStream.java:64)
	at com.mysql.cj.protocol.a.SimplePacketReader.readHeaderLocal(SimplePacketReader.java:81)
	at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:63)
	at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:45)
	at com.mysql.cj.protocol.a.TimeTrackingPacketReader.readHeader(TimeTrackingPacketReader.java:52)
	at com.mysql.cj.protocol.a.TimeTrackingPacketReader.readHeader(TimeTrackingPacketReader.java:41)
	at com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:54)
	at com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:44)
	at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:575)
	... 22 common frames omitted

What you expected to happen

execute SQL query job succeed every time.

How to reproduce

doris insert odbc table to doris inner table, every 2 hour report an error. mysql 5.6, doris1.0~1.2(dev).

Anything else

No response

Version

3.0.x

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

siriume avatar Sep 30 '22 06:09 siriume

Thank you for your feedback, we have received your issue, Please wait patiently for a reply.

  • In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
  • If you haven't received a reply for a long time, you can join our slack and send your question to channel #troubleshooting

github-actions[bot] avatar Sep 30 '22 06:09 github-actions[bot]

@siriume doris use proxy to connect?

stalary avatar Oct 08 '22 14:10 stalary

@siriume doris use proxy to connect?

proxy or not, it always errors.

siriume avatar Oct 09 '22 10:10 siriume

Has it been fixed? I also encountered the same situation in 3.0. x @siriume

TurboWay avatar Jan 27 '23 11:01 TurboWay

same issue,seems to be the connection pool's configration problem,but dont know where to config.

martialma avatar Mar 28 '23 04:03 martialma

Has it been fixed? I also encountered the same situation in 3.0. x @siriume

Toms1999 avatar Oct 13 '23 03:10 Toms1999

遇到同样的问题啊,2h一次,请问是否修复?@siriume

limuziyyds avatar Oct 30 '23 06:10 limuziyyds

Dolphinescheduler3.1.7 & Doris 2.0.x 遇到同样的问题啊,不定期出现 Communications link failure,请问是否修复? @siriume @limuziyyds

VanYue avatar Jan 22 '24 01:01 VanYue

This bug has been fixed since version 3.1.8 https://github.com/apache/dolphinscheduler/pull/14670

TurboWay avatar Jan 25 '24 09:01 TurboWay

This bug has been fixed since version 3.1.8 #14670

Thanks

VanYue avatar Jan 25 '24 11:01 VanYue