Client authentication failed for mechanism JBOSS-LOCAL-USER:
arun168403 Nov 7, 2013 4:28 AMWhen I'm trying to access the EJB from remote client, I'm getting exception as below:
2013-11-06 19:47:38,044 DEBUG [ApplicationMain] - Looking for jboss-naming-client.properties using classloader com.sun.jnlp.JNLPClassLoader@1394894
2013-11-06 19:47:38,044 DEBUG [ApplicationMain] - jboss.naming.client.endpoint.create.options. has the following options {}
2013-11-06 19:47:38,044 DEBUG [ApplicationMain] - jboss.naming.client.remote.connectionprovider.create.options. has the following options {}
2013-11-06 19:47:38,044 DEBUG [ApplicationMain] - jboss.naming.client.connect.options. has the following options {org.xnio.Options.SASL_POLICY_NOPLAINTEXT=>false}
2013-11-06 19:47:38,059 DEBUG [ndpoint" task-3] - Client authentication failed for mechanism JBOSS-LOCAL-USER: javax.security.sasl.SaslException: Failed to read server challenge [Caused by java.io.FileNotFoundException: D:\Upgrade\OFF2\export\home\application\zic\jboss-as-7.1.1.Final\standalone\tmp\auth\challenge-6842367 (The system cannot find the path specified)]
2013-11-06 19:47:38,062 ERROR [ndpoint" read-1] - JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Cannot get userid/password [Caused by javax.security.auth.callback.UnsupportedCallbackException]
2013-11-06 19:47:38,068 WARN [ApplicationMain] - .<init>Failed to create remoting connection
javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.RuntimeException: javax.security.sasl.SaslException: Cannot get userid/password [Caused by javax.security.auth.callback.UnsupportedCallbackException]]
at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:36)
at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:121)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at com.alcatel.gem.gui.fwk.Commander.<init>(Commander.java:200)
at com.alcatel.gem.gui.fwk.domain.EquipmentCommander.<init>(EquipmentCommander.java:74)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.alcatel.gem.gui.fwk.Model.bindServants(Model.java:280)
at com.alcatel.gem.gui.fwk.Model.<init>(Model.java:81)
at com.alcatel.gem.gui.fwk.Model.init(Model.java:96)
at com.alcatel.gem.gui.common.MainSnapIn.populate(MainSnapIn.java:2165)
at com.alcatel.almap.amc.navtable.AmcClient.populate(AmcClient.java:697)
at com.alcatel.almap.amc.navtable.AmcClient.start(AmcClient.java:238)
at com.alcatel.almap.amc.psi.PrimarySnapIn.start(PrimarySnapIn.java:96)
at com.alcatel.gem.gui.common.MainSnapIn.start(MainSnapIn.java:287)
at com.alcatel.amv.fwk.gui.ClientProxy.loadClient(ClientProxy.java:160)
at com.alcatel.amv.fwk.gui.ClientProxy.initialStart(ClientProxy.java:124)
at com.alcatel.amv.fwk.gui.ClientManager.startInitialApplications(ClientManager.java:410)
at com.alcatel.amv.fwk.gui.ClientManager.start(ClientManager.java:92)
at com.alcatel.amv.fwk.gui.FwkMain.<init>(FwkMain.java:73)
at com.alcatel.amv.fwk.gui.FwkMain.start(FwkMain.java:348)
at com.alcatel.amv.fwk.gui.FwkMain.main(FwkMain.java:261)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: javax.security.sasl.SaslException: Cannot get userid/password [Caused by javax.security.auth.callback.UnsupportedCallbackException]
at org.jboss.naming.remote.protocol.IoFutureHelper.get(IoFutureHelper.java:87)
at org.jboss.naming.remote.client.NamingStoreCache.getRemoteNamingStore(NamingStoreCache.java:56)
at org.jboss.naming.remote.client.InitialContextFactory.getOrCreateCachedNamingStore(InitialContextFactory.java:166)
at org.jboss.naming.remote.client.InitialContextFactory.getOrCreateNamingStore(InitialContextFactory.java:139)
at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:104)
... 34 more
Caused by: javax.security.sasl.SaslException: Cannot get userid/password [Caused by javax.security.auth.callback.UnsupportedCallbackException]
at com.sun.security.sasl.ClientFactoryImpl.getUserInfo(Unknown Source)
at com.sun.security.sasl.ClientFactoryImpl.createSaslClient(Unknown Source)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities$1.run(ClientConnectionOpenListener.java:352)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities$1.run(ClientConnectionOpenListener.java:350)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:350)
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.doConnect(EndpointImpl.java:251)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:349)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:333)
at org.jboss.naming.remote.client.EndpointCache$EndpointWrapper.connect(EndpointCache.java:105)
at org.jboss.naming.remote.client.NamingStoreCache.getRemoteNamingStore(NamingStoreCache.java:55)
... 37 more
Caused by: javax.security.auth.callback.UnsupportedCallbackException
at org.jboss.naming.remote.client.InitialContextFactory$AnonymousCallbackHandler.handle(InitialContextFactory.java:348)
at com.sun.security.sasl.ClientFactoryImpl.getUserInfo(Unknown Source)
at com.sun.security.sasl.ClientFactoryImpl.createSaslClient(Unknown Source)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities$1.run(ClientConnectionOpenListener.java:352)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities$1.run(ClientConnectionOpenListener.java:350)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:350)
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)
and my new InitialCotext() is getting failed. Hence, I'm not able to lookup any EJBs using remote client.
My context properties are as below:
java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory
java.naming.factory.url.pkgs=org.jboss.ejb.client.naming
jboss.naming.client.ejb.context = true
java.naming.security.principal=avaradha
java.naming.security.credentials=xxxx@123
jboss.naming.client.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT=false
java.naming.provider.url=remote://xxx.xxx.xxx.xxx:4447
Properties clientProp = new Properties();
clientProp.put("endpoint.name", "client-endpoint");
clientProp.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");
clientProp.put("remote.connections", "default");
clientProp.put("remote.connection.default.port", "3843");
clientProp.put("remote.connection.default.host", gemServerIp);
clientProp.put("remote.connection.default.username", GemJaasUtils.getInstance().getLoginUsername());
clientProp.put("remote.connection.default.password", GemJaasUtils.getInstance().getLoginPwd());
clientProp.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");
clientProp.put("remote.connection.default.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS", "JBOSS-LOCAL-USER");
clientProp.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", "false");
EJBClientConfiguration cc = new PropertiesBasedEJBClientConfiguration(clientProp);
ContextSelector<EJBClientContext> selector = new ConfigBasedEJBClientContextSelector(cc);
EJBClientContext.setSelector(selector);
Please help.