elastic / apm-agent-python

https://www.elastic.co/guide/en/apm/agent/python/current/index.html
BSD 3-Clause "New" or "Revised" License
412 stars 219 forks source link

Python Agent unable to connect to APM-server #1018

Open rodaddy opened 3 years ago

rodaddy commented 3 years ago

Errors when trying to send message to APM Server from non framework python test application.

Environment (please complete the following information)

Additional context

Add any other context about the problem here.

beniwohli commented 3 years ago

Hey @rodaddy

I think the error message (urllib3.exceptions.SSLError: Fingerprints did not match. Expected "13efb...", got "b'81799...'") is due to the fact that urllib3 uses hexlify when creating the error message (here). hexlify returns a bytestring. The actual comparison uses bytestrings for both the given fingerprint and the certificate.

As for why the fingerprint doesn't match the expected value, I'm not quite sure. Does the entrust-chain.crt file contain -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- markers, and is the first certificate in the file your end user certificate?

basepi commented 3 years ago

@rodaddy Any updates here?