1 Reply Latest reply on Nov 27, 2013 9:54 PM by Neven Cvetković

    javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed

    kowshik NS Newbie

      Hi All,

       

      I am trying to get the Datasource information using API and find this error. Running Jboss 7.1.1 Final in domain mode.

       

      I think  I am missing a key configuration here,. Can some body help me please?

       

       

       

      My standalone program is as below.

       

       

      public static List<ModelNode> getDataSources() throws IOException {

       

      final ModelNode request = new ModelNode();

       

      request.get(ClientConstants.OP).set("read-resource");

       

      request.get("recursive").set(true);

       

      request.get(ClientConstants.OP_ADDR).add("subsystem", "datasources");

       

      ModelControllerClient client = null;

       

      client = ModelControllerClient.Factory.create(InetAddress.getByName("192.168.1.3"), 9999);

       

      final ModelNode response = client.execute(new OperationBuilder(request).build());

       

      return response.get(ClientConstants.RESULT).get("data-source").asList();

       

       

       

       

      Exception in thread "main" java.io.IOException: java.net.ConnectException: JBAS012174: Could not connect to remote://kowshik.datagenic.internal:9999. The connection failed

       

      at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:139)

       

      at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:86)

       

      at com.datagenic.test.GetDataResource.getDataSources(GetDataResource.java:32)

       

      at com.datagenic.test.GetDataResource.main(GetDataResource.java:16)

       

      Caused by: java.net.ConnectException: JBAS012174: Could not connect to remote://kowshik.datagenic.internal:9999. The connection failed

       

      at org.jboss.as.protocol.ProtocolChannelClient.connectSync(ProtocolChannelClient.java:153)

       

      at org.jboss.as.protocol.mgmt.ManagementClientChannelStrategy$Establishing.getChannel(ManagementClientChannelStrategy.java:166)

       

      at org.jboss.as.controller.client.impl.RemotingModelControllerClient.getOrCreateChannel(RemotingModelControllerClient.java:137)

       

      at org.jboss.as.controller.client.impl.RemotingModelControllerClient$1.getChannel(RemotingModelControllerClient.java:62)

       

      at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:106)

       

      at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:89)

       

      at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:252)

       

      at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:151)

       

      at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:137)

       

      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.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189)

       

      at org.xnio.ssl.JsseConnectedSslStreamChannel.handleReadable(JsseConnectedSslStreamChannel.java:180)

       

      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 org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:270)

       

      at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:251)

       

      at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:349)

       

      at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:337)

       

      at org.jboss.as.protocol.ProtocolChannelClient.connect(ProtocolChannelClient.java:114)

       

      at org.jboss.as.protocol.ProtocolChannelClient.connectSync(ProtocolChannelClient.java:123)