[AC-1283] Cannot Change Port Number for Node.ACS Project
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Won't Fix |
Resolution Date | 2015-09-04T05:35:34.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | TCSupportTriage, cloud, configuration-acs, node-acs, websocket |
Reporter | James Sugrue |
Assignee | Mostafizur Rahman |
Created | 2014-07-31T20:13:30.000+0000 |
Updated | 2016-03-08T07:37:40.000+0000 |
Description
Due to limitations on some 3G data networks, I need to change the port for my Node.ACS server, using websockets. This is because port 80 (the default) is blocked by some providers (see here for an example of this http://stackoverflow.com/questions/5557776/websockets-over-a-3g-connection)
I tested my 3G data connection using websocketstest.com and port 8080 would work fine.
I tried following the node configuration on the CLI as detailed here (http://docs.appcelerator.com/cloud/latest/#!/guide/node_cli_config). However this didn't work.
I presume there must be some way to change port on a Node.ACS example?
Hello James, Could you just use port 443 instead? While we include socket io, we route all ports to 80 and 443. Take the following example non-mvc proxy app example:
Running this locally with 'acs run' will allow you to access the proxy on port 8001
But running this remotely will fail:
However 80 will work:
Thank you, Seth Toda
This link may help explain: http://docs.appcelerator.com/cloud/latest/#!/guide/node_limitations
Hello [~jamessugrue] Did the Seth's doc help? Best Regards
I tried using port 443 to connect instead of 80 - that didn't work. And the limitations doc says that only one port can be used anyway. I'm deploying the app from the command line. Do you have an example of how to use an external script so that the port number can be changed? Anything I've tried there has failed. Thanks James
Hello James, I have not used the external script feature. 443 to https and 80 to http are blocked by your 3G data provider? What range of ports do they generally allow? Here is our link which shows how to include the startup script: http://docs.appcelerator.com/cloud/latest/#!/guide/node_config-section-scripts https://www.npmjs.org/doc/misc/npm-scripts.html
It seems to be a security thing on some 3G providers that port 80 is blocked for non-http calls. In my case I'm using a websocket call. No matter what I do it seems that only ws://
Hello James, I've been doing some research on your behalf and am find that a lot of 3G providers do not play nice with web sockets. [Here](http://blog.hekkers.net/2012/12/09/websockets-and-mobile-network-operators/) is an article depicting a scenario very similar to yours. Also, can you check to see if you pass this online test via 3G? http://websocketstest.com/