Introduction
If you encounter a ‘Connection Refused’ error when using Chainstack endpoints, it may be due to an issue with the root certificates on your computer. Root certificates are used to validate the SSL certificates that encrypt the communication between your code and your node. You may need to update the root certificates manually to resolve the error.
Update your OS version
The first step is to check your OS version and make sure it is up-to-date.
For Windows 10 users, the minimum required version is 19044 (21H2). You can check your version by pressing the Windows logo key + R, typing winver in the Open box, and selecting OK. If your version is lower than 19044, please run Windows Update to manually force any pending updates.
For Mac users, there is no specific version requirement, but you should always keep your OS updated.
Update the Python library “certifi”
The next step is to update the Python library “certifi” which provides the root certificates for Python. You can do this using pip or pip3 depending on your installation:
pip install --update certifi
pip3 install --update certifi
Update the root certificates manually
The final step is to update the root certificates from the Let’s Encrypt certificate authority that Chainstack uses for its SSL certificates.
Download and install the following files (double-click once they are downloaded):
- https://letsencrypt.org/certs/isrgrootx1.der
- https://letsencrypt.org/certs/isrg-root-x2.der
- https://letsencrypt.org/certs/lets-encrypt-r3.der
- https://letsencrypt.org/certs/lets-encrypt-e1.der
Conclusion
After updating the root certificates, reboot your system and try your code again. This should resolve the ‘Connection Refused’ error when using Chainstack endpoints.
If you have any further questions or concerns, please feel free to contact Chainstack Support with any questions by emailing support@chainstack.com or submitting this form.
Comments
0 comments
Article is closed for comments.