unable to find valid certification path to requested target [might be a java install issue but haven't experienced it until after upgrade today]
Describe the bug
Error: javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
error from debug log
[server] Starting server...
:db/read-cache 5ms
[DB] Loading from global-cache caches...
:db/read-cache 1ms
[DB] Loading from workspace-cache caches...
[LLM-API] Default LLM model 'github-copilot/gpt-4.1' decision ':api-key-found'
:eca/initialize 452ms
[LLM-API] Default LLM model 'github-copilot/gpt-4.1' decision ':api-key-found'
[LLM-API] Default LLM model 'github-copilot/gpt-4.1' decision ':api-key-found'
:eca/initialized 49ms
[boundedElastic-1] INFO io.modelcontextprotocol.client.transport.StdioClientTransport - MCP server starting.
[boundedElastic-2] INFO io.modelcontextprotocol.client.transport.StdioClientTransport - MCP server starting.
[boundedElastic-1] INFO io.modelcontextprotocol.client.transport.StdioClientTransport - MCP server started
[boundedElastic-2] INFO io.modelcontextprotocol.client.transport.StdioClientTransport - MCP server started
[pool-4-thread-1] INFO io.modelcontextprotocol.client.LifecycleInitializer - Server response with Protocol: 2024-11-05, Capabilities: ServerCapabilities[completions=null, experimental={}, logging=null, prompts=PromptCapabilities[listChanged=false], resources=null, tools=ToolCapabilities[listChanged=false]], Info: Implementation[name=mcp-fetch, title=null, version=1.14.1] and Instructions null
[MCP] Started MCP server fetch
[pool-10-thread-1] INFO io.modelcontextprotocol.client.transport.StdioClientTransport - STDERR Message received: Sequential Thinking MCP Server running on stdio
[pool-5-thread-1] INFO io.modelcontextprotocol.client.LifecycleInitializer - Server response with Protocol: 2024-11-05, Capabilities: ServerCapabilities[completions=null, experimental=null, logging=null, prompts=null, resources=null, tools=ToolCapabilities[listChanged=null]], Info: Implementation[name=sequential-thinking-server, title=null, version=0.2.0] and Instructions null
[MCP] Started MCP server sequential-thinking
:eca/chat-prompt 30ms
{:exception #error {
:cause unable to find valid certification path to requested target
:via
[{:type java.util.concurrent.CompletionException
:message javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
:at [java.util.concurrent.CompletableFuture wrapInCompletionException CompletableFuture.java 325]}
{:type javax.net.ssl.SSLHandshakeException
:message (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
:at [sun.security.ssl.Alert createSSLException Alert.java 130]}
{:type sun.security.validator.ValidatorException
:message 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 387]}
{:type sun.security.provider.certpath.SunCertPathBuilderException
:message unable to find valid certification path to requested target
:at [sun.security.provider.certpath.SunCertPathBuilder build SunCertPathBuilder.java 148]}]
:trace
[[sun.security.provider.certpath.SunCertPathBuilder build SunCertPathBuilder.java 148]
[sun.security.provider.certpath.SunCertPathBuilder engineBuild SunCertPathBuilder.java 129]
[java.security.cert.CertPathBuilder build CertPathBuilder.java 295]
[sun.security.validator.PKIXValidator doBuild PKIXValidator.java 382]
[sun.security.validator.PKIXValidator engineValidate PKIXValidator.java 270]
[sun.security.validator.Validator validate Validator.java 256]
[sun.security.ssl.X509TrustManagerImpl checkTrusted X509TrustManagerImpl.java 284]
[sun.security.ssl.X509TrustManagerImpl checkServerTrusted X509TrustManagerImpl.java 144]
[sun.security.ssl.CertificateMessage$T13CertificateConsumer checkServerCerts CertificateMessage.java 1313]
[sun.security.ssl.CertificateMessage$T13CertificateConsumer onConsumeCertificate CertificateMessage.java 1212]
[sun.security.ssl.CertificateMessage$T13CertificateConsumer consume CertificateMessage.java 1155]
[sun.security.ssl.SSLHandshake consume SSLHandshake.java 393]
[sun.security.ssl.HandshakeContext dispatch HandshakeContext.java 476]
[sun.security.ssl.SSLEngineImpl$DelegatedTask run SSLEngineImpl.java 1207]
[java.util.ArrayList forEach ArrayList.java 1604]
[jdk.internal.net.http.common.SSLFlowDelegate lambda$executeTasks$0 SSLFlowDelegate.java 1148]
[jdk.internal.net.http.HttpClientImpl$DelegatingExecutor execute HttpClientImpl.java 168]
[jdk.internal.net.http.common.SSLFlowDelegate executeTasks SSLFlowDelegate.java 1143]
[jdk.internal.net.http.common.SSLFlowDelegate doHandshake SSLFlowDelegate.java 1109]
[jdk.internal.net.http.common.SSLFlowDelegate$Reader processData SSLFlowDelegate.java 508]
[jdk.internal.net.http.common.SSLFlowDelegate$Reader$ReaderDownstreamPusher run SSLFlowDelegate.java 283]
[jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask run SequentialScheduler.java 182]
[jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask run SequentialScheduler.java 149]
[jdk.internal.net.http.common.SequentialScheduler$TryEndDeferredCompleter complete SequentialScheduler.java 324]
[jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask run SequentialScheduler.java 151]
[jdk.internal.net.http.common.SequentialScheduler$SchedulableTask run SequentialScheduler.java 207]
[java.util.concurrent.ThreadPoolExecutor runWorker ThreadPoolExecutor.java 1095]
[java.util.concurrent.ThreadPoolExecutor$Worker run ThreadPoolExecutor.java 619]
[java.lang.Thread runWith Thread.java 1460]
[java.lang.Thread run Thread.java 1447]
[com.oracle.svm.core.thread.PlatformThreads threadStartRoutine PlatformThreads.java 832]
[com.oracle.svm.core.thread.PlatformThreads threadStartRoutine PlatformThreads.java 808]]}}
{:exception #error {
:cause unable to find valid certification path to requested target
:via
[{:type java.util.concurrent.CompletionException
:message javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
:at [java.util.concurrent.CompletableFuture wrapInCompletionException CompletableFuture.java 325]}
{:type javax.net.ssl.SSLHandshakeException
:message (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
:at [sun.security.ssl.Alert createSSLException Alert.java 130]}
{:type sun.security.validator.ValidatorException
:message PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
:at :db/upsert-cache 0ms[sun.security.validator.PKIXValidator doBuild
PKIXValidator.java 387]}
{:type sun.security.provider.certpath.SunCertPathBuilderException
:message unable to find valid certification path to requested target
:at [sun.security.provider.certpath.SunCertPathBuilder build SunCertPathBuilder.java 148]}]
:trace
[[sun.security.provider.certpath.SunCertPathBuilder build SunCertPathBuilder.java 148]
[sun.security.provider.certpath.SunCertPathBuilder engineBuild SunCertPathBuilder.java 129]
[java.security.cert.CertPathBuilder build CertPathBuilder.java 295]
[sun.security.validator.PKIXValidator doBuild PKIXValidator.java 382]
[sun.security.validator.PKIXValidator engineValidate PKIXValidator.java 270]
[sun.security.validator.Validator validate Validator.java 256]
[sun.security.ssl.X509TrustManagerImpl checkTrusted X509TrustManagerImpl.java 284]
[sun.security.ssl.X509TrustManagerImpl checkServerTrusted X509TrustManagerImpl.java 144]
[sun.security.ssl.CertificateMessage$T13CertificateConsumer checkServerCerts CertificateMessage.java 1313]
[sun.security.ssl.CertificateMessage$T13CertificateConsumer onConsumeCertificate CertificateMessage.java 1212]
[sun.security.ssl.CertificateMessage$T13CertificateConsumer consume CertificateMessage.java 1155]
[sun.security.ssl.SSLHandshake consume SSLHandshake.java 393]
[sun.security.ssl.HandshakeContext dispatch HandshakeContext.java 476]
[sun.security.ssl.SSLEngineImpl$DelegatedTask run SSLEngineImpl.java 1207]
[java.util.ArrayList forEach ArrayList.java 1604]
[jdk.internal.net.http.common.SSLFlowDelegate lambda$executeTasks$0 SSLFlowDelegate.java 1148]
[jdk.internal.net.http.HttpClientImpl$DelegatingExecutor execute HttpClientImpl.java 168]
[jdk.internal.net.http.common.SSLFlowDelegate executeTasks SSLFlowDelegate.java 1143]
[jdk.internal.net.http.common.SSLFlowDelegate doHandshake SSLFlowDelegate.java 1109]
[jdk.internal.net.http.common.SSLFlowDelegate$Reader processData SSLFlowDelegate.java 508]
[jdk.internal.net.http.common.SSLFlowDelegate$Reader$ReaderDownstreamPusher run SSLFlowDelegate.java 283]
[jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask run SequentialScheduler.java 182]
[jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask run SequentialScheduler.java 149]
[jdk.internal.net.http.common.SequentialScheduler$TryEndDeferredCompleter complete SequentialScheduler.java 324]
[jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask run SequentialScheduler.java 151]
[jdk.internal.net.http.common.SequentialScheduler$SchedulableTask run SequentialScheduler.java 207]
[java.util.concurrent.ThreadPoolExecutor runWorker ThreadPoolExecutor.java 1095]
[java.util.concurrent.ThreadPoolExecutor$Worker run ThreadPoolExecutor.java 619]
[java.lang.Thread runWith Thread.java 1460]
[java.lang.Thread run Thread.java 1447]
[com.oracle.svm.core.thread.PlatformThreads threadStartRoutine PlatformThreads.java 832]
[com.oracle.svm.core.thread.PlatformThreads threadStartRoutine PlatformThreads.java 808]]}}
To Reproduce
Steps to reproduce the behavior:
In emacs eca-chat buffer, provide a query to llm and press enter.
Expected behavior A clear and concise description of what you expected to happen.
Doctor
Paste the relevant parts of /doctor command from chat if applicable:
ECA version: 0.56.2
Server cmd: /opt/homebrew/bin/eca server
Default model: github-copilot/gpt-4.1
Login providers:
anthropic: {}
azure: {}
deepseek: {}
github-copilot: {:step :login/done, :device-code "XXX*****XXX", :access-token "ghu*****XXX", :api-key "tid*****aae", :expires-at 1758314344}
openai: {}
openrouter: {}
z-ai: {}
Java version I am using globally on MacOS 15.7 (macOS also has been updated today to 15.7)
java --version
openjdk 21.0.8 2025-07-15 LTS
OpenJDK Runtime Environment Microsoft-11933201 (build 21.0.8+9-LTS)
OpenJDK 64-Bit Server VM Microsoft-11933201 (build 21.0.8+9-LTS, mixed mode, sharing)
I switched between openjdk and Zulu Java SDK's yet I get the same error.
Any insights appreciated. Thank you.
@CsBigDataHub it may be related with recent release which I bumped from jdk17 -> 24, so it may be related, I can't repro that, but maybe you can try the JVM one instead of graalVM native binary? you can just clone eca and run bb debug-cli
closing this, as I suspected, JVM issue.
using this version of Java SDK fixed my issue
java --version
openjdk 21.0.2 2024-01-16
OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30, mixed mode, sharing)