3 Replies Latest reply on Nov 8, 2012 10:32 AM by caraldel

    Why does every remote ejb client connection log SaslException

    jkreska

      Each time my remote client connects to an ejb running in 7.1.2.Final (standalone-ha) I see the following exceptions.  The interesting thing is that the ejb call works fine.

       

      May 23, 2012 8:33:49 AM org.jboss.remoting3.remote.RemoteConnection handleException
      ERROR: JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
      May 23, 2012 8:33:49 AM org.jboss.ejb.client.remoting.RemotingConnectionClusterNodeManager getEJBReceiver
      INFO: Could not create a connection for cluster node ClusterNode{clusterName='ejb', nodeName='jb7-7', clientMappings=[ClientMapping{sourceNetworkAddress=/0:0:0:0:0:0:0:0, sourceNetworkMaskBits=0, destinationAddress='192.168.12.84', destinationPort=4447}], resolvedDestination=[Destination address=192.168.12.84, destination port=4447]} in cluster ejb
      java.lang.RuntimeException: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
          at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:91)
          at org.jboss.ejb.client.remoting.RemotingConnectionClusterNodeManager.getEJBReceiver(RemotingConnectionClusterNodeManager.java:115)
          at org.jboss.ejb.client.ClusterContext.getEJBReceiverContext(ClusterContext.java:167)
          at org.jboss.ejb.client.ClusterContext.getEJBReceiverContext(ClusterContext.java:93)
          at org.jboss.ejb.client.EJBClientContext.getClusterEJBReceiverContext(EJBClientContext.java:699)
          at org.jboss.ejb.client.EJBClientContext.getClusterEJBReceiverContext(EJBClientContext.java:691)
          at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:108)
          at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)
          at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)
          at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)
          at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)
          at $Proxy0.getCityName(Unknown Source)
          at com.farecompare.jboss7example.client.ClientLocation.main(ClientLocation.java:42)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:601)
          at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
      Caused by: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
          at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:365)
          at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:214)
          at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
          at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189)
          at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103)
          at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
          at org.xnio.nio.NioHandle.run(NioHandle.java:90)
          at org.xnio.nio.WorkerThread.run(WorkerThread.java:184)
          at ...asynchronous invocation...(Unknown Source)
          at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:270)
          at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:386)
          at org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:151)
          at org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:132)
          at org.jboss.ejb.client.remoting.RemotingConnectionClusterNodeManager.getEJBReceiver(RemotingConnectionClusterNodeManager.java:113)
          ... 16 more
      
        • 1. Re: Why does every remote ejb client connection log SaslException
          jaikiran

          It's because your client is interacting with a clustered application which is sending back a cluster topology containing the cluster nodes. The EJB client API tries to auto connect to some of those nodes so that those nodes can be utilized during the EJB invocations. By default, AS7 instances are secured. So if you haven't configured the appropriate connection properties for cluster(s) in jboss-ejb-client.properties then the EJB client API won't be able to auto connect to those nodes. That's when you see these messages. See this thread for more details about the cluster configurations in your properties file https://community.jboss.org/message/735607#735607

          • 2. Re: Why does every remote ejb client connection log SaslException
            kebishishabi

            hi  I meet the same problem, is something wrong with my config? or is it a bug?

            • 3. Re: Why does every remote ejb client connection log SaslException
              caraldel

              I have the same problem and my jboss-ejb-client.properties is like:

               

              endpoint.name=client-endpoint

              remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false

              remote.connections=default

              remote.connection.default.host=XXX.XXX.XXX.XXX

              remote.connection.default.port=4447

              remote.connection.default.username=ejb

              remote.connection.default.password=test

              remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

              remote.clusters=ejb

              remote.cluster.ejb.connect.options.org.xnio.Options.SSL_ENABLED=false

              remote.cluster.ejb.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

               

              I have this file in my client local appliacation (Junit Tests) and I'm trying to connecto to remote EJBs in other cluster standalone machines. Can you help me ?

               

              Thanks !