{ "id": "133997", "key": "AC-1283", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2015-09-04T05:35:34.000+0000", "created": "2014-07-31T20:13:30.000+0000", "labels": [ "TCSupportTriage", "cloud", "configuration-acs", "node-acs", "websocket" ], "versions": [], "issuelinks": [], "assignee": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "updated": "2016-03-08T07:37:40.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "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) \r\n\r\nI tested my 3G data connection using websocketstest.com and port 8080 would work fine. \r\n\r\nI 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. \r\n\r\nI presume there must be some way to change port on a Node.ACS example? ", "attachment": [], "flagged": false, "summary": "Cannot Change Port Number for Node.ACS Project", "creator": { "name": "jamessugrue", "key": "jamessugrue", "displayName": "James Sugrue", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jamessugrue", "key": "jamessugrue", "displayName": "James Sugrue", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "320164", "author": { "name": "stoda", "key": "stoda", "displayName": "Seth Toda", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello James,\r\nCould you just use port 443 instead? While we include socket io, we route all ports to 80 and 443. \r\nTake the following example non-mvc proxy app example:\r\n{code}\r\nrequire('http').createServer(function(req, res){\r\n\r\n\t// strip out the leading slash\r\n\tvar targetURL = String(req.url.substring(1));\r\n\r\n\t// grab the host from the url\r\n\tvar externalHost = String(url.parse(targetURL).host);\r\n\tlogger.info(\"targetURL: \"+targetURL);\r\n\tlogger.info(\"ExternalHost: \"+externalHost);\r\n\treq.url = \"\";\t\r\n\tproxy.web(req, res, {\r\n\t\ttarget: targetURL,\r\n\t\theaders: {host: externalHost}\r\n\t},function(e){\r\n\t\t//logger.info('there: '+req.url);\t\r\n\t}); \t\r\n}).listen(8001);\r\n{code}\r\n\r\nRunning this locally with 'acs run' will allow you to access the proxy on port 8001\r\n{code} \r\ncurl 127.0.0.1:8001/http://www.google.com\r\n//google webpage output\r\n{code}\r\n\r\nBut running this remotely will fail:\r\n{code}\r\ncurl :8001/http://www.google.com\r\n//timeout\r\n{code}\r\n\r\nHowever 80 will work:\r\n{code}\r\ncurl :80/http://www.google.com\r\n{code}\r\n\r\nThank you,\r\nSeth Toda", "updateAuthor": { "name": "stoda", "key": "stoda", "displayName": "Seth Toda", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-25T19:20:53.000+0000", "updated": "2014-08-25T19:20:53.000+0000" }, { "id": "320181", "author": { "name": "stoda", "key": "stoda", "displayName": "Seth Toda", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This link may help explain:\r\nhttp://docs.appcelerator.com/cloud/latest/#!/guide/node_limitations", "updateAuthor": { "name": "stoda", "key": "stoda", "displayName": "Seth Toda", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-25T20:12:03.000+0000", "updated": "2014-08-25T20:12:03.000+0000" }, { "id": "321982", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello [~jamessugrue]\r\n\r\nDid the Seth's doc help? \r\n\r\nBest Regards", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-09-05T06:31:40.000+0000", "updated": "2014-09-05T06:31:40.000+0000" }, { "id": "321985", "author": { "name": "jamessugrue", "key": "jamessugrue", "displayName": "James Sugrue", "active": true, "timeZone": "America/Los_Angeles" }, "body": "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.\r\n\r\nI'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. \r\n\r\nThanks \r\nJames", "updateAuthor": { "name": "jamessugrue", "key": "jamessugrue", "displayName": "James Sugrue", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-05T06:48:56.000+0000", "updated": "2014-09-05T06:48:56.000+0000" }, { "id": "322188", "author": { "name": "stoda", "key": "stoda", "displayName": "Seth Toda", "active": true, "timeZone": "America/Los_Angeles" }, "body": "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?\r\nHere is our link which shows how to include the startup script: http://docs.appcelerator.com/cloud/latest/#!/guide/node_config-section-scripts\r\nhttps://www.npmjs.org/doc/misc/npm-scripts.html", "updateAuthor": { "name": "stoda", "key": "stoda", "displayName": "Seth Toda", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-06T01:34:45.000+0000", "updated": "2014-09-06T01:34:45.000+0000" }, { "id": "322202", "author": { "name": "jamessugrue", "key": "jamessugrue", "displayName": "James Sugrue", "active": true, "timeZone": "America/Los_Angeles" }, "body": "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. \r\nNo matter what I do it seems that only ws://:80 would ever connect, so I'm not running on certain 3G providers. \r\nIf I use wss://:443 I can't connect from anywhere, and the same if I create a socket using ws://:443 \r\n\r\n", "updateAuthor": { "name": "jamessugrue", "key": "jamessugrue", "displayName": "James Sugrue", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-06T10:19:48.000+0000", "updated": "2014-09-06T10:19:48.000+0000" }, { "id": "323397", "author": { "name": "stoda", "key": "stoda", "displayName": "Seth Toda", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello James,\r\n\r\nI'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?\r\nhttp://websocketstest.com/", "updateAuthor": { "name": "stoda", "key": "stoda", "displayName": "Seth Toda", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-12T18:55:31.000+0000", "updated": "2014-09-12T18:55:31.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }