6

I have tried to use managed vm to run an web socket server over port 3000 but i can only connect to it via the ip of the instance, and not by my own domain or "appspot" domain.

When i access the app on port 80 i get the right response that the app sends out on port 8080.

my app.yaml:

network:
  forwarded_ports:
  - 3000

handlers: 
- url: /.*
  script: server.js

I also enabled the port on the firewall to 0.0.0.0/0.

How can i fix this?

Dor Shay
  • 189
  • 11

1 Answers1

3

This is currently expected behaviour of the appspot and custom domains front-end servers. Unfortunately, IP-of-instance is what you'll need for now, although I highly recommend you to star the relevant public issue tracker feature request thread, so that it gets higher priority and accelerates the appearance of a solution from the pipeline.

Nick
  • 3,581
  • 1
  • 14
  • 36
  • So right now there is no way to use websocket over managed vm without sending the client to specific machine? – Dor Shay Jun 01 '15 at 21:18
  • As you can see from the feature request text, and as you yourself observed, while ports can be opened on the instance, the appspot and custom domain front-ends don't appear to forward those ports. You can implement a quick service that looks up your instance IPs prior to connecting via those IPs, but the only gotcha is that SSL certificates are unlikely to validate when connecting in this manner (unless you put SNA slots to extend your cert for each of the dynamic instance IPs you might end up with) – Nick Jun 01 '15 at 21:23
  • This all is to say, yes, you are correct, for now, although I'm sure this is being worked on with priority by the Managed VMs product team, as it's already come up before and has a public issue tracker thread with several stars already. – Nick Jun 01 '15 at 21:24
  • Thank you :) i suppose there is no eta for this option... Too bad. I will put my app to sleep util a solution will be found and continue to use self managed vm – Dor Shay Jun 01 '15 at 21:27
  • I'd recommend you to star the public issue tracker issue, as this will increase the priority of the issue. – Nick Jun 01 '15 at 21:27