[jboss-user] [Beginner's Corner] - EJB3 SSL tutorial
Andrew Gronosky
do-not-reply at jboss.com
Thu Mar 25 09:49:52 EDT 2010
Andrew Gronosky [http://community.jboss.org/people/agronosky] replied to the discussion
"EJB3 SSL tutorial"
To view the discussion, visit: http://community.jboss.org/message/533974#533974
--------------------------------------------------------------
Actually, I wrote a bit too soon when I said it worked perfectly. It works when the client and the server are running on the same host, but I run into problems when I run the client from a different host.
On the client side, I updated jndi.properties to point to the JNDI service on the server. I verified that the same jndi.properties do work for non-SSL EJBS (using the stateless session bean example from the tutorials) so it's not a basic connectivity problem.
There's something I'm still missing here... I've tried making my own certs/keystores using the exact host names, but it didn't seem to help.
[java] Exception in thread "main" javax.naming.NamingException: Could not dereference object [Root exception is org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [sslsocket://0.0.0.0:3843/]]
[java] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1504)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:409)
[java] at org.jboss.tutorial.ssl.client.Client.main(Client.java:45)
[java] Caused by: org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [sslsocket://0.0.0.0:3843/]
[java] at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:776)
[java] at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
[java] at org.jboss.remoting.Client.invoke(Client.java:1724)
[java] at org.jboss.remoting.Client.invoke(Client.java:629)
[java] at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
[java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
[java] at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
[java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
[java] at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
[java] at $Proxy0.createProxyBusiness(Unknown Source)
[java] at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
[java] at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
[java] at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
[java] at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
[java] at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
[java] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
[java] ... 4 more
[java] Caused by: java.net.ConnectException: Connection refused
[java] at java.net.PlainSocketImpl.socketConnect(Native Method)
[java] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
[java] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:174)
[java] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
[java] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
[java] at java.net.Socket.connect(Socket.java:542)
[java] at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:570)
[java] at org.jboss.remoting.transport.sslsocket.SSLSocketClientInvoker.connect(SSLSocketClientInvoker.java:243)
[java] at org.jboss.remoting.transport.sslsocket.SSLSocketClientInvoker.createSocket(SSLSocketClientInvoker.java:186)
[java] at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:1089)
[java] at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:762)
[java] at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
[java] at org.jboss.remoting.Client.invoke(Client.java:1724)
[java] at org.jboss.remoting.Client.invoke(Client.java:629)
[java] at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
[java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
[java] at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
[java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
[java] at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
[java] at $Proxy0.createProxyBusiness(Unknown Source)
[java] at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
[java] at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
[java] at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
[java] at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
[java] at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
[java] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:409)
[java] at org.jboss.tutorial.ssl.client.Client.main(Client.java:45)
[java] at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:72)
[java] ... 15 more
[java] Java Result: 1
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/533974#533974]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100325/9c4b29a1/attachment.html
More information about the jboss-user
mailing list