Reputation: 1236
This question is on similar lines as this - Node.js connect only works on localhost - with the exception AFAIK that the only configuration available in Strongloop is the config.json.
I have tried using "0.0.0.0" in the config.json host value as shown below, but the netstat still shows it is bound only to 127.0.0.1
{
"host": "0.0.0.0",
"restApiRoot": "/api",
"host": "0.0.0.0",
"port": 3000,
"remoting": {
"context": {
"enableHttpContext": false
},
...
...
This is the log of netstat:
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:51733 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:3000 0.0.0.0:* LISTEN
This is my network config:
vagrant@precise64:~/projects/loopback-example-offline-sync/server$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 08:00:27:88:0c:a6
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe88:ca6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7428 errors:0 dropped:0 overruns:0 frame:0
TX packets:7205 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4740627 (4.7 MB) TX bytes:3865969 (3.8 MB)
eth1 Link encap:Ethernet HWaddr 08:00:27:bf:af:6b
inet addr:33.33.33.10 Bcast:33.33.33.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:febf:af6b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1325 errors:0 dropped:0 overruns:0 frame:0
TX packets:1565 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:101155 (101.1 KB) TX bytes:238095 (238.0 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:909 errors:0 dropped:0 overruns:0 frame:0
TX packets:909 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3429927 (3.4 MB) TX bytes:3429927 (3.4 MB)
I am able to SSH into the vagrant box using 33.33.33.10. Replacing 0.0.0.0 with 33.33.33.10 also did not work. I tried removing the host attribute completely from the config, that didn't work either. UFW is disabled.
I have no other option to try, hence posting on SO :-)
Upvotes: 1
Views: 160
Reputation: 1236
Ok. I figured it out. The config is actually driven from Gruntfile.js. It's too confusing. There are too many places the host is defined.
Upvotes: 1