Curl : connection refused

前端 未结 3 666
盖世英雄少女心
盖世英雄少女心 2020-12-06 16:59

I got the following error while running curl:

curl: (7) Failed to connect to 127.0.0.1 port 8080: Connection refused.

It seems

相关标签:
3条回答
  • 2020-12-06 17:17

    Try curl -v http://localhost:8080/ instead of 127.0.0.1

    0 讨论(0)
  • 2020-12-06 17:34

    Make sure you have a service started and listening on the port.

    netstat -ln | grep 8080
    

    and

    sudo netstat -tulpn
    
    0 讨论(0)
  • 2020-12-06 17:40

    127.0.0.1 restricts access on every interface on port 8000 except development computer. change it to 0.0.0.0:8000 this will allow connection from curl.

    0 讨论(0)
提交回复
热议问题