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
Denys Medynskyi
  • 2,353
  • 8
  • 39
  • 70

2 Answers2

0

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

Denys Medynskyi
  • 2,353
  • 8
  • 39
  • 70
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
  • 2,071
  • 1
  • 25
  • 24