1

The problem is in my setting, because I am accessing localhost.

When I execute in terminal:

curl http://localhost

The response is:

curl: (52) Empty reply from server

But it should say:

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

UPDATE:

When I execute

curl http://localhost:3000

The response is:

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

UPDATE(2)

sudo lsof -i :80

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME

acwebseca 42015 root 36u IPv4 0x2e120362d0318e9b 0t0 TCP

192.168.0.109:52299->151.101.129.69:http (ESTABLISHED) ...

Do you have any ideas ?

Jagatveer Singh
  • 185
  • 2
  • 12
deny7ko
  • 2,323
  • 8
  • 38
  • 69

2 Answers2

0

Check port conflict with following command (Mac) and close applications using same port:

lsof -n -i4TCP:$PORT | grep LISTEN
lsof -n -iTCP:$PORT | grep LISTEN
lsof -n -i:$PORT | grep LISTEN

Substitute $PORT with the port number or a comma-separated list of port numbers.

Prepend sudo (followed by a space) if you need information on ports below #1024.

Yao Li
  • 1,791
  • 1
  • 22
  • 23
-1

I had application which was constantly restarting on port 80. I uninstalled the application and it solved it

deny7ko
  • 2,323
  • 8
  • 38
  • 69