Fix Agent SSL Errors on Corporate Networks
Resolve SSLHandshakeException and PKIX path building failed when the Quemsi agent runs behind corporate SSL inspection on Windows, Docker, or Linux
When Do You Need This?
Many company networks inspect HTTPS traffic. A proxy decrypts outbound connections, checks them, and re-encrypts them using an internal certificate authority (CA). Your browser trusts that CA because IT installed it on your machine — but the Quemsi agent does not use the Windows or Linux certificate store by default.
You likely need this tutorial if the agent fails to start or cannot connect to Quemsi, and the logs contain errors like:
javax.net.ssl.SSLHandshakeException: PKIX path building failedunable to find valid certification path to requested targetsun.security.provider.certpath.SunCertPathBuilderException- Connection failures to
https://quemsi.comeven though your browser opens the site normally
This commonly affects:
- Docker containers on Windows (Docker Desktop) or Linux in a corporate environment
- Windows native agent (
quemsi-agent.exe) on a company laptop or server - Linux agent binaries installed via the install script or systemd
You do not need this tutorial if
- The agent connects to an on-premises Quemsi server over HTTP (no TLS) on your internal network
- You are running entirely outside a corporate proxy (home network, isolated lab, etc.)
- The error is about connecting to your database rather than to the Quemsi API — see our SQL Server TCP tutorial or database connection docs instead
Why This Happens
The Quemsi agent is shipped as a GraalVM native binary. Unlike a regular Java application, it embeds a fixed set of trusted root certificates at build time. It does not automatically pick up certificates from:
- Windows Certificate Manager
- Linux
/etc/ssl/certs - Docker's OS-level CA bundle (when running the native binary inside a container)
When your network's SSL inspection proxy presents a certificate signed by your company's root CA, the agent rejects it because that CA is not in its embedded trust store.
Security note
Only add certificates from your own IT department. Never disable certificate validation or use "trust all" settings in production. Importing your company's official root CA is the correct and secure approach.
Confirm the Diagnosis
Before changing configuration, verify that SSL inspection is the cause:
- Open
https://quemsi.comin your browser on the same machine — it should work. - Check the agent logs for
PKIX path building failed. - Optionally, inspect the certificate your network presents:
If the certificate issuer is your company (e.g. Zscaler, Blue Coat, Netskope, or an internal CA name) rather than a public CA like Let's Encrypt or DigiCert, this tutorial applies.
Prerequisites
Before You Begin
- Your Quemsi agent CLIENT-ID and CLIENT-SECRET (from the Quemsi console)
- Your company's root CA certificate in
.crtor.pemformat — ask IT if you don't have it - Java keytool (included with any JDK 11+, or download a JDK). On Windows, it is typically at
C:\Program Files\Java\jdk-21\bin\keytool.exe - Write access to create a truststore file and mount it into Docker or reference it from the agent
Step-by-Step Fix
Obtain Your Company Root CA Certificate
Option A — Ask IT (recommended)
Request the corporate root CA certificate file used for HTTPS inspection. Most IT teams provide this as a .crt or .pem file.
Option B — Export from Windows
- Press Win + R, type
certmgr.msc, and press Enter - Navigate to Trusted Root Certification Authorities → Certificates
- Find your corporate root CA (look for your company name or a known proxy vendor)
- Right-click → All Tasks → Export
- Choose Base-64 encoded X.509 (.CER) and save as
corp-ca.crt
Option C — Export from the browser
Visit https://quemsi.com, click the padlock icon → certificate details → export the root CA from the chain.
Create a Java Truststore
Create a truststore that includes your corporate CA. Run this once on any machine that has keytool:
Windows (PowerShell):
Linux / macOS:
If your company uses multiple CAs in the chain, import each one with a different -alias into the same truststore file.
Tip
You can start from the default Java cacerts and add your CA on top, so public sites keep working:
Configure the Docker Agent
Mount the truststore into the container and tell the agent to use it.
Docker run (PowerShell on Windows):
Docker Compose:
Docker environment variable names
Use CLIENT_ID and CLIENT_SECRET (underscores) in Docker. Names with hyphens like CLIENT-ID are removed by the container shell and will not work.
Older images without TRUSTSTORE_PATH support — pass Java system properties directly:
Verify
After starting the container, check the logs. The agent should connect successfully and appear as online in the Quemsi console within a minute.
Configure the Windows Native Agent (.exe)
If you run the agent directly on Windows (not in Docker), pass the truststore as JVM-style arguments:
For a persistent Windows service, add these -D flags to the ExecStart line in your service definition or startup script.
Configure the Linux Agent (systemd)
If you installed the agent with the Quemsi install script, edit the systemd unit or environment file:
Then reload and restart:
Alternative: Use HTTP to an On-Premises Server
If you host Quemsi inside your own network (not via https://quemsi.com), you can avoid TLS entirely by pointing the agent at HTTP endpoints:
This is suitable for isolated internal deployments where traffic never leaves your network. For cloud-hosted Quemsi (https://quemsi.com), you must configure the truststore as described above.
Troubleshooting
Browser works, agent still fails
This confirms the issue is the agent's trust store, not network connectivity. Double-check that:
- The truststore file path inside the container matches the mount path exactly
- You imported the root CA, not just an intermediate certificate
- The truststore password matches what you configured
Multiple corporate CAs
Some networks use separate CAs for different services. Import every CA in the chain shown by openssl s_client -showcerts, each with a unique -alias.
Permission denied on truststore file
Ensure the agent process can read the truststore. On Linux, chmod 644 on the file is usually sufficient. In Docker, mount as read-only (:ro).
Still failing after truststore setup
- Verify the agent can reach the network at all (DNS, firewall, proxy hostname)
- Check whether your company requires an HTTP proxy in addition to SSL inspection — that is a separate configuration
- Contact your IT team to confirm which root CA signs outbound HTTPS traffic
- Share agent logs with Quemsi support if the error message differs from PKIX / certificate path errors
Need help?
If you are stuck, gather the agent log output (redact your CLIENT-SECRET), the result of openssl s_client -connect quemsi.com:443, and your deployment method (Docker, Windows exe, Linux). This helps support and IT teams diagnose quickly.
Agent Connected?
Once SSL is resolved, continue with datasource setup, storage configuration, and your first backup flow.
Continue with Getting StartedNext Steps
- Getting Started Guide — connect storage, datasources, and run your first flow
- Architecture Overview — understand agent deployment options
- Create Read-Only Database User — secure production database access
- Explore more tutorials