Replies: 8 comments 19 replies
-
you have an outstanding issue which shows you have an issue with lets ecnrypt creating a newer RSA key then meshcentral supports |
Beta Was this translation helpful? Give feedback.
-
Hey @si458 ... yes, I've already reviewed that, but these are RSA keys (we're asking specifically for them) as opposed to ECDSA... |
Beta Was this translation helpful? Give feedback.
-
I've no idea if this has anything to do with anything, but earlier as I was inspecting the differences between the two certs, I did notice the following when reviewing the structure of the certificates in the web browser and the location of the Certificate Signature Algorithm:
Note that the Extensions section is no longer in the newer cert, but placed one level up in the structure. |
Beta Was this translation helpful? Give feedback.
-
Also just found out how to log meshagent connections, so added
|
Beta Was this translation helpful? Give feedback.
-
I stop the service and then run it as a command line, and get a little more in stdout and the log file:
log file:
|
Beta Was this translation helpful? Give feedback.
-
Ok @si458 - another element that hasn't helped is that our proxy servers weren't refreshing in the manner we were expecting, leading us in having mismatches between front end and back end certificates. Now that we're aware of this, we're able to keep an eye on ensuring they don't throw up red herrings... So, I have now less than 24 hours to sort this out and I have a couple more comments / thoughts:
|
Beta Was this translation helpful? Give feedback.
-
Hi @si458, I'm working with @D4V3M0NK on this while he is on a plane. Thanks for your help thus far. On our proxy, we are seeing this:
Does this offer any clues? It seems that this would reinforce the theory of a cert issue. Also, as best as I can tell, the CPU is thrashing on this machine. Please keep in mind that new machines added to the sever ping in and connect with no problems. It's the already set up machines that are not connecting. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Hi All, while this continues to remain a mystery, we are out of the woods. The solution was to reinstall the agents. But it was a bit of a juggling act: The issue was not with MC or with the Proxy, it seems. But, we were able to determine that switching back and forth between the two certs caused the agents to register and deregister with the cert. Supplemented with the fact that newer agents would connect as expected, we decided to do the following:
The script would uninstall and reinstall the agent at a specific time to register with MC via the new cert. This indicates that the agents were "caching" some kind of reference to the old certificate, and wasn't responding to the fact that the certificate had changed. This behavior also survived a restart of the machine intended to clear out any memory artifacts (one note: I'm 100% confident that the restart test took place, so don't rely too much on that - they said they restarted it...). We stand ready to assist in any troubleshooting, so please reach out with any questions. Many thanks again to @si458 for his invaluable assistance and going above and beyond with this matter. Couldn't have resolved with without you. Cheers! |
Beta Was this translation helpful? Give feedback.
-
Greetings Simon and the MC2 community as a whole - I trust that this finds you all well and healthy...
We use Lets Encrypt certificates (with SANs) on our proxy servers and then utilize the
certUrl
configuration option within MC2 (we have to have encrypted traffic behind the proxy servers too) to have the agents double check the front end and back end certs upon connection. We then have an automated process to renew the certs every 85 days, update the proxy servers and then update the file thatcertUrl
points to. All has been working without issue for a couple of years.We have a cert that will be expiring within the next couple of days. When I start up the MC2 server it states the following:
(Note the cert hash...) and all the agents connect, happy as Larry.
Now we generate a new LE cert, apply it to the proxy servers and as soon as we do that, remotes start falling off of the MC2 server's UI and the server begins to post messages about the agents certificate not matching:
This makes sense - the agents have been using the "192cc6d2de" hash cert up until now and it appears that the proxy servers new LE cert has a SHA384 cert hash starting with f345c0b0b6. We've not yet updated the
myexternalcert.crt
file...So, I now update
myexternalcert.crt
with the new cert and restart MC2, but to my surprise I'm getting the exact same hash being reported...(I am assuming that this is the hash on the
certUrl
). The server loads, but none of the agents connect, they certainly don't come "live" within the interface and I no longer get the(Agent:192cc6d2de != Server:f345c0b0b6 or 34ec5ba5b9)
messages... I got to thinking that perhaps they're cached on the agent for a short period of time, but I've left this new certificate loaded for at least 30 minutes, and still no joy. I've even checkedopenssl x509 -noout -dates -in myexternalcert.crt
and the certificate is good until early next year, so I know that the cert has the latest information - but the fact that MC2 is still reading and showing the same SHA384 hash makes me a little confused.The key hash does - however - change...
Can anyone point me in a direction to further my investigation? Unfortunately I have no access to the remotes so I can't see what they're reporting...
Beta Was this translation helpful? Give feedback.
All reactions