Credentials
Diagnosing why credentials aren't being used during discovery — file read failures, PEM errors, and authentication issues.
Symptoms: You've configured a credential (SNMP or Docker Proxy) but it isn't being applied to hosts during discovery. The "Credential Mappings" summary at the end of a scan session shows 0 hosts for the credential type.
The daemon logs credential diagnostics at three points during a scan session. To access logs, see Checking Daemon Logs.
Credential summary at session start
At the beginning of each discovery session, the daemon logs a summary of all configured credentials:
INFO Credentials:
INFO For Docker proxy connection on 192.168.4.126
INFO Port 2376
INFO SSL cert successfully read from /path/to/client-cert.pem
INFO SSL key successfully read from /path/to/client-key.pem
INFO SSL chain successfully read from /path/to/ca.pem
WARN For Docker proxy connection on 192.168.4.127
INFO Port 2376
ERROR SSL cert failed to read from /non-existent.pem
ERROR SSL key failed to read from /non-existent.pem
ERROR SSL chain failed to read from /non-existent.pem
INFO For SNMP queries on all scanned hosts
INFO Community ******** (10 chars)
INFO Version V2cWhat to look for:
- INFO on all fields — credential loaded successfully and will be tried during the scan
- ERROR on file fields — the daemon couldn't read a certificate or key file. The credential will not be used. Fix the file path or permissions and restart the daemon.
- WARN on the credential header — at least one field has an error. Check the indented lines below for details.
For SNMP credentials, the community string is redacted but the character count is shown — useful for confirming the right credential was picked up.
File read errors during the scan
When the daemon resolves credential file paths, it logs each read attempt. Errors appear as ERROR lines:
ERROR Failed to resolve Docker credential file paths
error=Failed to read ssl_cert from /non-existent.pem: No such file or directory (os error 2)
ip=192.168.4.127ERROR Failed to resolve Docker credential file paths
error=SSL Certificate must contain a CERTIFICATE PEM block, found: PRIVATE KEY
ip=192.168.4.126Common file errors:
| Error | Cause | Fix |
|---|---|---|
No such file or directory | File path doesn't exist on the daemon host | Correct the path in the credential, or ensure the file is mounted/copied to the daemon host |
Permission denied | Daemon process can't read the file | Fix file permissions (chmod 644) or run the daemon as a user with access |
must contain a CERTIFICATE PEM block, found: PRIVATE KEY | Certificate and key files are swapped | Check which file contains BEGIN CERTIFICATE vs BEGIN PRIVATE KEY and swap the paths |
must contain a PRIVATE KEY PEM block, found: CERTIFICATE | Same as above, opposite direction | Swap the cert and key file paths |
Credential mappings at session end
At the end of each discovery session, the daemon logs how many hosts each credential type was successfully applied to:
INFO Credential Mappings:
INFO SNMP: 12 hosts
INFO Docker: 2 hostsIf a credential type shows 0 hosts, the credential was loaded but never successfully used during the scan. This means either:
- File/path errors prevented the credential from loading — check the session start summary and file read logs above
- The credential was loaded but authentication failed on every target host — see below
- The credential isn't assigned to any network or host — see Credential assignment
Credential loaded but not assigned to hosts
A credential can load from disk without errors but still show 0 hosts in the mapping summary. This happens when the actual authentication or connection attempt fails on the target device:
- SNMP: The community string was rejected by the device (wrong string, ACL blocking the daemon's IP, or SNMPv2c disabled)
- Docker Proxy: The TLS handshake failed (expired cert, CA mismatch), the proxy refused the connection, or the proxy is blocking required API endpoints
Diagnosis: Look for per-host errors in the scan logs between the session start and session end summaries. SNMP failures appear as timeout or authentication errors; Docker failures appear as connection or TLS errors.
Resolution:
- For SNMP, verify the community string works from the daemon host using
snmpwalk— see Verify device responds to SNMPv2c - For Docker Proxy, verify the proxy is reachable and the certificate is accepted — see Docker Proxy troubleshooting
Quick reference
| Symptom | Where to look | Likely cause |
|---|---|---|
| ERROR in session start summary | Credential file paths | File missing or unreadable |
| "must contain a CERTIFICATE/PRIVATE KEY PEM block" | File read logs | Cert and key files swapped |
| Credential Mappings shows 0 hosts | Session end summary | Auth failed, or credential not assigned |
| Credential not listed at all | Session start summary | Credential not assigned to any network or host |