Skip to content

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

@arsu77

Description

@arsu77

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions