JGROUPS Transport remoting start error using Infinispan

喜夏-厌秋 提交于 2019-12-12 03:37:00

问题


In my use case I developed N webapplications, each of which uses Infinispan shared cache and JGroups as transport layer.

When a webapplication starts up, it creates a cachemanager object and registers it into the JNDI of the application server. The next started webcapplication check the JNDI and if it finds a cachemanager already binded by another webapplication it uses it with a simple lookup calls.

This way the first webapplication instantiating the distributed cache manager should be the first actor which makes the jgroups channel to start, i.e. the coordinator.

The issue happens when:

  1. I need to update all the webapplications by a hot deploy using new wars.

  2. I undeploy all the war already running on the application server.

  3. I deploy the new wars

  4. All the wars are successfully deployed

  5. 1 millsecond after the deploy, the load-balancer forwards all incoming client requests to the new available webapplication services

  6. the new invoked webapplication doesn't find any cache manager binded inside the JNDI so it creates a new one. This way it creates the new channel.

  7. At this point i get this exception:

    15:36:41,742 INFO  [stdout] (AsyncAppender-asyncConsole) org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    15:36:41,742 INFO  [stdout] (AsyncAppender-asyncConsole)        at org.infinispan.factories.GlobalComponentRegistry.start(GlobalComponentRegistry.java:248) ~[infinispan-core-7.2.3.Final.jar!/:7.2.3.Final]
    15:36:41,742 INFO  [stdout] (AsyncAppender-asyncConsole)        at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:588) ~[infinispan-core-7.2.3.Final.jar!/:7.2.3.Final]
     15:36:41,743 INFO  [stdout] (AsyncAppender-asyncConsole)        at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:554) ~[infinispan-core-7.2.3.Final.jar!/:7.2.3.Final]
     15:36:41,743 INFO  [stdout] (AsyncAppender-asyncConsole)        at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:424) ~[infinispan-core-7.2.3.Final.jar!/:7.2.3.Final]
     15:36:41,743 INFO  [stdout] (AsyncAppender-asyncConsole)        at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:397) ~[infinispan-core-7.2.3.Final.jar!/:7.2.3.Final]
    15:36:41,743 INFO  [stdout] (AsyncAppender-asyncConsole)        at com.society.core.session.SessionManager.<init>(SessionManager.java:162) [core-1.4.0-SNAPSHOT.jar:?]
    15:36:41,744 INFO  [stdout] (AsyncAppender-asyncConsole)        at com.society.core.session.SessionManager.<init>(SessionManager.java:184) [core-1.4.0-SNAPSHOT.jar:?]
    15:36:41,744 INFO  [stdout] (AsyncAppender-asyncConsole)        at com.society.core.auth.filter.KasPrincipalFilter.validateSession(KasPrincipalFilter.java:101) [core-1.4.0-SNAPSHOT.jar:?]
    15:36:41,744 INFO  [stdout] (AsyncAppender-asyncConsole)        at com.society.core.auth.filter.KasPrincipalFilter.doFilter(KasPrincipalFilter.java:54) [core-1.4.0-SNAPSHOT.jar:?]
    15:36:41,745 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,745 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,745 INFO  [stdout] (AsyncAppender-asyncConsole)        at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71) [log4j-web-2.6.jar:2.6]
    15:36:41,745 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,745 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,746 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (default task-7) ISPN000078: Starting JGroups channel ISPN
    15:36:41,747 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,748 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,748 WARNING [org.jgroups.jmx.JmxConfigurator] (default task-7) unregistering already registered MBean: org.infinispan2:type=protocol,cluster="ISPN",protocol=FRAG2
    15:36:41,751 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,752 INFO  [stdout] (AsyncAppender-asyncConsole)        at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) [wildfly-undertow-9.0.1.Final.jar!/:9.0.1.Final]
    15:36:41,753 WARNING [org.jgroups.jmx.JmxConfigurator] (default task-7) unregistering already registered MBean: org.infinispan2:type=protocol,cluster="ISPN",protocol=MFC
    15:36:41,764 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,766 INFO  [stdout] (AsyncAppender-asyncConsole)        at org.keycloak.adapters.undertow.UndertowAuthenticatedActionsHandler.handleRequest(UndertowAuthenticatedActionsHandler.java:66) [keycloak-undertow-adapter-1.7.0.Final.jar!/:1.7.0.Final]
    15:36:41,766 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,768 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,768 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33) [undertow-core-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,768 WARNING [org.jgroups.jmx.JmxConfigurator] (default task-7) unregistering already registered MBean: org.infinispan2:type=protocol,cluster="ISPN",protocol=UFC
    15:36:41,777 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,778 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51) [undertow-core-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,780 WARNING [org.jgroups.jmx.JmxConfigurator] (default task-7) unregistering already registered MBean: org.infinispan2:type=protocol,cluster="ISPN",protocol=GMS
    15:36:41,781 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,781 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,785 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56)[undertow-servlet-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,785 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,786 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72) [undertow-servlet-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,788 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (default task-8) ISPN000079: Channel ISPN local address is ws-7-aor-1951, physical addresses are [10.17.36.176:55992]
    15:36:41,786 WARNING [org.jgroups.jmx.JmxConfigurator] (default task-7) unregistering already registered MBean: org.infinispan2:type=protocol,cluster="ISPN",protocol=STABLE
    15:36:41,794 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) [undertow-core-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,798 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,799 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,801 INFO  [stdout] (AsyncAppender-asyncConsole)        at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) [wildfly-undertow-9.0.1.Final.jar!/:9.0.1.Final]
    15:36:41,802 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,803 INFO  [stdout] (AsyncAppender-asyncConsole)        at org.keycloak.adapters.undertow.ServletPreAuthActionsHandler.handleRequest(ServletPreAuthActionsHandler.java:69) [keycloak-undertow-adapter-1.7.0.Final.jar!/:1.7.0.Final]
    15:36:41,805 WARNING [org.jgroups.jmx.JmxConfigurator] (default task-7) unregistering already registered MBean: org.infinispan2:type=protocol,cluster="ISPN",protocol=UNICAST3
    15:36:41,813 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,815 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282) [undertow-servlet-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,821 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261) [undertow-servlet-1.2.9.Final.jar!/:1.2.9.Final]
    
    15:36:41,824 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80)[undertow-servlet-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,826 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172) [undertow-servlet-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,828 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199) [undertow-core-1.2.9.Final.jar!/:1.2.9.Final]
    15:36:41,829 INFO  [stdout] (AsyncAppender-asyncConsole)        at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:774) [undertow-core-1.2.9.Final.jar!/:1.2.9.Final]
    
    15:36:41,829 INFO  [stdout] (AsyncAppender-asyncConsole)        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_51]
    15:36:41,829 INFO  [stdout] (AsyncAppender-asyncConsole)        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_51]
    15:36:41,830 INFO  [stdout] (AsyncAppender-asyncConsole)        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51]
    15:36:41,830 INFO  [stdout] (AsyncAppender-asyncConsole) Caused by: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
    15:36:41,838 INFO  [stdout] (AsyncAppender-asyncConsole)        at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:171) ~[infinispan-commons-7.2.3.Final.jar!/:7.2.3.Final]
    15:36:41,839 INFO  [stdout] (AsyncAppender-asyncConsole)        at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:869) ~[infinispan-core-7.2.3.Final.jar!/:7.2.3.Final]
    15:36:41,840 INFO  [stdout] (AsyncAppender-asyncConsole)        at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:638) ~[infinispan-core-7.2.3.Final.jar!/:7.2.3.Final]
    15:36:41,841 INFO  [stdout] (AsyncAppender-asyncConsole)        at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:627) ~[infinispan-core-7.2.3.Final.jar!/:7.2.3.Final]
    15:36:41,840 WARNING [org.jgroups.jmx.JmxConfigurator] (default task-7) unregistering already registered MBean: org.infinispan2:type=protocol,cluster="ISPN",protocol=NAKACK2
    15:36:41,842 INFO  [stdout] (AsyncAppender-asyncConsole)        at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:530) ~[infinispan-core-7.2.3.Final.jar!/:7.2.3.Final]
    

来源:https://stackoverflow.com/questions/38700634/jgroups-transport-remoting-start-error-using-infinispan

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!