vert-x3 / vertx-mysql-postgresql-client

This client is deprecated - use instead
https://github.com/eclipse-vertx/vertx-sql-client
Apache License 2.0
117 stars 59 forks source link

Dose PostgreSQL Client support epoll? #157

Closed RyougiNevermore closed 5 years ago

RyougiNevermore commented 5 years ago

When i use epoll, An error has occurred when the PostgreSQL Client was called. So what can i do to fix it.

java.lang.IllegalStateException: incompatible event loop type: io.netty.channel.epoll.EpollEventLoop
        at io.netty.channel.AbstractChannel$AbstractUnsafe.register(AbstractChannel.java:469) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.SingleThreadEventLoop.register(SingleThreadEventLoop.java:80) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.SingleThreadEventLoop.register(SingleThreadEventLoop.java:74) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.bootstrap.AbstractBootstrap.initAndRegister(AbstractBootstrap.java:333) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.bootstrap.Bootstrap.doResolveAndConnect(Bootstrap.java:163) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:145) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at com.github.mauricio.async.db.postgresql.codec.PostgreSQLConnectionHandler.connect(PostgreSQLConnectionHandler.scala:99) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at com.github.mauricio.async.db.postgresql.PostgreSQLConnection.connect(PostgreSQLConnection.scala:91) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.asyncsql.impl.pool.AsyncConnectionPool.createAndConnect(AsyncConnectionPool.java:95) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.asyncsql.impl.pool.AsyncConnectionPool.createConnection(AsyncConnectionPool.java:70) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.asyncsql.impl.pool.AsyncConnectionPool.createOrWaitForAvailableConnection(AsyncConnectionPool.java:109) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.asyncsql.impl.pool.AsyncConnectionPool.take(AsyncConnectionPool.java:118) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.asyncsql.impl.BaseSQLClient.getConnection(BaseSQLClient.java:64) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.asyncsql.impl.AsyncSQLClientImpl.getConnection(AsyncSQLClientImpl.java:54) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.asyncsql.impl.ClientWrapper.getConnection(ClientWrapper.java:52) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.sql.SQLClient.queryWithParams(SQLClient.java:183) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at com.yingliwang.lite.zhisou.service.cdst.commons.dal.DAL.queryOne(DAL.java:199) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at com.yingliwang.lite.zhisou.service.cdst.testing.impl.dal.TestingDAL.examReportGetWithOwnerAccess(TestingDAL.java:319) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at com.yingliwang.lite.zhisou.service.cdst.testing.impl.TestingServiceImpl.reportGet(TestingServiceImpl.java:213) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at com.yingliwang.lite.zhisou.api.cdst.TestingRouter.reportGet(TestingRouter.java:114) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:227) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:86) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RoutingContextWrapper.next(RoutingContextWrapper.java:154) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at com.yingliwang.lite.zhisou.api.ApiRouter.lambda$authenticateForce$2(ApiRouter.java:280) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at com.yingliwang.lite.zhisou.auth.JwtAuth.lambda$authenticate$0(JwtAuth.java:149) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.auth.jwt.impl.JWTAuthProviderImpl.authenticate(JWTAuthProviderImpl.java:150) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at com.yingliwang.lite.zhisou.auth.JwtAuth.authenticate(JwtAuth.java:138) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at com.yingliwang.lite.zhisou.api.ApiRouter.authenticateForce(ApiRouter.java:269) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:227) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:121) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RoutingContextWrapper.next(RoutingContextWrapper.java:154) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RouterImpl.handleContext(RouterImpl.java:256) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:227) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:121) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RoutingContextWrapper.next(RoutingContextWrapper.java:154) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RouterImpl.handleContext(RouterImpl.java:256) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:227) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:121) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:134) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.handler.impl.CorsHandlerImpl.handle(CorsHandlerImpl.java:125) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.handler.impl.CorsHandlerImpl.handle(CorsHandlerImpl.java:38) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:227) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:121) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:134) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:80) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:41) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.core.http.impl.WebSocketRequestHandler.handle(WebSocketRequestHandler.java:50) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.core.http.impl.WebSocketRequestHandler.handle(WebSocketRequestHandler.java:32) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.core.http.impl.HttpServerRequestImpl.handleBegin(HttpServerRequestImpl.java:150) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.core.http.impl.Http1xServerConnection.handleMessage(Http1xServerConnection.java:129) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.core.net.impl.ConnectionBase.handleRead(ConnectionBase.java:390) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:320) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.core.impl.EventLoopContext.execute(EventLoopContext.java:43) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:188) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:174) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.handler.codec.http.websocketx.extensions.WebSocketServerExtensionHandler.channelRead(WebSocketServerExtensionHandler.java:102) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.vertx.core.http.impl.Http1xUpgradeToH2CHandler.channelRead(Http1xUpgradeToH2CHandler.java:98) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:426) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1199) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1243) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:441) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:799) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:421) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:321) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[com.yingliwang.lite.zhisou-1.0.0-bin.jar:?]
        at java.lang.Thread.run(Thread.java:834) ~[?:?]
vietj commented 5 years ago

can you try using instead the reactive-pg-client that supports epoll ? http://reactiverse.io/reactive-pg-client

oshai commented 5 years ago

@RyougiNevermore you're using the old driver (mauricio) which is not supporting epoll. switch to jasync to get epoll support: https://github.com/vert-x3/vertx-mysql-postgresql-client

RyougiNevermore commented 5 years ago

@RyougiNevermore you're using the old driver (mauricio) which is not supporting epoll. switch to jasync to get epoll support: https://github.com/vert-x3/vertx-mysql-postgresql-client

AWESOME! THANKS.