{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/4664","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/4664/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/4664/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/4664/events","html_url":"https://github.com/sequelize/sequelize/issues/4664","id":111858265,"number":4664,"title":"Why sequelize doesn't connect to DB when system is offline?","user":{"login":"moslemezzati","id":4618195,"avatar_url":"https://avatars.githubusercontent.com/u/4618195?v=3","gravatar_id":"","url":"https://api.github.com/users/moslemezzati","html_url":"https://github.com/moslemezzati","followers_url":"https://api.github.com/users/moslemezzati/followers","following_url":"https://api.github.com/users/moslemezzati/following{/other_user}","gists_url":"https://api.github.com/users/moslemezzati/gists{/gist_id}","starred_url":"https://api.github.com/users/moslemezzati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moslemezzati/subscriptions","organizations_url":"https://api.github.com/users/moslemezzati/orgs","repos_url":"https://api.github.com/users/moslemezzati/repos","events_url":"https://api.github.com/users/moslemezzati/events{/privacy}","received_events_url":"https://api.github.com/users/moslemezzati/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-16T15:48:22Z","updated_at":"2015-10-16T16:21:24Z","closed_at":"2015-10-16T16:20:30Z","body":"I try to run my project when my computer is offline but it showed me this error:\r\n```javascript\r\nUnhandled rejection SequelizeConnectionError: getaddrinfo ENOENT\r\n    at C:\\Users\\moslem\\WebstormProjects\\exchange\\node_modules\\sequelize\\lib\\dial\r\nects\\postgres\\connection-manager.js:74:20\r\n    at null.<anonymous> (C:\\Users\\moslem\\WebstormProjects\\exchange\\node_modules\\\r\npg\\lib\\client.js:176:5)\r\n    at emit (events.js:107:17)\r\n    at Socket.<anonymous> (C:\\Users\\moslem\\WebstormProjects\\exchange\\node_module\r\ns\\pg\\lib\\connection.js:59:10)\r\n    at Socket.emit (events.js:107:17)\r\n    at net.js:923:16\r\n    at process._tickCallback (node.js:355:11)\r\n```\r\nafter that I connected to internet then everything works as expected"},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/148759277","html_url":"https://github.com/sequelize/sequelize/issues/4664#issuecomment-148759277","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/4664","id":148759277,"user":{"login":"moslemezzati","id":4618195,"avatar_url":"https://avatars.githubusercontent.com/u/4618195?v=3","gravatar_id":"","url":"https://api.github.com/users/moslemezzati","html_url":"https://github.com/moslemezzati","followers_url":"https://api.github.com/users/moslemezzati/followers","following_url":"https://api.github.com/users/moslemezzati/following{/other_user}","gists_url":"https://api.github.com/users/moslemezzati/gists{/gist_id}","starred_url":"https://api.github.com/users/moslemezzati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moslemezzati/subscriptions","organizations_url":"https://api.github.com/users/moslemezzati/orgs","repos_url":"https://api.github.com/users/moslemezzati/repos","events_url":"https://api.github.com/users/moslemezzati/events{/privacy}","received_events_url":"https://api.github.com/users/moslemezzati/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T16:21:24Z","updated_at":"2015-10-16T16:21:24Z","body":"I found out where is issue my config file is set like this:\r\n```javascript\r\n \"development\": {\r\n    \"username\": \"postgres\",\r\n    \"password\": \"1\",\r\n    \"database\": \"exchange\",\r\n    \"host\": \"localhost\",\r\n    \"dialect\": \"postgres\",\r\n    \"port\": \"5432\"\r\n  },\r\n```\r\nand I changed it to this:\r\n```javascript\r\n \"development\": {\r\n    \"username\": \"postgres\",\r\n    \"password\": \"1\",\r\n    \"database\": \"exchange\",\r\n    \"host\": \"127.0.0.1\",\r\n    \"dialect\": \"postgres\",\r\n    \"port\": \"5432\"\r\n  },\r\n```\r\nAnd then everything worked fine.\r\nThanks"}}