I'm struggling to get a cfhttp call to work using ...
# box-products
m
I'm struggling to get a cfhttp call to work using my local instance of ACF 2021 update 5 that runs through Commandbox. Keep getting "I/O Exception: Received close_notify during handshake". After trying all kinds of things like bolthttp, etc. I committed the code and moved it to our dev server and it ran perfectly using the cfhttp call. The dev server is on a standard install of ACF 2021 Ent update 5 (not commandbox). There can't be many differences, but the one thing I noticed is the official install uses Oracles java (on 11.0.1) and commandbox uses openjdk (11.0.18). That's my only guess right now. Is there anyway to install the Oracle version of java in commandbox to test? On https://commandbox.ortusbooks.com/package-management/code-endpoints/java#installation-id it seems to only support openjdk. I tried to mess around with the box.json file under /serverJREs, but it didn't like it.
My commandbox server was initially on openjdk12, but I downgraded to openjdk11 thinking it would match the dev server better, but didn't make a difference.
b
@mike42780 The JRE is likely the issue, though it's less likely related to the actual version of java and more the truststore that's bundled
Received close_notify during handshake"
is a super duper generic error which could mean 1 million things
You need to get the full java stack trace to see the real error
r
A quick Google search of the error indicates it's a SSL/TLS issue between your local machine and the endpoint. FYI, I believe the newer version of Java 11 requires TLS 1.3. There are ways to force lower versions.
b
well yes, it's an "SSL issue" but that doesn't tell us anything
I would refrain from making assumptions about what it might be
There's a million possible things. step 1 is to get the full real error and then we know the issue
dump out the entire cfhttp response and if the original error is not in there, set throw on error to true and see if the stack shows more
Once we get the real error, we'll know if it's related to TLS versions, valid ciphers, cert trust chains, etc, etc
m
Right, I realize it could mean a ton of different things. But I just tested the Oracle version of Java and it didn't help. So that must not be it. I know TLS 1.2 works when making the web service call.
b
@mike42780 Get the error and go from there. Otherwise, you'll test things for the next 2 weeks and never figure it out 🙂
r
FYI, Java 11.0.11 is the version that disabled TLS 1.1 and TLS 1.2 by default so unless you changed something it is trying to use TLS 1.3. However, just another guess without the full stack trace.
m
The main error I see with throwonerror now is "coldfusion.tagext.net.HttpTag$HttpConnectionFailureException: Connection Failure: Status code unavailable"
Going to turn on trace on the commandbox server and see what it shows
b
Trace prolly won't show you anything. The trace flag in a CommandBox server has no bearing on how the CF engine behaves. These are two different things
Do you have a stack trace?
if so, please post it here
I think there's likely info on your screen you're not seeing
Also, keep in mind your app's error handler may be discarding information. try/catch the exception and dump it fully
m
See this from commandbox. i'll try the try/catch next [DEBUG] io.undertow.request: Timing out idle connection from /127.0.0.1:63332 [TRACE] io.undertow.request.io: Exception closing read side of SSL channel javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify at sun.security.ssl.SSLEngineImpl.closeInbound(Unknown Source) ~[?:?] at io.undertow.protocols.ssl.SslConduit.notifyReadClosed(SslConduit.java:636) [runwar-4.7.4.jar:4.7.4] at io.undertow.protocols.ssl.SslConduit.closed(SslConduit.java:1064) [runwar-4.7.4.jar:4.7.4] at io.undertow.protocols.ssl.SslConduit.close(SslConduit.java:1196) [runwar-4.7.4.jar:4.7.4] at io.undertow.protocols.ssl.UndertowSslConnection.closeAction(UndertowSslConnection.java:163) [runwar-4.7.4.jar:4.7.4] at org.xnio.Connection.close(Connection.java:132) [runwar-4.7.4.jar:4.7.4] at io.undertow.server.AbstractServerConnection.close(AbstractServerConnection.java:159) [runwar-4.7.4.jar:4.7.4] at org.xnio.IoUtils.safeClose(IoUtils.java:152) [runwar-4.7.4.jar:4.7.4] at io.undertow.server.protocol.ParseTimeoutUpdater$1.run(ParseTimeoutUpdater.java:63) [runwar-4.7.4.jar:4.7.4] at io.undertow.server.protocol.ParseTimeoutUpdater.run(ParseTimeoutUpdater.java:153) [runwar-4.7.4.jar:4.7.4] at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:612) [runwar-4.7.4.jar:4.7.4] at org.xnio.nio.WorkerThread.run(WorkerThread.java:479) [runwar-4.7.4.jar:4.7.4]
stack trace from page coldfusion.tagext.net.HttpTag$HttpConnectionFailureException: Connection Failure: Status code unavailable at coldfusion.tagext.net.HttpTag.connHelper(HttpTag.java:1243) at coldfusion.tagext.net.HttpTag.doEndTag(HttpTag.java:1306) at cfminuet2ecfc1894379831$funcGETOAUTHTOKEN.runFunction(C\[removed].cfc88) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:623) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:516) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:463) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:438) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:310) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:975) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:696) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:503) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4254) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4217) at cfrun2ecfm1314003580.runPage(C\Users\[removed]\run.cfm3) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:257) at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:749) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:578) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:613) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:162) at coldfusion.filter.IpFilter.invoke(IpFilter.java:45) at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:97) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.CfmServlet.service(CfmServlet.java:231) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311) at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter.doFilter(RegexPathInfoFilter.java:47) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:405) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68) at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117) at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:275) at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:79) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:134) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:131) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:255) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:79) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:100) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:387) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:852) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2019) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1558) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1449) at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1280) at java.base/java.lang.Thread.run(Unknown Source)
b
Is there a CAUSED BY at all?
It appears Adobe is discarding the original error and throwing a new error related to the status code (which is rather dumb of it)
Lucee does a better job of preserving the original HTTP errors I've found
m
When I do a try/catch it seems to throw the same stack trace
b
Right, but is there a caused by?
Also, what version of CF is this?
I recall running into this exact same thing the other day and I don't recall if a newer ACF version had better error reporting
ah, you said 2021 u5
m
in commandbox i'm running ACF 2021 update 5
i don't see a caused by wording on the page
👍 1
b
To be clear is that the server making the HTTP call or receiving it?
I'm a little unclear since you posted two stack traces that appear to be from both ends
is the server calling itself?
m
it's making a call to an external API
👍 1
to get you a different stack trace, this is what I see when I call the bolthttp version Stack Trace javax.net.ssl.SSLProtocolException: Received close_notify during handshake at java.base/sun.security.ssl.Alert.createSSLException(Unknown Source) at java.base/sun.security.ssl.Alert.createSSLException(Unknown Source) at java.base/sun.security.ssl.TransportContext.fatal(Unknown Source) at java.base/sun.security.ssl.TransportContext.fatal(Unknown Source) at java.base/sun.security.ssl.TransportContext.fatal(Unknown Source) at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Unknown Source) at java.base/sun.security.ssl.TransportContext.dispatch(Unknown Source) at java.base/sun.security.ssl.SSLTransport.decode(Unknown Source) at java.base/sun.security.ssl.SSLSocketImpl.decode(Unknown Source) at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source) at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at coldfusion.runtime.StructBean.invoke(StructBean.java:509) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4365) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4217) at cfbolthttp2ecfc934469416$funcRAWREQUEST.runFunction(C\[removed]bolthttp.cfc102) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:623) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:516) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:463) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:438) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:681) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4909) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4890) at cfbolthttp2ecfc934469416$funcREQUEST.runFunction(C\[removed]\bolthttp.cfc116) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:623) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:516) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:463) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:438) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:681) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:980) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:762) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4165) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4129) at cfminuet2ecfc1894379831$funcGETOAUTHTOKEN.runFunction(C\[removed]\minuet.cfc59) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:623) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:516) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:463) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:438) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:310) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:975) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:696) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:503) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4254) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4217) at cfrun2ecfm1314003580.runPage(C\[removed].cfm3) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:257) at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:749) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:578) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:613) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:162) at coldfusion.filter.IpFilter.invoke(IpFilter.java:45) at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:97) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.CfmServlet.service(CfmServlet.java:231) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311) at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter.doFilter(RegexPathInfoFilter.java:47) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:405) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68) at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117) at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:275) at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:79) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:134) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:131) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:255) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:79) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:100) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:387) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:852) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2019) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1558) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1449) at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1280) at java.base/java.lang.Thread.run(Unknown Source)
it's not a hugely difficult call. I'm just requesting an API token. I can even get it working through CURL on the command prompt
and other things like Insomnia (similar to Postman). and like I said our ACF dev server.
b
Well, the bad news is the HTTP client (you in this case) doesn't seem to be privy to the reason the connection was closed. That information is probably logged somewhere on the remote server, which I assume you have no access to,
That would point to a TLS version issue just since cert chains (the most common reason) usually have a different error message
Unless you have the ability to reach out to the org who runs the remote server to help you troubleshoot, you may have to do some guessing after all
A packet sniffer may help, but maybe not.
Is the CommandBox server itself running an HTTPS port?
There is one known issue where that can affect how SSL works on the JVM which can affect outgoing http calls
m
it's running over https locally on my computer. i basically followed this guide to set it up https://zeropointdevelopment.com/how-to-get-https-working-in-windows-10-localhost-dev-environment/
yes
b
Ok, let me find a flag for you to try disabling. It's a shot in the dark, but it's solved things like this before
When CommandBox runs HTTPS on Adobe, it disables an ECC SSL algorithm because it caused issues in some versions of java, but that can affect HTTPS connections that use that algorithm
Try this
Copy code
server set runwar.args="--ssl-eccdisable=false"
server restart
Like I said, it's a shot in the dark but easy to try
Unless you can get whoever maintains the remote server to tell you why they're closing your SSL connections, you'll have a hard time troubleshooting this without some guessing
@mike42780
m
@bdw429s As always, you're awesome! That worked 😁
🎉 1
Thanks Brad!!
b
wow, nice
m
saved me from having to code directly on a dev server lol
b
So basically what that tells us is that the remote server is using an SSL cert which uses the ECC cipher algorithm
m
makes sense
b
Since CommandBox had that turned off, the SSL negotiation would break down
And, as usual, SSL errors are pathetic, lol
m
right agreed
m
May be an unrelated issue and (sorry for hijacking this thread), but I am running into issue with CF2021 U5 (not on command box) Red Hat Linux when trying to upgrade to Java 11.0.17 or 11.0.18. I have been racking my brain try to figure what is going on. I looked at what was changed in each of these java versions to pinpoint the issue. The actual cfhttp is making a REST call to AWS API so very limited on what I can see on their end and ACF does not give back much info or errors or in the log, unless there is a setting to change. I get this in the cfhttp response:
I/O Exception: Could not derive key
My guess is it is a TLS version or algorithm that was disabled/changed Is there a way to get a full stack trace of the issue? Or a way to diagnose the issue, without trial and error and spending weeks on the issue? Thanks in advanced.
b
Set throw on error to true, catch, and dump the exception
🤦🏻‍♂️ 1
m
Dang - never knew there was a throwOnError for CFHTTP - go figure. I have been calling cfhttp for years.