Remoting over SSL on JBoss AS 7.1.2.FINAL
rohanemmanuel Aug 6, 2012 5:05 AMI am tryin to access an EJB deployed on the AS 7.1.2.FINAL over SSL.
i hav created an keystore and exported the public key on to a certificate on the server side and also created the keystore and exported the public key on a certificate on the client side
i have also imported the client public key on the server's keystore and the server public key on the client's keystore
i have defined an new realm in host.xml and a new security-domain in domain.xml
i have even set SSL_ENABLED to true and SSL_STARTTLS=true
but still i'm not able to access the EJB , i get the followin EXCEPTION
[java] 0010: 38 01 10 4A 42Aug 6, 2012 1:21:31 PM org.jboss.remoting3.remot
e.RemoteConnection handleException
[java] ERROR: JBREM000200: Remote connection failed: javax.security.sasl.Sa
slException: Authentication failed: all available authentication mechanisms fail
ed
[java] javax.naming.NamingException: Failed to create remoting connection [
Root exception is java.lang.RuntimeException: javax.security.sasl.SaslException:
Authentication failed: all available authentication mechanisms failed]
[java] at org.jboss.naming.remote.client.ClientUtil.namingException(Cli
entUtil.java:51)
[java] at org.jboss.naming.remote.client.InitialContextFactory.getIniti
alContext(InitialContextFactory.java:151)
[java] at javax.naming.spi.NamingManager.getInitialContext(NamingManage
r.java:667)
[java] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.
java:288)
[java] at javax.naming.InitialContext.init(InitialContext.java:223)
[java] at javax.naming.InitialContext 4F 53 53 2D 4C 4F 43 41 4C 2D 5
5 8..JBOSS-LOCAL-U
[java] 0020: 53 45 52 01 05 50 4C 41 49 4E 0F 7E AB 30 2A DA SER..PLAIN.
..0*.
[java] 0030: 7C 43 55 81 56 06 1C DE 4B D1 .CU.V...K.
[java] Remoting "config-based-naming-client-endpoint" read-1, called closeI
nbound()
[java] Remoting "config-based-naming-client-endpoint" read-1, fatal error:
80: Inbound closed before receiving pee.<init>(InitialContext.java:197)
[java] at client.TestRemoteClientA.main(Unknown Source)
[java] Caused by: java.lang.RuntimeException: javax.security.sasl.SaslExcep
tion: Authentication failed: all available authentication mechanisms failed
[java] at org.jboss.naming.remote.protocol.IoFutureHelper.get(IoFutureH
elper.java:87)
[java] at org.jboss.naming.remote.client.NamingStoreCache.getRemoteNami
ngStore(NamingStoreCache.java:68)
[java] at org.jboss.naming.remote.client.InitialContextFactory.getOrCre
ateCachedNamingStore(InitialContextFactory.java:196)
[java] at org.jboss.naming.remote.client.InitialContextFactory.getOrCre
ateNamingStore(InitialContextFactory.java:169r's close_notify: possible truncati
on attack?
[java] javax.net.ssl.SSLException: Inbound closed before receiving peer's c
lose_notify: p)
[java] at org.jboss.naming.remote.client.InitialContextFactory.getIniti
alContext(InitialContextFactory.java:134)
[java] ... 5 more
[java] Causossible truncation attack?
[java] %% Invalidated: [Session-1, SSL_RSA_WITH_RC4_128_MD5]
[java] Remoting "config-based-naming-client-endpoined by: javax.security.sa
sl.SaslException: Authentication failed: all available authentication mechanisms
failed
[java] at org.jboss.rt" read-1, SEND TLSv1 ALERT: fatal, description =
internal_error
[java] Padded plaintext before ENCRYPTION: len = 18
[java] 0000: 02 50 69 EA B8 D2 15 F6 76 0B E8 19 6F 3A 54 CF .Pi.....v..
.o:T.
[java] 0010: 3A 77 :w
[java] Remoting "config-based-naming-client-endpoint" read-1, WRITE: TLSv1
Alert, length = 18
[java] emoting3.remote.ClientConnectionOpenListener$Capabilities.handleEven
t(ClientConnectionOpenListener.java:315)
[java] at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capab
ilities.handleEvent(ClientConnectionOpenListener.java:214)
[java] at org.xnio.ChannelListeners.invokeChannelListener(ChannelListen
ers.java:72)
[java] at org.xnio.channels.TranslatingSuspendableChannel.handleReadabl
e(TranslatingSuspendableChannel.java:189)
[java] at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent
(TranslatingSuspendableChannel.java:103)
[java] at org.xnio.ChannelListeners.invokeChannelListener(ChannelListen
ers.java:72)
[java] at org.xnio.channels.TranslatingSuspendableChannel.handleReadabl
e(TranslatingSuspendableChannel.java:189)
[java] at org.xnio.ssl.JsseConnectedSslStreamChannel.handleReadable(Jss
eConnectedSslStreamChannel.java:180)
[java] at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent
(TranslatingSuspendableChannel.java:103)
[java] at org.xnio.ChannelListeners.invokeChannelListener(ChannelListen
ers.java:72)
[java] at org.xnio.nio.NioHandle.run(NioHandle.java:90)
[java] at org.xnio.nio.WorkerThread.run(WorkerThread.java:184)
[java] at ...asynchronous invocation...(Unknown Source)
[java] at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:
270)
[java] at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:
251)
[java] at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:34
9)
[java] at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:33
3)
[java] at org.jboss.naming.remote.client.EndpointCache$EndpointWrapper.
connect(EndpointCache.java:105)
[java] at org.jboss.naming.remote.client.NamingStoreCache.getRemoteNami
ngStore(NamingStoreCache.java:67)
[java] ... 8 more
[java] Exception in thread "main" java.lang.NullPointerException
[java] at client.TestRemoteClientA.main(Unknown Source)
[java] Java Result: 1
please help.