I had the same problem with sbt.
It tried to fetch dependencies from repo1.maven.org over ssl
but said it was "unable to find valid certification path to requested target url".
so I followed this postand still failed to verify a connection.
So I read about it and found that the root cert is not enough, as was suggested by the post,so -
the thing that worked for me was importing the intermediate CA certificates into the keystore.
I actually added all the certificates in the chain and it worked like a charm.
Download File https://pueclamliea.blogspot.com/?ij=2x30zO
Yes, open that site in a browser, view certificate, view certification path, and there you should find the CAs that must be trusted. In my case, I had 3 corporate CAs related to proxy that I had to add to java keystore.
SCR-ERROR: Unable to download URL: _A.xml: com.lumension.scr.exception.UnableToAccesURL: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Hello,
I have set up Integration Server to create web service via https protocole. And for this I have created a Keystore list and trustore list in Integration Server. And I have set my 443 port in Integration server with my keystore alias. (And to be complete, even it is not important for me in this problem, I have set a web service endpoint address alias and url aliases to simplify the url of called web service). After test it on Visual Studio program, it works.
But I want to test it with a CAF application. But I have a problem : unable to find valid certification path to requested target
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target", :exception=>Manticore::ClientProtocolException, :cause=>#}
2017-04-14 19:24:15,211 ERROR pool-11-thread-2 Http 95 - com.esri.ges.framework.httpclient - 10.5.0 An SSL Handshake error has occurred when attempting to communicate with URL: "https://[ServerName]:6443/arcgis/admin/machines/[ServerName]/status". Please make sure you have imported the SSL certificate from "https://[ServerName]:6443/arcgis/admin/machines/[ServerName]/status" into GeoEvent's site via the ArcGIS Server Admin API. Root Cause: "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target".
"Caught unhandled exception: java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target."
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target". ClientConnectionId: xxxxxxxxxxxx"
Request failed. Exception: sunsecurity.validator.ValidatorException: PKIX path building failed: sunsecurity.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; Class: classjavax.netssl.SSLHandshakeException
Hi, did you manage out this error ? I am facing the same issue. Using a valid web certificate but still getting error
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
"SQLServerException: Failed to authenticate the user in Active Directory (Authentication=ActiveDirectoryPassword).
Caused by: ExecutionException: mssql_shaded.com.microsoft.aad.adal4j.AuthenticationException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Caused by: AuthenticationException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. "
Binding stopped working about 14 hours ago while giving error:
PushNetworkException - javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
SDM, new FCMS , I-User , S-User , D-User, C-User , M-User (ByDesign downloads), not valid for P-Users , KBA , pkix path building failed , XX-SER-SAPSMP-SDM , SAP Support Portal - SAP Download Manager , XX-SER-FORME , SAP for Me , Problem
Unable to read repository at software-dl.ti.com/.../com.ti.dvt.analysis.framework_4.1.0.201810091500.jar.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
SCHEMA_REGISTRY_CONFIGURATION_ERROR] Schema from schema registry could not be initialized. Error while fetching schema for subject 'env-dev-market-daily_eod_price-log-v1-value' from the registry: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.
2018-11-15 17:06:00,445 WARN jsam-core [[iPOJO] pool-1-thread-1] [WARNING] com.jamfsoftware.jsam.core.jss.JssCheckinManager : No service interface found in the class hierarchy, use the implementation class
2018-11-15 17:06:00,711 INFO c.j.j.c.u.PaxLoggingStartupListener [[iPOJO] pool-1-thread-1] Waiting for OSGI Log Service
2018-11-15 17:06:01,727 INFO c.j.j.c.u.PaxLoggingStartupListener [[iPOJO] pool-1-thread-1] OSGI Log Service is initialized
2018-11-15 17:06:01,727 INFO c.j.j.c.j.JssCommunicationServiceImpl [[iPOJO] pool-1-thread-1] Beginning enrollment process
2018-11-15 17:06:02,664 WARN c.j.j.c.k.p.AclFileSystemFacade [[iPOJO] pool-1-thread-1] There should be exactly 1 ACL entry allowing access to .configjsam.jsam_encrypted_keys.properties. There are 3. [BUILTINAdministrators:READ_DATA/WRITE_DATA/APPEND_DATA/READ_NAMED_ATTRS/WRITE_NAMED_ATTRS/EXECUTE/DELETE_CHILD/READ_ATTRIBUTES/WRITE_ATTRIBUTES/DELETE/READ_ACL/WRITE_ACL/WRITE_OWNER/SYNCHRONIZE:ALLOW, NT AUTHORITYLOCAL SERVICE:READ_DATA/WRITE_DATA/APPEND_DATA/READ_NAMED_ATTRS/WRITE_NAMED_ATTRS/EXECUTE/DELETE_CHILD/READ_ATTRIBUTES/WRITE_ATTRIBUTES/DELETE/READ_ACL/WRITE_ACL/WRITE_OWNER/SYNCHRONIZE:ALLOW, NT AUTHORITYSYSTEM:READ_DATA/WRITE_DATA/APPEND_DATA/READ_NAMED_ATTRS/WRITE_NAMED_ATTRS/EXECUTE/DELETE_CHILD/READ_ATTRIBUTES/WRITE_ATTRIBUTES/DELETE/READ_ACL/WRITE_ACL/WRITE_OWNER/SYNCHRONIZE:ALLOW]
2018-11-15 17:06:02,680 INFO c.j.j.c.k.p.JsamPermissionEnforcer [[iPOJO] pool-1-thread-1] Enforcing permissions for .configjsam.jsam_encrypted_keys.properties. Only process owner should be allowed to read and write this file.
2018-11-15 17:06:03,164 WARN c.j.j.c.k.p.AclFileSystemFacade [[iPOJO] pool-1-thread-1] There should be exactly 1 ACL entry allowing access to .configjsamkeystore.jks. There are 3. [BUILTINAdministrators:READ_DATA/WRITE_DATA/APPEND_DATA/READ_NAMED_ATTRS/WRITE_NAMED_ATTRS/EXECUTE/DELETE_CHILD/READ_ATTRIBUTES/WRITE_ATTRIBUTES/DELETE/READ_ACL/WRITE_ACL/WRITE_OWNER/SYNCHRONIZE:ALLOW, NT AUTHORITYLOCAL SERVICE:READ_DATA/WRITE_DATA/APPEND_DATA/READ_NAMED_ATTRS/WRITE_NAMED_ATTRS/EXECUTE/DELETE_CHILD/READ_ATTRIBUTES/WRITE_ATTRIBUTES/DELETE/READ_ACL/WRITE_ACL/WRITE_OWNER/SYNCHRONIZE:ALLOW, NT AUTHORITYSYSTEM:READ_DATA/WRITE_DATA/APPEND_DATA/READ_NAMED_ATTRS/WRITE_NAMED_ATTRS/EXECUTE/DELETE_CHILD/READ_ATTRIBUTES/WRITE_ATTRIBUTES/DELETE/READ_ACL/WRITE_ACL/WRITE_OWNER/SYNCHRONIZE:ALLOW]
2018-11-15 17:06:03,164 INFO c.j.j.c.k.p.JsamPermissionEnforcer [[iPOJO] pool-1-thread-1] Enforcing permissions for .configjsamkeystore.jks. Only process owner should be allowed to read and write this file.
2018-11-15 17:06:03,977 ERROR jsam-core [[iPOJO] pool-1-thread-1] [ERROR] : Cannot invoke the post-registration callback initialize
java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.felix.ipojo.util.Callback.call(Callback.java:233) at org.apache.felix.ipojo.handlers.providedservice.ProvidedService.registerService(ProvidedService.java:390) at org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.__M_stateChanged(ProvidedServiceHandler.java:503) at org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.stateChanged(ProvidedServiceHandler.java) at org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:560) at org.apache.felix.ipojo.InstanceManager.stateChanged(InstanceManager.java:1533) at org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:585) at org.apache.felix.ipojo.HandlerManager.stateChanged(HandlerManager.java:239) at org.apache.felix.ipojo.Handler.setValidity(Handler.java:174) at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__M_checkContext(DependencyHandler.java:170) at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.checkContext(DependencyHandler.java) at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__M_validate(DependencyHandler.java:133) at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.validate(DependencyHandler.java) at org.apache.felix.ipojo.util.DependencyModel.validate(DependencyModel.java:522) at org.apache.felix.ipojo.util.DependencyModel.computeAndSetDependencyState(DependencyModel.java:362) at org.apache.felix.ipojo.util.DependencyModel.onChange(DependencyModel.java:1123) at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.fireUpdate(ServiceReferenceManager.java:561) at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.onNewMatchingService(ServiceReferenceManager.java:525) at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.addedService(ServiceReferenceManager.java:504) at org.apache.felix.ipojo.util.Tracker$Tracked.trackAdding(Tracker.java:711) at org.apache.felix.ipojo.util.Tracker$Tracked.track(Tracker.java:672) at org.apache.felix.ipojo.util.Tracker$Tracked.serviceChanged(Tracker.java:633) at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990) at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838) at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545) at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4557) at org.apache.felix.framework.Felix.registerService(Felix.java:3549) at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348) at org.apache.felix.ipojo.IPojoContext.registerService(IPojoContext.java:395) at org.apache.felix.ipojo.handlers.providedservice.ProvidedService.registerService(ProvidedService.java:351) at org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.__M_stateChanged(ProvidedServiceHandler.java:503) at org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.stateChanged(ProvidedServiceHandler.java) at org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:560) at org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:440) at org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:179) at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:319) at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:240) at org.apache.felix.ipojo.extender.internal.linker.ManagedType$InstanceSupport$1.call(ManagedType.java:312) at org.apache.felix.ipojo.extender.internal.linker.ManagedType$InstanceSupport$1.call(ManagedType.java:306) at org.apache.felix.ipojo.extender.internal.queue.JobInfoCallable.call(JobInfoCallable.java:114) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
Caused by: com.jamfsoftware.jsam.core.JsamException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.jamfsoftware.jsam.core.jss.JssCommunicationInternalClientImpl.__M_getResponse(JssCommunicationInternalClientImpl.java:123) at com.jamfsoftware.jsam.core.jss.JssCommunicationInternalClientImpl.getResponse(JssCommunicationInternalClientImpl.java) at com.jamfsoftware.jsam.core.jss.JssCommunicationInternalClient$$Proxy.getResponse(Unknown Source) at com.jamfsoftware.jsam.core.jss.JssCommunicationServiceImpl.__M_getResponse(JssCommunicationServiceImpl.java:147) at com.jamfsoftware.jsam.core.jss.JssCommunicationServiceImpl.getResponse(JssCommunicationServiceImpl.java) at com.jamfsoftware.jsam.core.jss.JssCommunicationServiceImpl.__M_enroll(JssCommunicationServiceImpl.java:126) at com.jamfsoftware.jsam.core.jss.JssCommunicationServiceImpl.enroll(JssCommunicationServiceImpl.java) at com.jamfsoftware.jsam.core.jss.JssCommunicationService$$Proxy.enroll(Unknown Source) at com.jamfsoftware.jsam.core.service.impl.JsamCoreActivationServiceImpl.__M_initialize(JsamCoreActivationServiceImpl.java:64) at com.jamfsoftware.jsam.core.service.impl.JsamCoreActivationServiceImpl.initialize(JsamCoreActivationServiceImpl.java) ... 48 more
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1964) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:328) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:322) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1614) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1052) at sun.security.ssl.Handshaker.process_record(Handshaker.java:987) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1072) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) at com.jamfsoftware.jsam.core.jss.JssCommunicationInternalClientImpl.__M_getResponse(JssCommunicationInternalClientImpl.java:113) ... 57 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302) at sun.security.validator.Validator.validate(Validator.java:262) at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:105) at com.jamfsoftware.jsam.core.keystore.AugmentedTrustManager.checkServerTrusted(AugmentedTrustManager.java:81) at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(SSLContextImpl.java:992) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1596) ... 78 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392) ... 86 more