danlance
05/05/2022, 6:39 PMlocal.wsObject = createobject("webservice", "https://[host]/[cfcname].cfc?wsdl");
local.response = local.wsObject.[methodname]([parameters]);
This has worked without issue across multiple Lucee versions and Java versions, for several years.
We are just in the process of testing the latest commandbox 5.5.1 release - current environment is running on CommandBox 5.4.2 - and we are testing on commandbox 5.5.1
When testing on commandbox 5.5.1, all our calls to this web service fail on line 2 in the above sample code
We see a GET request logged on our web server to https://[host]/[cfcname].cfc?wsdl
We do not see any subsequent POST requests (which would normally be the case.
Within the exception log we see the error “java.net.ConnectException: Connection timed out (Connection timed out)”
"FaultCode": {
"Prefix": "",
"LocalPart": "Server.userException",
"NamespaceURI": "<http://schemas.xmlsoap.org/soap/envelope/>"
}
With the 1st line in the stack trace being the 2nd line in the previous code sample where we are attempting to call a method on the object.
If we switch back to CommandBox 5.4.2, then the request completes successfully.
I did compare the WSDL for the CFC being referenced from instances running both versions.
The only difference (other than hostname between 2 instances) was that for the working (CommandBox 5.4.2) instance, the self referential namespace references were pointing to https://[host]/[cfcname].cfc and for the non working (commandbox 5.5.1) version, it is pointing to http://[host]/[cfcname].cfc
i.e. switched from https to http.
It should be noted that SSL is implemented on the level 7 load balancer (AWS Application Load Balancer) with traffic between load balancer and nginx proxy, and between nginx proxy and Lucee server (WildFly / Undertow / Commandbox) being via http.
Our nginx proxy is configured to redirect any incoming http:// requests to the same URL via https://
I have review load balancer logs, and determined that no incoming requests to [host]/[cfcname].cfc have been made via http - all are via https
No idea if the above is the cause, or if there is some other issue…
SOAP web service requests complete successfully from a commandbox 5.5.1 instance to a CommandBox 5.4.2 instance, but do not complete successfully if the destination instance is running commandbox 5.5.1
We have subsequent to initial tests, deployed a commandbox 5.5.1 instance with jdk-11.0.14.1+1 instead od the default jdk-11.0.15+10 JVM - as we had initially thought that his issue could be due to java version rather than Commandbox - but we experience the same issue, which suggests that this is a commandbox rather than a java issue,danlance
05/09/2022, 10:15 AMdanlance
05/09/2022, 10:16 AMbdw429s
05/09/2022, 3:04 PMbdw429s
05/09/2022, 3:04 PMbdw429s
05/09/2022, 3:06 PMstart
in this test project and make this Postman call?danlance
05/09/2022, 3:23 PMjava.net.ConnectException: Connection timed out (Connection timed out)
Rolling back App2 to to previous build, (so new image on App1 but previously working on App2) resolved the issue
Manually overriding the java version used on App2 to use previous java version (jdk-11.0.14.1+1) but new version of CB ( 5.5.1) did not resolve the issue.
Therefore - that would suggest that
• The issue is caused by CB 5.5.1 and not by jdk-11.0.15+10
• The issue is on the destination processing of incoming SOAP requests, not with how the outgoing request is made
-----
As I was attempting to drill down deeper into the issue, I identified a difference in the WSDL response:
• for the working (CommandBox 5.4.2) instance, the self referential namespace references were pointing to https://[host]/[cfcname].cfc
• for the non working (commandbox 5.5.1) version, it is pointing to http://[host]/[cfcname].cfc
i.e. https had been changed to http
As I say, no idea if that is the cause of the issue - but was the only notable difference I could see with respect to the WSDLdanlance
05/09/2022, 3:24 PMdanlance
05/09/2022, 3:26 PMbdw429s
05/09/2022, 3:27 PMdanlance
05/09/2022, 3:27 PMbdw429s
05/09/2022, 3:27 PMdanlance
05/09/2022, 3:27 PMbdw429s
05/09/2022, 3:27 PMbdw429s
05/09/2022, 3:28 PMbdw429s
05/09/2022, 3:28 PMbdw429s
05/09/2022, 3:28 PMbdw429s
05/09/2022, 3:28 PMdanlance
05/09/2022, 3:29 PMENV BOX_SERVER_APP_CFENGINE lucee@5.3.7+47
danlance
05/09/2022, 3:45 PMlocal.wsObject = createobject("webservice", "https://[host]/[cfcname].cfc?wsdl");
Within the source server, the error was logged:
java.net.ConnectException: Connection timed out (Connection timed out)
with detail:
"FaultCode": {
"Prefix": "",
"LocalPart": "Server.userException",
"NamespaceURI": "<http://schemas.xmlsoap.org/soap/envelope/>"
}
against the following line of code:
local.response = local.wsObject.[methodname]([parameters]);
For this request:
• Nothing was logged on the destination server (Lucee logs)
• Nothing was logged on the destination server (Nginx logs)
• Nothing was logger on the destination Load Balancer (AWS Load Blancer Logs)
i.e. this request was not made to the destination server…
This led me to the conclusion:
• Cause of failure most likely due to an inconsistency in the WSDL returned
With respect to the network configuration:
• Incoming requests to the LB on port 443 are directed to port 80 on the nginx instance, which are forward proxied to underlying Lucee instance
• Incoming requests to the LB on port 80 are directed to a different port on the nginx instance, which responds with a 301 redirecting to the same domain, path and query string
In the case that the SOAP request associated to the 2nd line of code came in via http rather than https:
• request would be logged on LB
• request would be logged on Nginx
• Request would not be logged on Lucee
So… with that… and with confirmation from the logs when hitting the old instance (CB 5.4.2)… and with no other changes made to the environment settings other than switching to a new docker image with the changes to the CB base image (using default java version)… it does not seem feasible that this is an environment caused network issuedanlance
05/09/2022, 3:45 PMbdw429s
05/09/2022, 3:50 PMbdw429s
05/09/2022, 3:50 PMbdw429s
05/09/2022, 3:50 PMbdw429s
05/09/2022, 3:51 PMbdw429s
05/09/2022, 3:51 PMdanlance
05/09/2022, 3:52 PMbdw429s
05/09/2022, 3:52 PMbdw429s
05/09/2022, 3:53 PMdanlance
05/09/2022, 3:53 PMbdw429s
05/09/2022, 3:53 PMbdw429s
05/09/2022, 3:53 PMbdw429s
05/09/2022, 3:54 PMbdw429s
05/09/2022, 3:54 PMbdw429s
05/09/2022, 3:54 PMbdw429s
05/09/2022, 3:55 PMbdw429s
05/09/2022, 3:56 PMX-Forwarded-For support disabled by default
section in the release notes
https://www.ortussolutions.com/blog/commandbox-551-releaseddanlance
05/09/2022, 3:58 PMbdw429s
05/09/2022, 3:59 PMbdw429s
05/09/2022, 3:59 PMbdw429s
05/09/2022, 4:00 PMcomponent {
remote function hello() {
return "hello world";
}
}
and I can call it like so
local.wsObject = createobject("webservice", "<http://127.0.0.1:18219/myService.cfc?wsdl>");
dump( local.wsObject.hello() )
bdw429s
05/09/2022, 4:00 PMdanlance
05/09/2022, 4:02 PMbdw429s
05/09/2022, 4:05 PMserver.json
with
server set web.useProxyForwardedIP=true
or just set the following env var on your container
box_server_web_useProxyForwardedIP=true
danlance
05/09/2022, 4:06 PM{
"web": {
"useProxyForwardedIP": true
}
}
danlance
05/09/2022, 4:06 PMbdw429s
05/09/2022, 4:06 PMbdw429s
05/09/2022, 4:06 PMserver set
command simply modifies your server.json
for youdanlance
05/09/2022, 4:06 PMbdw429s
05/09/2022, 4:08 PMX-Forwarded-Proto
header as wellbdw429s
05/09/2022, 4:08 PMbdw429s
05/09/2022, 4:10 PMdanlance
05/09/2022, 4:10 PMdanlance
05/09/2022, 4:11 PMbdw429s
05/09/2022, 4:12 PMbdw429s
05/09/2022, 4:13 PM127.0.0.1
and bypass all your IP based security!bdw429s
05/09/2022, 4:13 PMdanlance
05/09/2022, 4:14 PMbdw429s
05/09/2022, 4:14 PMdanlance
05/09/2022, 4:20 PMdanlance
05/09/2022, 4:38 PMbdw429s
05/09/2022, 4:39 PMdanlance
05/09/2022, 4:40 PMdanlance
05/09/2022, 4:41 PMdanlance
05/09/2022, 4:42 PMdanlance
05/09/2022, 4:44 PMdanlance
05/09/2022, 4:44 PMdanlance
05/09/2022, 4:45 PM