0

When using JAVA API of SQS (sdk version: 1.9.30), sometimes I got following exceptions:

com.amazonaws.AmazonClientException: Unable to execute HTTP request: hostname in certificate didn't match: <sqs.us-west-1.amazonaws.com> != <*.mycompany.com> OR <*.mycompany.com> OR <mycompany.com>
    at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:472)
    at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:296)
    at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:2422)
    at com.amazonaws.services.sqs.AmazonSQSClient.sendMessage(AmazonSQSClient.java:1015)

There are some question like mine (i.e SSL problems with S3/AWS using the Java API: "hostname in certificate didn't match"), but seems not the same one. Because in my situation the exception is like:

[sqs url] != [my company's url]

looks like when I try to connect to AWS server, the sdk connect to my company's server for some reason, and make the SSL handshake fail.

There are other one got the same question (https://github.com/Upplication/Amazon-S3-FileSystem-NIO2/issues/40), but still have no answer.

Is this a bug of SDK and any solution for this?

Community
  • 1
  • 1
qinshi
  • 1
  • 1
  • Is your code running behind some kind of firewall? – Rohit Jul 21 '15 at 04:17
  • @Rohit: Yes, the code is running with firewall, is firewall related to this? – qinshi Jul 22 '15 at 05:38
  • I'm not an expert on firewall settings. But it looks like your firewall is signing the incoming data again with ssl certificates hosted on firewall server. That causes the host name mismatch on your code. Check for it with your systems engineer – Rohit Jul 22 '15 at 13:16
  • I'contact our system engineer and try to figure this out, thank you @Rohit! – qinshi Jul 24 '15 at 03:20

0 Answers0