Just got off meeting screen-share with the parallels team member (thank you, you were awesome!!).
So.... Running a simple Python webserver on the MacOSX host via
python -m SimpleHTTPServer totally works. I can connect using
Parallels/Windows10/Edge to
http://10.211.55.2:8000, so we know that Parallels can connect to my
localhost just fine, nothing wrong there..
Turns out that Angular2's (angular-cli's actually)
ng serve only accepts connections on
localhost and
127.0.0.1, which is why the VM couldn't connect, it's coming from
10.211.55.2 (when in Shared Network mode). Looks like we need to configure Angular2 (or '
ng serve') to accept this address by using the
--host flag:
ng serve --host=0.0.0.0 --port 4200 # allow access for any IP address
netstat -an | grep 4200 would have shown me that port
4200 only works with
127.0.0.1:
simple python webserver:
> netstat -an | grep 8000
tcp4 0 0 *.8000 *.* LISTEN
angular2 webserver running with 'ng serve':
> netstat -an | grep 4200
tcp4 0 0 127.0.0.1.4200 127.0.0.1.58469 ESTABLISHED
tcp4 0 0 127.0.0.1.58469 127.0.0.1.4200 ESTABLISHED
tcp4 0 0 127.0.0.1.4200 *.* LISTEN
As an aside:
Why did Virtualbox/Windows10/Edge connect to Angular2 using their 'loopback' address http://10.0.2.2:4200 when Parallels/Windows10/Edge could not? Virtualbox must do something differently than Parallels then, spoofing localhost, or something, when using their loopback 10.0.2.2 address. Might be a nice feature for Parallels to have a magic loopback address that 'just works' like Virtualbox's does...... Even if not enabled by default, maybe we could enable it in the Hardware / Network area...Click to expand...