使用dubbox提供webservice对外接口服务,tomcat做容器,但是不知道怎么修改长链接的超时时间,导致链接一直不释放,而报错:
2017-08-16 14:11:04 [ pool-3-thread-567:78611903 ] - [ WARN ] com.ngaa.webservice.utils.DBConnectionFactory.getConnection(DBConnectionFactory.java:72) connection; before get the datasource ....................... 2017-08-16 14:11:04 [ Druid-ConnectionPool-Create-1864827376-SendThread(bg-js-232321:2181):78612338 ] - [ WARN ] org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1102) Session 0x0 for server bg-js-232321/127.0.0.1:2181, 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) 2017-08-16 14:11:05 [ pool-3-thread-559:78613531 ] - [ WARN ] com.ngaa.webservice.utils.DBConnectionFactory.getConnection(DBConnectionFactory.java:74) connection; dataSource url:jdbc:phoenix:bg-js-sz1-ib1,bg-js-sz1-ib2,bg-js-232321:2181:/hbase:log2hadoop@SINOCACHE.NET:/home/spark/conf/logp.keytab 后续一直报错: at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) 2017-08-16 15:18:33 [ Druid-ConnectionPool-Create-1864827376-SendThread(bg-js-232321:2181):82660687 ] - [ WARN ] org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1102) Session 0x0 for server bg-js-232321/127.0.0.1:2181, 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) 2017-08-16 15:18:33 [ Druid-ConnectionPool-Create-1864827376-SendThread(bg-js-sz1-ib1:2181):82660687 ] - [ WARN ] org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1102) Session 0x0 for server bg-js-sz1-ib1/127.0.0.1:2181, 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)
使用dubbox提供webservice对外接口服务,tomcat做容器,但是不知道怎么修改长链接的超时时间,导致链接一直不释放,而报错:
2017-08-16 14:11:04 [ pool-3-thread-567:78611903 ] - [ WARN ] com.ngaa.webservice.utils.DBConnectionFactory.getConnection(DBConnectionFactory.java:72) connection; before get the datasource ....................... 2017-08-16 14:11:04 [ Druid-ConnectionPool-Create-1864827376-SendThread(bg-js-232321:2181):78612338 ] - [ WARN ] org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1102) Session 0x0 for server bg-js-232321/127.0.0.1:2181, 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) 2017-08-16 14:11:05 [ pool-3-thread-559:78613531 ] - [ WARN ] com.ngaa.webservice.utils.DBConnectionFactory.getConnection(DBConnectionFactory.java:74) connection; dataSource url:jdbc:phoenix:bg-js-sz1-ib1,bg-js-sz1-ib2,bg-js-232321:2181:/hbase:log2hadoop@SINOCACHE.NET:/home/spark/conf/logp.keytab 后续一直报错: at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) 2017-08-16 15:18:33 [ Druid-ConnectionPool-Create-1864827376-SendThread(bg-js-232321:2181):82660687 ] - [ WARN ] org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1102) Session 0x0 for server bg-js-232321/127.0.0.1:2181, 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) 2017-08-16 15:18:33 [ Druid-ConnectionPool-Create-1864827376-SendThread(bg-js-sz1-ib1:2181):82660687 ] - [ WARN ] org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1102) Session 0x0 for server bg-js-sz1-ib1/127.0.0.1:2181, 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)