{"issue":{"title":"simple program using storage crashes when deployed to cloud","user":{"login":"vasili-zolotov","id":468223,"url":"https://api.github.com/users/vasili-zolotov","gravatar_id":"9e590171097c4986caad58086326bd3b","avatar_url":"https://secure.gravatar.com/avatar/9e590171097c4986caad58086326bd3b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"created_at":"2011-12-22T06:46:17Z","milestone":null,"state":"open","updated_at":"2011-12-26T00:32:10Z","labels":[],"id":2634683,"closed_at":null,"html_url":"https://github.com/WindowsAzure/azure-sdk-for-node/issues/15","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"The following program doesn't work when deployed to staging or production. node.exe appears to crash due to unhandled exception leaving only this behind in server.js.logs:\r\n\r\n```\r\nnode.js:201\r\n        throw e; // process.nextTick error, or 'error' event on first tick\r\n              ^\r\nError: getaddrinfo ENOENT\r\n    at errnoException (dns.js:31:11)\r\n    at Object.onanswer [as oncomplete] (dns.js:140:16)\r\n```\r\n\r\nserver.js\r\n\r\n```javascript\r\nvar http = require('http');\r\nvar port = process.env.port || 1337;\r\n\r\nvar KEY1 = \"xxx\";\r\nvar KEY2 = \"zzz\";\r\n\r\nvar util = require('util');\r\nvar azure = require('azure');\r\nvar tables = azure.createTableService(KEY1, KEY2);\r\n\r\nhttp.createServer(function (req, res) {\r\n    tables.createTableIfNotExists(\"Table\", function (error) {\r\n        res.writeHead(200, { 'Content-Type': 'text/plain' });\r\n        if (error) {\r\n            res.end('ERROR: ' + util.inspect(error,true));\r\n        } else {\r\n            res.end('EXISTS!');\r\n        }\r\n    });\r\n}).listen(port);\r\n```\r\n\r\nWeb.cloud.config (default, except enabled logging)\r\n\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<configuration>\r\n  <system.webServer>\r\n    <modules runAllManagedModulesForAllRequests=\"false\" />\r\n    \r\n    <!-- NOTE: By default, debugging and logging are unsecure and should not be enabled for production applications in the cloud.-->\r\n    <iisnode \r\n      debuggingEnabled=\"false\"\r\n      loggingEnabled=\"true\"\r\n      devErrorsEnabled=\"false\"\r\n    />\r\n\r\n    <!-- indicates that the server.js file is a node.js application \r\n    to be handled by the iisnode module -->\r\n    <handlers>\r\n      <add name=\"iisnode\" path=\"server.js\" verb=\"*\" modules=\"iisnode\" />\r\n    </handlers>\r\n    <rewrite>\r\n      <rules>\r\n        <clear />\r\n        <rule name=\"app\" enabled=\"true\" patternSyntax=\"ECMAScript\" stopProcessing=\"true\">\r\n            <match url=\"server\\.js.+\" negate=\"true\" />\r\n            <conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\r\n            <action type=\"Rewrite\" url=\"server.js\" />\r\n        </rule>\r\n      </rules>\r\n    </rewrite>\r\n  </system.webServer>\r\n</configuration>\r\n```","number":15,"url":"https://api.github.com/repos/WindowsAzure/azure-sdk-for-node/issues/15","comments":7,"assignee":null},"comment":{"user":{"login":"vasili-zolotov","id":468223,"url":"https://api.github.com/users/vasili-zolotov","gravatar_id":"9e590171097c4986caad58086326bd3b","avatar_url":"https://secure.gravatar.com/avatar/9e590171097c4986caad58086326bd3b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"created_at":"2011-12-26T00:32:10Z","updated_at":"2011-12-26T00:32:10Z","id":3272129,"body":"@andrerod \r\n\r\nThat was it! I used primary key in place of account name. Coming from AWS I'm used to having two encoded keys, so I never even questioned that part. Ouch. Thank you santa!\r\n\r\nLooking at the debug trace (which is awesome, btw) it's so very obvious why there was a DNS lookup error. \r\n\r\nPlease post the info about enabling the debug trace on http://windowsazure.com. That would have showed the problem right away.","url":"https://api.github.com/repos/WindowsAzure/azure-sdk-for-node/issues/comments/3272129"},"action":"created"}