Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem: curl: (7) Failed to connect to localhost port 1080: Connection refused

Tags:

java

curl

I have a problem to send requests to the backend of my project, I already tried deactivating the firewall and proxy but did not get results. As far as I can see, there is a port through which my request passes first and it doesn't let me get to the backend.

I already tested with cURL by console and Postman but there was no result. By console I get this error:

curl: (7) Failed to connect to localhost port 1080: Connection refused

The project is made in Java with Spring and I use webservices.

Here is an example of my request:

curl http://localhost:9081/auth/login/

And this is the result request

curl: (7) Failed to connect to localhost port 1080: Connection refused

What can i do?

like image 306
Matias Rolon Avatar asked May 27 '19 23:05

Matias Rolon


1 Answers

Check if you have env variable HTTP_PROXY set. In My case, after removing the the environment variable.. 'curl' command executed successfully.

like image 57
user12113116 Avatar answered Oct 02 '22 22:10

user12113116