You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by renz <re...@areasante.com> on 2012/11/06 17:49:47 UTC
Unable to use EJB Over HTTPS using APR
Hello,
I'm having trouble using TomEE++ EJB over HTTPS and APR.
First I've tried EJB over HTTPS without APR and everthing works fine.
Then I've changed my server.xml to use APR, and now remote EJB call over
HTTPS doesn't work.
Here is my client's log :
/6 nov. 2012 17:47:41 org.apache.openejb.client.EventLogger log
INFO:
RemoteInitialContextCreated{providerUri=https://localhost:8443/tomee/ejb}
6 nov. 2012 17:47:42 org.apache.openejb.client.EventLogger log
ATTENTION: ConnectionFailed{uri=https://localhost:8443/tomee/ejb
cause=java.net.SocketException: Connection reset}
6 nov. 2012 17:47:42 org.apache.openejb.client.EventLogger log
ATTENTION:
BootstrappingConnection{provider=https://localhost:8443/tomee/ejb}
6 nov. 2012 17:47:42 org.apache.openejb.client.EventLogger log
ATTENTION: ConnectionFailed{uri=https://localhost:8443/tomee/ejb
cause=java.net.SocketException: Connection reset}
6 nov. 2012 17:47:42 org.apache.openejb.client.EventLogger log
GRAVE: ConnectionStrategyFailed{strategy=StickyConnectionStrategy,
cluster=org.apache.openejb.client.ClusterMetaData@1f436f5,
server=https://localhost:8443/tomee/ejb}
javax.naming.NamingException: Cannot lookup '/HelloworldBeanRemote'. [Root
exception is java.rmi.RemoteException: Unable to connect; nested exception
is:
java.net.SocketException: Connection reset]
at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:236)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.areasante.client.Client.main(Client.java:34)
Caused by: java.rmi.RemoteException: Unable to connect; nested exception is:
java.net.SocketException: Connection reset
at org.apache.openejb.client.Client.processRequest(Client.java:139)
at org.apache.openejb.client.Client.request(Client.java:116)
at org.apache.openejb.client.JNDIContext.request(JNDIContext.java:83)
at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:230)
... 2 more
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:830)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1170)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1197)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1181)
at
sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:434)
at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:133)
at
org.apache.openejb.client.HttpConnectionFactory$HttpConnection.<init>(HttpConnectionFactory.java:67)
at
org.apache.openejb.client.HttpConnectionFactory.getConnection(HttpConnectionFactory.java:35)
at
org.apache.openejb.client.ConnectionManager.getConnection(ConnectionManager.java:101)
at
org.apache.openejb.client.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:87)
at
org.apache.openejb.client.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:68)
at
org.apache.openejb.client.ConnectionManager.getConnection(ConnectionManager.java:79)
at org.apache.openejb.client.Client.processRequest(Client.java:137)
... 5 more/
If I use the unsecure port, it works.
I've also checked my HTTPS configuration, connecting to
https://localhost:8443/tomee/ with FireFox and it also works fine.
Is there something to do on client or server side to use EJB overs HTTPS
with APR?
Thanks for your help.
--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-use-EJB-Over-HTTPS-using-APR-tp4658406.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Unable to use EJB Over HTTPS using APR
Posted by Romain Manni-Bucau <rm...@gmail.com>.
you see icon on the right? there is a little pen, just click on it and you
should be able to update the page. Then your modifications will be send to
us and we'll be able to push them to the official website :)
*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*
2012/11/8 renz <re...@areasante.com>
> Why not! How?
>
> I've seen a mistake in it : http://tomee.apache.org/ejb-over-ssl.html
> <http://tomee.apache.org/ejb-over-ssl.html>
>
> /p.put("java.naming.provider.url", "http://127.0.0.1:8080/tomee/ejb");/
>
> should be replaced by
>
> /p.put("java.naming.provider.url", "http*s*://127.0.0.1:
> *8443*/tomee/ejb");/
>
>
>
> Romain Manni-Bucau wrote
> > thanks for sharing it :)
> >
> > do you want to contribute it to the doc?
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > *Blog:
> > **
> http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> ;
> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > *Github: https://github.com/rmannibucau*
>
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Unable-to-use-EJB-Over-HTTPS-using-APR-tp4658406p4658479.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: Unable to use EJB Over HTTPS using APR
Posted by renz <re...@areasante.com>.
Why not! How?
I've seen a mistake in it : http://tomee.apache.org/ejb-over-ssl.html
<http://tomee.apache.org/ejb-over-ssl.html>
/p.put("java.naming.provider.url", "http://127.0.0.1:8080/tomee/ejb");/
should be replaced by
/p.put("java.naming.provider.url", "http*s*://127.0.0.1:*8443*/tomee/ejb");/
Romain Manni-Bucau wrote
> thanks for sharing it :)
>
> do you want to contribute it to the doc?
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog:
> **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-use-EJB-Over-HTTPS-using-APR-tp4658406p4658479.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Unable to use EJB Over HTTPS using APR
Posted by Romain Manni-Bucau <rm...@gmail.com>.
thanks for sharing it :)
do you want to contribute it to the doc?
*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*
2012/11/8 renz <re...@areasante.com>
> I've found the problem!
>
> The HTTPS connector was configured with /SSLProtocol="TLSv1"/, so I have to
> set the 'https.protocols' system property on the client side with :
> - VM arguments : -Dhttps.protocols="TLSv1"
> or
> - programmatically : System.setProperty("https.protocols", "TLSv1") ;
>
> Thanks
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Unable-to-use-EJB-Over-HTTPS-using-APR-tp4658406p4658474.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: Unable to use EJB Over HTTPS using APR
Posted by renz <re...@areasante.com>.
I've found the problem!
The HTTPS connector was configured with /SSLProtocol="TLSv1"/, so I have to
set the 'https.protocols' system property on the client side with :
- VM arguments : -Dhttps.protocols="TLSv1"
or
- programmatically : System.setProperty("https.protocols", "TLSv1") ;
Thanks
--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-use-EJB-Over-HTTPS-using-APR-tp4658406p4658474.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Unable to use EJB Over HTTPS using APR
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Just try to set fine level on OpenEJB logger on logging.properties i guess
Le 6 nov. 2012 18:50, "renz" <re...@areasante.com> a écrit :
> Ok.
>
> I will test on another computer with a new config.
> How can I activate logging on server side, to check if something fails?
>
> Thanks
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Unable-to-use-EJB-Over-HTTPS-using-APR-tp4658406p4658408.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: Unable to use EJB Over HTTPS using APR
Posted by renz <re...@areasante.com>.
Ok.
I will test on another computer with a new config.
How can I activate logging on server side, to check if something fails?
Thanks
--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-use-EJB-Over-HTTPS-using-APR-tp4658406p4658408.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Unable to use EJB Over HTTPS using APR
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,
ejbd uses tomcat servlet transport so it should still work
*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*
2012/11/6 renz <re...@areasante.com>
> Hello,
>
> I'm having trouble using TomEE++ EJB over HTTPS and APR.
>
> First I've tried EJB over HTTPS without APR and everthing works fine.
> Then I've changed my server.xml to use APR, and now remote EJB call over
> HTTPS doesn't work.
>
> Here is my client's log :
>
> /6 nov. 2012 17:47:41 org.apache.openejb.client.EventLogger log
> INFO:
> RemoteInitialContextCreated{providerUri=https://localhost:8443/tomee/ejb}
> 6 nov. 2012 17:47:42 org.apache.openejb.client.EventLogger log
> ATTENTION: ConnectionFailed{uri=https://localhost:8443/tomee/ejb
> cause=java.net.SocketException: Connection reset}
> 6 nov. 2012 17:47:42 org.apache.openejb.client.EventLogger log
> ATTENTION:
> BootstrappingConnection{provider=https://localhost:8443/tomee/ejb}
> 6 nov. 2012 17:47:42 org.apache.openejb.client.EventLogger log
> ATTENTION: ConnectionFailed{uri=https://localhost:8443/tomee/ejb
> cause=java.net.SocketException: Connection reset}
> 6 nov. 2012 17:47:42 org.apache.openejb.client.EventLogger log
> GRAVE: ConnectionStrategyFailed{strategy=StickyConnectionStrategy,
> cluster=org.apache.openejb.client.ClusterMetaData@1f436f5,
> server=https://localhost:8443/tomee/ejb}
> javax.naming.NamingException: Cannot lookup '/HelloworldBeanRemote'. [Root
> exception is java.rmi.RemoteException: Unable to connect; nested exception
> is:
> java.net.SocketException: Connection reset]
> at
> org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:236)
> at javax.naming.InitialContext.lookup(InitialContext.java:392)
> at com.areasante.client.Client.main(Client.java:34)
> Caused by: java.rmi.RemoteException: Unable to connect; nested exception
> is:
> java.net.SocketException: Connection reset
> at org.apache.openejb.client.Client.processRequest(Client.java:139)
> at org.apache.openejb.client.Client.request(Client.java:116)
> at
> org.apache.openejb.client.JNDIContext.request(JNDIContext.java:83)
> at
> org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:230)
> ... 2 more
> Caused by: java.net.SocketException: Connection reset
> at java.net.SocketInputStream.read(SocketInputStream.java:168)
> at
> com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
> at
> com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
> at
>
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:830)
> at
>
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1170)
> at
>
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1197)
> at
>
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1181)
> at
> sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:434)
> at
>
> sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
> at
>
> sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:133)
> at
>
> org.apache.openejb.client.HttpConnectionFactory$HttpConnection.<init>(HttpConnectionFactory.java:67)
> at
>
> org.apache.openejb.client.HttpConnectionFactory.getConnection(HttpConnectionFactory.java:35)
> at
>
> org.apache.openejb.client.ConnectionManager.getConnection(ConnectionManager.java:101)
> at
>
> org.apache.openejb.client.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:87)
> at
>
> org.apache.openejb.client.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:68)
> at
>
> org.apache.openejb.client.ConnectionManager.getConnection(ConnectionManager.java:79)
> at org.apache.openejb.client.Client.processRequest(Client.java:137)
> ... 5 more/
>
> If I use the unsecure port, it works.
> I've also checked my HTTPS configuration, connecting to
> https://localhost:8443/tomee/ with FireFox and it also works fine.
> Is there something to do on client or server side to use EJB overs HTTPS
> with APR?
>
> Thanks for your help.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Unable-to-use-EJB-Over-HTTPS-using-APR-tp4658406.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>