GuzzleHttp\Exception\ConnectException: Connection refused for URI errors When Setting Up Local Development Environment

58 Views Asked by At

I'm encountering multiple connection refused errors while attempting to configure a local development environment for the website on my Windows desktop. The website application is based on Drupal 10, and there are some modules designed to fetch data from various external URLs, I am getting the following error

GuzzleHttp\Exception\ConnectException: Connection refused for URI https://auth.mywebsite.io/connect/token

This is happening for multiple URLs. Interestingly, these URLs are accessible via web browsers, indicating they are not blocked at the network level. However, attempts to ping these URLs from the command line result in unsuccessful responses.

2

There are 2 best solutions below

0
NKP On

There could be a lot of probable causes, however one important thing to check would be if you are behind a proxy.

If yes, you'll need to route your requests through the proxy

0
deronimo On

Have you tried the verbose flag in your curl call to help in debugging?

e.g. curl-v https://auth.mywebsite.io/connect/token