Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-6151

Jolokia error when connecting to container from Hawtio and LDAP

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • jboss-fuse-6.2.1
    • None
    • None
    • % %
    • Hide

      1) Install JBoss Fuse 6.2.1
      2) Create fabric
      3) Create a remote SSH container
      4) Configure a LDAPLoginModule for authentication

      <jaas:config name="karaf" rank="200">
      	<jaas:module className="io.fabric8.jaas.ZookeeperLoginModule"
                       flags="sufficient">
      	</jaas:module>
          <jaas:module className="org.apache.karaf.jaas.modules.ldap.LDAPLoginModule" flags="sufficient">
            debug=true
            initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory
            connection.username=uid=admin,ou=system
            connection.password=secret
            connection.protocol=
            connection.url=ldap://host:port
            user.base.dn=ou=users,ou=system
            user.filter=(uid=%u)
            user.search.subtree=true
            role.base.dn=ou=roles,ou=system
            role.name.attribute=cn
            role.filter=(member=uid=%u)
            role.search.subtree=true
            authentication=simple
          </jaas:module>
      <jaas:config name="karaf" rank="200">
      

      6) Apply 6.2.1 R4 patch to each container
      5) Attempt to open connection to remote via Hawtio

      Expected Behavior:

      Successful connection each time

      Actual Behavior

      Connection fails most of the time and is only successful occasionally

      Show
      1) Install JBoss Fuse 6.2.1 2) Create fabric 3) Create a remote SSH container 4) Configure a LDAPLoginModule for authentication <jaas:config name= "karaf" rank= "200" > <jaas:module className= "io.fabric8.jaas.ZookeeperLoginModule" flags= "sufficient" > </jaas:module> <jaas:module className= "org.apache.karaf.jaas.modules.ldap.LDAPLoginModule" flags= "sufficient" > debug= true initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory connection.username=uid=admin,ou=system connection.password=secret connection.protocol= connection.url=ldap: //host:port user.base.dn=ou=users,ou=system user.filter=(uid=%u) user.search.subtree= true role.base.dn=ou=roles,ou=system role.name.attribute=cn role.filter=(member=uid=%u) role.search.subtree= true authentication=simple </jaas:module> <jaas:config name= "karaf" rank= "200" > 6) Apply 6.2.1 R4 patch to each container 5) Attempt to open connection to remote via Hawtio Expected Behavior: Successful connection each time Actual Behavior Connection fails most of the time and is only successful occasionally

    Description

      Connecting to Fabric containers from Hawtio is unreliable with a LDAPLoginModule configured. The behavior is very unpredictable and the connection is successfull on some attempts and fails on others.

      When the connection does fail the following error is logged in the remote container:

      2016-09-30 15:40:52,288 | WARN  | 828723373-820829 | AbstractHttpConnection           | 96 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.19.v20160209 | /jolokia/?maxDepth=7&maxCollectionSize=500&ignoreErrors=true&canonicalNaming=false
      java.lang.NoClassDefFoundError: io/fabric8/utils/Base64Encoder
      	at io.fabric8.jolokia.JolokiaSecureHttpContext.base64Decode(JolokiaSecureHttpContext.java:185)
      	at io.fabric8.jolokia.JolokiaSecureHttpContext.authenticate(JolokiaSecureHttpContext.java:147)
      	at io.fabric8.jolokia.JolokiaSecureHttpContext.handleSecurity(JolokiaSecureHttpContext.java:74)
      	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:68)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
      	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:240)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:427)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:93)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[96:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
      	at org.eclipse.jetty.server.Server.handle(Server.java:370)[96:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
      	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)[96:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
      	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:984)[96:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
      	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1045)[96:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
      	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)[96:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
      	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:236)[96:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
      	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)[96:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)[96:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)[96:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[96:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[96:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
      	at java.lang.Thread.run(Thread.java:745)[:1.7.0_80]
      

      io.fabric8.utils.Base64Encoder does not appear to being installed into the container by default.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-jsherman Jason Sherman
              rhn-support-jsherman Jason Sherman
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: