I created a sample web application for POC. This application running in Amazon EC2 liberty 17.0.0.2. When we send get request to servlet as below it has to send message to AWS SQS.
http://localhost:8080/TestSqsWeb/SqsServlet?message=Hello333
Our EC2 is coorporate EC2, it needs proxy to connect to internet. So I provided proxy configuration in jvm.options file in liberty.
-Dhttps.nonProxyHosts=169.254.169.254|localhost|127.0.0.1
-Dhttp.nonProxyHosts=169.254.169.254|localhost|127.0.0.1
-Dhttp.proxyHost=proxy.ebiz.abc.com
-Dhttp.proxyPort=80
-Dhttps.proxyHost=proxy.ebiz.abc.com
-Dhttps.proxyPort=80
It is keep giving below exception.
org.apache.http.conn.ConnectTimeoutException: Connect to sqs.us-west-2.amazonaws.com:443 [sqs.us-west-2.amazonaws.com/52.119.168.22] failed: connect timed out
After further analysis I found it is not taking proxy system properties while making connection. I did printing of all system property in code using System.getProperty. It prints my system properties, it means configuration is correct.
For further analysis I deployed same app in tomcat-8 in same EC2 with same proxy configuration , it is working. It is able to make connection and send my message to AWS SQS queue.
After this analysis I concluded that there is some issue in liberty.
[Libraries in my sample app][1]
[1]: https://i.stack.imgur.com/K2gbj.png
In one of post I found, it can happen due to old version of http-client but I am using latest httpclient-4.5.2.jar and httpcore-4.4.4.jar as you can see in above link.
Has any one encountered same issue with Liberty 17.0.0.2/17.0.0.3 ? I am using IBM JAVA SDK-8.