Simple CFHTTP fails


#1

HI,

I have a very simple CFHTTP that fails with an exception in Lucee 5.2.4.37.

<cfhttp url = "http://www.my other domain name.de/remoteip.cfm">

Exception is:

Could not initialize class lucee.runtime.net.http.sni.SSLConnectionSocketFactoryImpl
 	at lucee.runtime.tag.Http.ssl(Http.java:1365)
 	at lucee.runtime.tag.Http._doEndTag(Http.java:682)
 	at lucee.runtime.tag.Http.doEndTag(Http.java:665)
 	at ddns2_cfm$cf.call(/ddns2.cfm:3)
 	at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:939)
 	at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:833)
 	at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:63)
 	at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:44)
 	at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2405)
 	at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2395)
 	at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2363)
 	at lucee.runtime.engine.Request.exe(Request.java:46)
 	at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1084)
 	at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1032)
 	at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:102)
 	at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:97)
 	at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109)
 	at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156)
 	at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95)
 	at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:290)
 	at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:838)
 	at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1353)
 	at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1309)
 	at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1293)
 	at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1201)
 	at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:997)
 	at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117)
 	at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93)
 	at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169)
 	at com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61)
 	at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
 	at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)
 Caused by: java.lang.NoClassDefFoundError: Could not initialize class lucee.runtime.net.http.sni.SSLConnectionSocketFactoryImpl
 	... 33 more

I suppose the environment is a bit special and might cause this issue.
Lucee is running as a servlet in Caucho Resin, on OpenJDK 8, on a Raspberry Pi.

Is there anything that is known, to cause such issues?

Thanks in advance
Michael


#2

The log says you are going to a https:// in ddns2.cfm?


#3

This seems like a certificate or cipher issue.

When you deal with https I found that Oracle JRE is much more “reliable” than the OpenJDK.


#4

Look like OpenJDK doesn’t support some ciphers and you need to add Bouncy Castle.


#5

As stated in the source code snippet, I’m not using https.
That’s why I don’t understand the error.


#6

Could the site be redirecting to https?


#7

No.
The code ran smoothly for years on a Raspberry Pi with older OpenJDK, Caucho Resin 3 and older Railo.
I’ll try a downgrade to Lucee 4.5


#8

Hmm… Looks like _doEndTag calls ssl() function regardless and I looks like it was backported to 4.5, Was Resin configured without openssl?


#9

Thanks Robert. OpenSSL was the correct hint.
In fact, I did not compile Resin with OpenSSL. Did it again correctly, now it runs.