cloudius-systems / osv-apps

OSv Applications
136 stars 74 forks source link

express-example, is nodejs running? #45

Open Molnfront opened 9 years ago

Molnfront commented 9 years ago

I run: sudo capstan run Created instance: node-express-example OSv v0.23 eth0: 10.0.2.15 Waiting for connection from host...

I noted that the eth0 interface does not use any of my IP addresses and localhost:3000 does not give any response. How do I change so that vbox uses localhost?

Molnfront commented 9 years ago

I also tried to bridge it: sudo capstan run -n bridge -b lo0 -p vbox

Created instance: node-express-example

dial unix /Users/captest/.capstan/instances/vbox/node-express-example/node-express-example.sock: no such file or directory

I tried to start it from virtualbox manager with NAT and got:

NamedPipe#0 failed to bind to local socket /Users/captest/.capstan/instances/vbox/node-express-example/node-express-example.sock (VERR_FILE_NOT_FOUND).

My environment: OSX 10.9.5. Virtualbox: 4.3.30 r101610, Capstan v0.1.8

Molnfront commented 9 years ago

I can run osv in virtualbox following this instruction with vboxnet0: https://github.com/cloudius-systems/osv/wiki/Running-OSv-on-VirtualBox

But not express-example with vboxnet0.

Molnfront commented 9 years ago

Now I have tried node-express: web-service and hello-world and also node-red (https://github.com/node-red/node-red.git). With capstan I built, run stopped, changed permissions and started with virtualbox so I could access it from another virtual machine in virtual box or parallells.

First I got: NamedPipe#0 failed to bind to local socket /Users/nodetest/.capstan/instances/vbox/node-express-example/node-express-example.sock (VERR_FILE_NOT_FOUND).

I deactivated Port 1 under Settings -> Ports.

The settings was: Ports Port 1: COM1 IRQ 4 Mode: Host pipe. Create pipe. Port file path: /Users/nodetest/.capstan/instances/vbox/node-express-example/node-express-example.sock

Configured each instances net:

Only Host card: vboxnet0 (virtio-net).

Started osv and it runs on 192.168.56.105

Started a Ubuntu VB also with only host card: vboxnet0 (virtio-net).

Tested to access: http://192.168.56.105:8000/ from the Ubuntu instance. Worked as expected!

Tested to access: http://192.168.56.105:3000 and http://192.168.56.105:3000/api (web-service example) Did not work. No other worked either. How can I debug to see if node is running? Is there some way to do a console output?