{"action":"created","issue":{"url":"https://api.github.com/repos/mcavage/node-restify/issues/751","labels_url":"https://api.github.com/repos/mcavage/node-restify/issues/751/labels{/name}","comments_url":"https://api.github.com/repos/mcavage/node-restify/issues/751/comments","events_url":"https://api.github.com/repos/mcavage/node-restify/issues/751/events","html_url":"https://github.com/mcavage/node-restify/issues/751","id":57705538,"number":751,"title":"Server creation fails (bad server.url) on Travis CI for NodeJS v11 and io.js v1.2.0","user":{"login":"ArminTamzarian","id":1813148,"avatar_url":"https://avatars.githubusercontent.com/u/1813148?v=3","gravatar_id":"","url":"https://api.github.com/users/ArminTamzarian","html_url":"https://github.com/ArminTamzarian","followers_url":"https://api.github.com/users/ArminTamzarian/followers","following_url":"https://api.github.com/users/ArminTamzarian/following{/other_user}","gists_url":"https://api.github.com/users/ArminTamzarian/gists{/gist_id}","starred_url":"https://api.github.com/users/ArminTamzarian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArminTamzarian/subscriptions","organizations_url":"https://api.github.com/users/ArminTamzarian/orgs","repos_url":"https://api.github.com/users/ArminTamzarian/repos","events_url":"https://api.github.com/users/ArminTamzarian/events{/privacy}","received_events_url":"https://api.github.com/users/ArminTamzarian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-14T20:31:09Z","updated_at":"2015-02-14T21:01:23Z","closed_at":null,"body":"Myy project [node-misfit](https://github.com/ArminTamzarian/node-misfit) uses node-restify to build a [mock service](https://github.com/ArminTamzarian/node-misfit/blob/master/test/mock-api.misfitwearables.com.js) for unit testing. While running just fine locally (OSX - NodeJS v0.10.29) when I push the current in progress code to Github Travis CI tests the build with what appears to be an invalid URL detected.\r\n\r\nSpecifically my code for creating the server is as follows:\r\n```javascript\r\nvar mock = function (options, callback) {\r\n          var server = restify.createServer();\r\n          server.use(restify.bodyParser());\r\n\r\n          // routing logic...\r\n\r\n          server.listen(options.port, function() {\r\n            console.log(server); // for debugging this issue\r\n            console.log(server.url); // for debugging this issue\r\n            callback();\r\n        });\r\n```\r\n\r\nWhile I am testing on NodeJS v0.11.x, v0.10.x and io.js v1.2.x my tests only pass on NodeJS v0.10.x (which makes since as the current version of io.js was forked from the NodeJS v0.11 branch). On startup I am outputting the URL created by the server startup, and the results are as follows:\r\n\r\n* **NodeJS v0.11** - server.url -> `http://:::8000`\r\n* **NodeJS v0.10** - server.url -> `http://0.0.0.0:8000`\r\n* **io.js v1.2** - server.url -> `http://:::8000`\r\n\r\nFor more information see the Travis CI output for the referenced build: https://travis-ci.org/ArminTamzarian/node-misfit/builds/50702849\r\n\r\nSo, I'm not sure if there is an issue between restify and the current configuration of Travis CI or if there is a bug between restify and the NodeJS v0.11 branch (or if I am doing something egregiously wrong). Any assistance would be appreciated."},"comment":{"url":"https://api.github.com/repos/mcavage/node-restify/issues/comments/74391771","html_url":"https://github.com/mcavage/node-restify/issues/751#issuecomment-74391771","issue_url":"https://api.github.com/repos/mcavage/node-restify/issues/751","id":74391771,"user":{"login":"ArminTamzarian","id":1813148,"avatar_url":"https://avatars.githubusercontent.com/u/1813148?v=3","gravatar_id":"","url":"https://api.github.com/users/ArminTamzarian","html_url":"https://github.com/ArminTamzarian","followers_url":"https://api.github.com/users/ArminTamzarian/followers","following_url":"https://api.github.com/users/ArminTamzarian/following{/other_user}","gists_url":"https://api.github.com/users/ArminTamzarian/gists{/gist_id}","starred_url":"https://api.github.com/users/ArminTamzarian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArminTamzarian/subscriptions","organizations_url":"https://api.github.com/users/ArminTamzarian/orgs","repos_url":"https://api.github.com/users/ArminTamzarian/repos","events_url":"https://api.github.com/users/ArminTamzarian/events{/privacy}","received_events_url":"https://api.github.com/users/ArminTamzarian/received_events","type":"User","site_admin":false},"created_at":"2015-02-14T21:01:23Z","updated_at":"2015-02-14T21:01:23Z","body":"No sooner did I report this than I installed nvm and tested locally with v0.11. Same issue as Travis CI, but I drilled down into the issue and found that the call to `server.listen(port, callback)` tried to bind to an nonexistent IPv6 address `:::` by default whereas on v0.10 the same call binds to the IPv4 address `0.0.0.0` (all addresses).\r\n\r\nWhen I changed this call to the form `server.listen(port, '127.0.0.1', callback)` all versions bound to the IPv4 address of 127.0.0.1 correctly and all tests [pass](https://travis-ci.org/ArminTamzarian/node-misfit/builds/50780077). I'm still not sure if this is an issue caused from NodeJS v0.11 or some interaction between v0.11 and Restify so I will leave this open for someone more knowledgable on the situation to comment/close."}}