node-jdbc icon indicating copy to clipboard operation
node-jdbc copied to clipboard

java.sql.SQLException: org.apache.thrift.transport.TTransportException: java.net.SocketException: Broken pipe (Write failed)\n\tat org.apache.hive.jdbc.HiveStatement.execute

Open ntallapa12 opened this issue 7 years ago • 3 comments

When hive server is restarted after deploying node application, it fails with "broken pipe exception". Looks like connection pool is holding stale connections. I dont see any configuration to fix this issue.

This is the full stack trace: Error running instance method\njava.sql.SQLException: org.apache.thrift.transport.TTransportException: java.net.SocketException: Broken pipe (Write failed)\n\tat org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:255)\n\tat org.apache.hive.jdbc.HiveStatement.executeUpdate(HiveStatement.java:394)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\nCaused by: org.apache.thrift.transport.TTransportException: java.net.SocketException: Broken pipe (Write failed)\n\tat org.apache.thrift.transport.TIOStreamTransport.flush(TIOStreamTransport.java:161)\n\tat org.apache.thrift.transport.TSaslTransport.flush(TSaslTransport.java:501)\n\tat org.apache.thrift.transport.TSaslClientTransport.flush(TSaslClientTransport.java:37)\n\tat org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:73)\n\tat org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:62)\n\tat org.apache.hive.service.cli.thrift.TCLIService$Client.send_ExecuteStatement(TCLIService.java:219)\n\tat org.apache.hive.service.cli.thrift.TCLIService$Client.ExecuteStatement(TCLIService.java:211)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.hive.jdbc.HiveConnection$SynchronizedHandler.invoke(HiveConnection.java:1308)\n\tat com.sun.proxy.$Proxy0.ExecuteStatement(Unknown Source)\n\tat org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:246)\n\t... 5 more\nCaused by: java.net.SocketException: Broken pipe (Write failed)\n\tat java.net.SocketOutputStream.socketWrite0(Native Method)\n\tat java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)\n\tat java.net.SocketOutputStream.write(SocketOutputStream.java:155)\n\tat java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)\n\tat java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)\n\tat org.apache.thrift.transport.TIOStreamTransport.flush(TIOStreamTransport.java:159)

ntallapa12 avatar Apr 30 '18 19:04 ntallapa12

Have you tried the maxidle config? See the readme for usage.

CraZySacX avatar Jun 14 '18 02:06 CraZySacX

Yes, I did. And the error goes away only after we restart nodejs server.

ntallapa12 avatar Jul 19 '18 11:07 ntallapa12

Hi Niranjan- maxidle config in hive-site.xml or which file ?

swami2018 avatar Jan 30 '19 20:01 swami2018