com.ecwid.consul.transport.TransportException

javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate

Samebug tips1

Import the server certificate into your truststore.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web2

  • javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate
  • javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate
  • Stack trace

    • com.ecwid.consul.transport.TransportException: javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate at com.ecwid.consul.transport.AbstractHttpTransport.executeRequest(AbstractHttpTransport.java:91)[consul-api-1.1.10.jar!/:na] at com.ecwid.consul.transport.AbstractHttpTransport.makeGetRequest(AbstractHttpTransport.java:50)[consul-api-1.1.10.jar!/:na] at com.ecwid.consul.v1.ConsulRawClient.makeGetRequest(ConsulRawClient.java:81)[consul-api-1.1.10.jar!/:na] at com.ecwid.consul.v1.kv.KeyValueConsulClient.getKVValues(KeyValueConsulClient.java:150)[consul-api-1.1.10.jar!/:na] at com.ecwid.consul.v1.ConsulClient.getKVValues(ConsulClient.java:404)[consul-api-1.1.10.jar!/:na] at org.springframework.cloud.consul.config.ConsulPropertySource.init(ConsulPropertySource.java:64)[spring-cloud-consul-config-1.0.2.RELEASE.jar!/:1.0.2.RELEASE] at org.springframework.cloud.consul.config.ConsulPropertySourceLocator.create(ConsulPropertySourceLocator.java:135)[spring-cloud-consul-config-1.0.2.RELEASE.jar!/:1.0.2.RELEASE] at org.springframework.cloud.consul.config.ConsulPropertySourceLocator.locate(ConsulPropertySourceLocator.java:113)[spring-cloud-consul-config-1.0.2.RELEASE.jar!/:1.0.2.RELEASE] at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:89)[spring-cloud-context-1.1.0.RELEASE.jar!/:1.1.0.RELEASE] at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:640)[spring-boot-1.3.5.RELEASE.jar!/:1.3.5.RELEASE] at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:343)[spring-boot-1.3.5.RELEASE.jar!/:1.3.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)[spring-boot-1.3.5.RELEASE.jar!/:1.3.5.RELEASE] at com.test.TestApp.main(TestApp.java:23)[TestApp-1.0.3.jar!/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_101] at java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_101] at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)[TestApp-1.0.3.jar!/:na] at java.lang.Thread.run(Thread.java:745)[na:1.8.0_101] Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)[na:1.8.0_101] at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)[na:1.8.0_101] at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2023)[na:1.8.0_101] at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1125)[na:1.8.0_101] at sun.security.ssl.SSLSocketImpl.waitForClose(SSLSocketImpl.java:1769)[na:1.8.0_101] at sun.security.ssl.HandshakeOutStream.flush(HandshakeOutStream.java:124)[na:1.8.0_101] at sun.security.ssl.Handshaker.sendChangeCipherSpec(Handshaker.java:1083)[na:1.8.0_101] at sun.security.ssl.ClientHandshaker.sendChangeCipherAndFinish(ClientHandshaker.java:1222)[na:1.8.0_101] at sun.security.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:1134)[na:1.8.0_101] at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:348)[na:1.8.0_101] at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)[na:1.8.0_101] at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)[na:1.8.0_101] at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)[na:1.8.0_101] at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)[na:1.8.0_101] at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)[na:1.8.0_101] at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)[na:1.8.0_101] at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:543)[httpclient-4.5.jar!/:4.5] at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:409)[httpclient-4.5.jar!/:4.5] at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)[httpclient-4.5.jar!/:4.5] at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)[httpclient-4.5.jar!/:4.5] at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)[httpclient-4.5.jar!/:4.5] at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)[httpclient-4.5.jar!/:4.5] at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882)[httpclient-4.5.jar!/:4.5] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)[httpclient-4.5.jar!/:4.5] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:220)[httpclient-4.5.jar!/:4.5] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:164)[httpclient-4.5.jar!/:4.5] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:139)[httpclient-4.5.jar!/:4.5] at com.ecwid.consul.transport.AbstractHttpTransport.executeRequest(AbstractHttpTransport.java:75)[consul-api-1.1.10.jar!/:na] ... 18 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    Unknown user
    2 times, 2 months ago
    Once, 5 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    132 more bugmates