[keycloak-dev] Communications links failure

Stian Thorgersen sthorger at redhat.com
Mon Oct 19 04:02:10 EDT 2015


Looks like a db issue rather than a Keycloak issue. Is your db actually up
and running correctly?

You should be able to safely ignore KEYCLOAK-1506
<https://issues.jboss.org/browse/KEYCLOAK-1506>.

For the record we don't actually support MariaDB, although we do support
MySQL.

On 19 October 2015 at 09:52, David Ramírez <d.rami85 at gmail.com> wrote:

> Hi guys,
>
> do you know something about this error?
>
> In a first time it was seem all was ok. Apparently keycloak updated
> correctly my new database although this WARN
> https://issues.jboss.org/browse/KEYCLOAK-1506 appeared.
>
> I signed in like admin and I made some operations correctly but when I
> logout and sign in again Keycloak crashed.
>
> I'm working with *MariaDB version:10.0.12*.
>
> This is the error:
>
>
> 09:20:45,808 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper]
> (default task-39) SQL Error: 0, SQLState: 08S01 09:20:45,813 ERROR
> [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-39)
> Communications link failure The last packet successfully received from the
> server was 920.157 milliseconds ago. The last packet sent successfully to
> the server was 0 milliseconds ago. 09:20:45,820 ERROR [io.undertow.request]
> (default task-39) UT005023: Exception handling request to
> /auth/admin/realms: java.lang.RuntimeException: request path:
> /auth/admin/realms at
> org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:73)
> at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
> at
> io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)
> at
> io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
> at
> io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
> at
> org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at
> io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
> at
> io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
> at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at
> io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
> at
> io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
> at
> io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)
> at
> io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72)
> at
> io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
> at
> io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
> at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at
> org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at
> io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282)
> at
> io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261)
> at
> io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80)
> at
> io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199) at
> io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:774) at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745) Caused by:
> org.jboss.resteasy.spi.UnhandledException:
> javax.persistence.PersistenceException:
> org.hibernate.exception.JDBCConnectionException: could not prepare
> statement at
> org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76)
> at
> org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212)
> at
> org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:149)
> at
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:372)
> at
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)
> at
> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)
> at
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
> at
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at
> io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86)
> at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)
> at
> org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:59)
> ... 29 more Caused by: javax.persistence.PersistenceException:
> org.hibernate.exception.JDBCConnectionException: could not prepare
> statement at
> org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)
> at
> org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677)
> at org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:458)
> at
> org.keycloak.models.jpa.JpaRealmProvider.getRealms(JpaRealmProvider.java:71)
> at
> org.keycloak.models.cache.infinispan.DefaultCacheRealmProvider.getRealms(DefaultCacheRealmProvider.java:188)
> at
> org.keycloak.services.resources.admin.RealmsAdminResource.getRealms(RealmsAdminResource.java:87)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483) at
> org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)
> at
> org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)
> at
> org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)
> at
> org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:140)
> at
> org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:103)
> at
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
> ... 37 more Caused by: org.hibernate.exception.JDBCConnectionException:
> could not prepare statement at
> org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:132)
> at
> org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
> at
> org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
> at
> org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:196)
> at
> org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:160)
> at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1885) at
> org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1862) at
> org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1839) at
> org.hibernate.loader.Loader.doQuery(Loader.java:910) at
> org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:355)
> at org.hibernate.loader.Loader.doList(Loader.java:2554) at
> org.hibernate.loader.Loader.doList(Loader.java:2540) at
> org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2370) at
> org.hibernate.loader.Loader.list(Loader.java:2365) at
> org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:497) at
> org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:387)
> at
> org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:236)
> at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1300) at
> org.hibernate.internal.QueryImpl.list(QueryImpl.java:103) at
> org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:573) at
> org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:449) ...
> 50 more Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure The last packet successfully received from the
> server was 920.157 milliseconds ago. The last packet sent successfully to
> the server was 0 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:408) at
> com.mysql.jdbc.Util.handleNewInstance(Util.java:404) at
> com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:983) at
> com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3457) at
> com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3357) at
> com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3797) at
> com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470) at
> com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617) at
> com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2546) at
> com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4873) at
> org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.checkTransaction(BaseWrapperManagedConnection.java:948)
> at
> org.jboss.jca.adapters.jdbc.WrappedConnection.checkTransaction(WrappedConnection.java:1623)
> at
> org.jboss.jca.adapters.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:427)
> at
> org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:162)
> at
> org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:186)
> ... 67 more Caused by: java.io.EOFException: Can not read response from
> server. Expected to read 4 bytes, read 0 bytes before connection was
> unexpectedly lost. at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2949)
> at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3367) ... 78 more
> any ideas? could my database version the problem? thanks!
>
>
>
>
>
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20151019/ccd3f412/attachment-0001.html 


More information about the keycloak-dev mailing list