0

I can see my services using docker-compose ps, but I cannot reach them using browser through localhost:4000 or localhost:4001. Always get "ERR_CONNECTION_REFUSED".

MacBook-Pro-User:my-new-project user$ docker-compose ps
      Name             Command             State              Ports       
-------------------------------------------------------------------------
video-storage      docker-            Up                 0.0.0.0:4000->80 
                   entrypoint.sh                         /tcp             
                   /bin/ ...                                              
video-streaming    docker-            Up                 0.0.0.0:4001->80 
                   entrypoint.sh                         /tcp             
                   /bin/ ...                                              
Oleg Tretiakov
  • 159
  • 1
  • 12

1 Answers1

0

I found a solution. Inside containers I have Node.js services which listening to PORT 80. It leads to exception nodejs: listen EACCES: permission denied 0.0.0.0:80.

2 possible solutions:

  1. Use port above 1023.
  2. Or listen ports as privileged user.

More on this topic: nodejs: listen EACCES: permission denied 0.0.0.0:80

Node.js EACCES error when listening on most ports

Oleg Tretiakov
  • 159
  • 1
  • 12