Standalone EJB client fails to connect javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? in JBoss EAP 6
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.1.x
- 6.0.x
Issue
- Our standalone EJB client is failing to invoke an ejb with the following exception:
23:00:32,886 ERROR [org.jboss.remoting.remote.connection] JBREM000200: Remote connection failed: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
23:00:32,899 WARN [org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector] Could not register a EJB receiver for connection to localhost:4447: java.lang.RuntimeException: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:91) [jboss-ejb-client-1.0.23.Final-redhat-1.jar:1.0.23.Final-redhat-1]
at org.jboss.ejb.client.remoting.ConnectionPool.getConnection(ConnectionPool.java:77) [jboss-ejb-client-1.0.23.Final-redhat-1.jar:1.0.23.Final-redhat-1]
...
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
...
Resolution
Set the SSL_ENABLED property to false in your EJB client configuration (jboss-ejb-client.properties, EJBClientConfiguration, or EAP 6.1 ejb-client InitialContext properties)
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
Note: if the application is running in side of JBoss EAP , make sure the application declares a dependency on the org.jboss.xnio module as described in This content is not included.Invalid option 'org.xnio.Options.SSL_ENABLED' in property in client application running in JBoss EAP 6
Root Cause
The client is trying to connect with SSL enabled where as the server is expecting SSL to be disabled
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.