Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility issue with aws-java-sdk:1.10.77 and httpclient:4.5.3 #4456

Closed
dclim opened this issue Jun 23, 2017 · 1 comment
Closed

Compatibility issue with aws-java-sdk:1.10.77 and httpclient:4.5.3 #4456

dclim opened this issue Jun 23, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@dclim
Copy link
Contributor

dclim commented Jun 23, 2017

Calls to com.amazonaws.http.AmazonHttpClient.execute() may fail with the following exception:

java.lang.IllegalStateException: Socket not created by this factory
	at org.apache.http.util.Asserts.check(Asserts.java:34) ~[httpcore-4.4.6.jar:4.4.6]
	at org.apache.http.conn.ssl.SSLSocketFactory.isSecure(SSLSocketFactory.java:435) ~[httpclient-4.5.3.jar:4.5.3]
	at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:186) ~[httpclient-4.5.3.jar:4.5.3]
	at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:326) ~[httpclient-4.5.3.jar:4.5.3]
	at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610) ~[httpclient-4.5.3.jar:4.5.3]
	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445) ~[httpclient-4.5.3.jar:4.5.3]
	at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) ~[httpclient-4.5.3.jar:4.5.3]
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.3.jar:4.5.3]
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) ~[httpclient-4.5.3.jar:4.5.3]
	at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:837) ~[aws-java-sdk-core-1.10.77.jar:?]
	at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:607) ~[aws-java-sdk-core-1.10.77.jar:?]
	at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:376) ~[aws-java-sdk-core-1.10.77.jar:?]
	at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:338) ~[aws-java-sdk-core-1.10.77.jar:?]
	at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:287) ~[aws-java-sdk-core-1.10.77.jar:?]

I'm seeing issues with the aws-java-sdk in one of our extensions and believe that it might affect the S3 extension as well. I haven't yet seen any issues in S3, but it uses similar method calls so the version bump might have introduced lurking issues. The aws-java-sdk extends SSLSocketFactory as SdkTLSSocketFactory, and when the factory is asked to create a socket and calls into the incompatible httpclient, it returns a standard Socket instead of an SSLSocket which causes the assertion in isSecure to fail.

Similar issues between aws-java-sdk and httpclient have been reported by others:

I'd like to revert to httpclient:4.5.1 and httpcore:4.4.3 unless there's a particular reason these need to be upgraded.

@tralfredochua
Copy link

WORKS LIKE A CHARM!!!!!!!!! :* :* :* :*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants