2

So I have installed the Apostrophe-CMS per http://aclouda.com/blog/services/how-to-install-apostrophe-content-management-system-on-ubuntu/ on my Oracle Cloud Infrastructure Ubuntu compute instance and I configured my security list to allow port 3000.

node app.js results in "Listening at http://localhost:3000"

When attempting to reach the server over port 3000 either in telnet or browser, it times out.

Checking sudo netstat -tunlp | grep :3000 results in:

tcp6    0   0 :::3000        :::*        LISTEN     1397/node

I am not seeing a tcp 127.0.0.1:3000 line item which I would expect to see. Is there something I need to do to set the app to listen on port 3000 for tcp?

Leonardo Dagnino
  • 2,914
  • 7
  • 28
Rich Wi
  • 21
  • 3
  • 1
    It is listening over TCP, it doesn't know how to listen over anything else. Does this work when you run it *on the server itself*? wget http://localhost:3000/ If so then the firewall is, somehow, still the issue. However best practice is to set up a frontend proxy such as nginx rather than exposing nodejs directly. – Tom Boutell Jun 17 '20 at 00:24
  • 1
    That's `wget http://localhost:3000/` – Tom Boutell Jun 17 '20 at 00:37
  • You are right, wget works: Connecting to localhost (localhost)|127.0.0.1|:3000... connected. Though I am not sure what else to change in OCI. The only place they offer is the security list ingress settings which i currently have set to allow all incoming to reach port 3000. This is just a test out the product server, i for sure would do something different if this were to be prod. For now, we are just trying to check the product out. FYI - ufw is disabled. I verified that as well. – Rich Wi Jun 17 '20 at 02:31
  • 1
    This comment resolved my issue: https://stackoverflow.com/a/54810101/13759151 It is related to iptables that oracle applies. – Rich Wi Jun 17 '20 at 03:42
  • Cool, you should post an answer to your own question. Glad you were able to resolve it. – Tom Boutell Jun 17 '20 at 11:02

1 Answers1

0

This was related to Oracle using iptables by default. Solution identified in this stackoverflow comment.

Rich Wi
  • 21
  • 3