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

OKHttpClient not working with Bluemix JavaBuildpack (IBM JDK) #12

Open
arsu77 opened this issue Feb 5, 2018 · 0 comments
Open

OKHttpClient not working with Bluemix JavaBuildpack (IBM JDK) #12

arsu77 opened this issue Feb 5, 2018 · 0 comments

Comments

@arsu77
Copy link

arsu77 commented Feb 5, 2018

There is an issue with OKHttpClient and the TLS implementation running on.a IBM Java JRE.
The same root cause has been documented on Watson-developer-cloud (Issue #603).
If the starter kit without modifications (except setting App-ID and Secret) is pushed to Bluemix the Authenticate as User process is failing with the following error message:
java.net.UnknownServiceException: Unable to find acceptable protocols
The root cause for this exception is well documented in above referenced issue #603.

The following modification of com.ibm.watsonwork.WatsonWorkConfigurationresolves this issue:

    @Bean
    public OkHttpClient okHttpClient() {
        Builder client = new OkHttpClient.Builder();
        ConnectionSpec spec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS).allEnabledCipherSuites().build();
        client.connectionSpecs(Collections.singletonList(spec));
        return client.build();
    }

Please refer to the following patch file which contains above described fix.

watsonwork-spring-boot_patch.txt

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

No branches or pull requests

1 participant