-
Notifications
You must be signed in to change notification settings - Fork 533
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
WatsonServices: Unable to find acceptable protocols #603
Comments
IBM Java and the Apache Http Client library do not cooperate very well when accessing TLS 1.2 servers. See: https://issues.apache.org/jira/browse/HTTPCLIENT-1784 |
This is a duplicate of #610 |
Please can anyone provide me about the details of how to tackle this issue, I have a submission of my final year project this week but this error is not letting us test our project . Thanks. |
@ShubhamSharmaCSE The easiest workaround is to use OpenJDK or Oracle Java instead of IBM Java. Can you do that? |
Here is an update from a customer who is using Oracle JDK but faces this issue:
|
I am also facing same issue when I try to deploy a modified application. It gives me below error : 2017-03-22T15:20:23.06+0500 [APP/0] OUT 10:20:23.040 [Thread-20] ERROR com.ibm.watson.apis.conversation_enhanced.listener.SetupThread - Error ini What can be wrong ? What should I do ? I want to do some updates to my existing application. And when I do it, can't get it back up. |
@asidd The customer needs to specify a different |
I solved my issue , modifying the WatsonService.java in this way. protected OkHttpClient configureHttpClient() {
ConnectionSpec spec = new ConnectionSpec.Builder(ConnectionSpec.COMPATIBLE_TLS)
.tlsVersions(TlsVersion.TLS_1_0)
.cipherSuites(
CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
CipherSuite.TLS_DHE_RSA_WITH_AES_128_GCM_SHA256)
.allEnabledTlsVersions()
.supportsTlsExtensions(false)
.allEnabledCipherSuites()
.build();
final OkHttpClient.Builder builder = new OkHttpClient.Builder();
final CookieManager cookieManager = new CookieManager();
cookieManager.setCookiePolicy(CookiePolicy.ACCEPT_ALL);
builder.cookieJar(new JavaNetCookieJar(cookieManager));
builder.connectTimeout(60, TimeUnit.SECONDS);
builder.writeTimeout(60, TimeUnit.SECONDS);
builder.readTimeout(90, TimeUnit.SECONDS);
builder.connectionSpecs(Collections.singletonList(spec));
return builder.build();
} Thanks to all. |
@bruceadams @joralemarti has identified the key element that I missed when trying this approach: |
In #626 I'm updating the okhttp version to be If someone can validate that the java-sdk-3.7.1-SNAPSHOT from sonatype: https://oss.sonatype.org/content/repositories/snapshots/com/ibm/watson/developer_cloud/java-sdk/3.7.1-SNAPSHOT/ fixes the IBM JDK issue then I will release the jar to maven. |
All we need to do is this to continue to use 3.6.0 and which will work for all JDKs:
See my comment in your gist for the explanation/justification. |
Thank you again for pointing out the obvious. You will notice above I do not explicitly set any cipher suites. Forgetting about the basic problem that IBM JDK and Oracle names mismatch that has caused all of this - |
hello All, thanking you in advance |
saw that now, 3.7.1 already in maven central, thank you !!! |
Hi all, I still have this issue when deploying to Watson. In Netbeans it seems to work fine though.. Below the error but let me first give you the versions of the POM file
|
Hello, I'm testing the Watson Conversation Services:
Using Netbeans, IBM JAVA SDK 1.8, java-sdk-3.5.3-jar-with-dependencies.jar
I got this error when I tried the following:
WARNING: Exception on MessageDispatcher: java.lang.RuntimeException: java.net.UnknownServiceException: Unable to find acceptable protocols. isFallback=false, modes=[ConnectionSpec(cipherSuites=[TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_3DES_EDE_CBC_SHA], tlsVersions=[TLS_1_2, TLS_1_1, TLS_1_0], supportsTlsExtensions=true), ConnectionSpec(cipherSuites=[TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_3DES_EDE_CBC_SHA], tlsVersions=[TLS_1_0], supportsTlsExtensions=true), ConnectionSpec()], supported protocols=[TLSv1] at com.ibm.watson.developer_cloud.service.WatsonService$1.execute(WatsonService.java:182)
Thanks in advance.
The text was updated successfully, but these errors were encountered: