{"action":"created","issue":{"url":"https://api.github.com/repos/minio/minio-js/issues/431","repository_url":"https://api.github.com/repos/minio/minio-js","labels_url":"https://api.github.com/repos/minio/minio-js/issues/431/labels{/name}","comments_url":"https://api.github.com/repos/minio/minio-js/issues/431/comments","events_url":"https://api.github.com/repos/minio/minio-js/issues/431/events","html_url":"https://github.com/minio/minio-js/issues/431","id":138512550,"number":431,"title":"net: Socket hang up while using bucket-exists.js example with minio server","user":{"login":"steffenmllr","id":449563,"avatar_url":"https://avatars.githubusercontent.com/u/449563?v=3","gravatar_id":"","url":"https://api.github.com/users/steffenmllr","html_url":"https://github.com/steffenmllr","followers_url":"https://api.github.com/users/steffenmllr/followers","following_url":"https://api.github.com/users/steffenmllr/following{/other_user}","gists_url":"https://api.github.com/users/steffenmllr/gists{/gist_id}","starred_url":"https://api.github.com/users/steffenmllr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steffenmllr/subscriptions","organizations_url":"https://api.github.com/users/steffenmllr/orgs","repos_url":"https://api.github.com/users/steffenmllr/repos","events_url":"https://api.github.com/users/steffenmllr/events{/privacy}","received_events_url":"https://api.github.com/users/steffenmllr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/minio/minio-js/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-04T16:09:35Z","updated_at":"2016-03-07T19:13:17Z","closed_at":null,"body":"Hey there!\r\n\r\nI just wanted to try out minio and minio-js on my local osx environment but it doesn seem to work:\r\n\r\n```\r\n./minio server ./mydata\r\n```\r\n```js\r\nvar Minio = require('minio')\r\n\r\nvar s3client = new Minio({\r\n  endPoint:  'localhost',\r\n  accessKey: '***',\r\n  secretKey: '***',\r\n  port: 9000,\r\n  insecure: true,\r\n  region: 'us-east-1'\r\n});\r\ns3client.bucketExists('mybucket', function(e) {\r\n    console.log(e);\r\n})\r\n```\r\n\r\nAll I get is a `{ [Error: socket hang up] code: 'ECONNRESET' }`\r\n\r\nDo you have suggestions on how to set this up for local development ?"},"comment":{"url":"https://api.github.com/repos/minio/minio-js/issues/comments/193401582","html_url":"https://github.com/minio/minio-js/issues/431#issuecomment-193401582","issue_url":"https://api.github.com/repos/minio/minio-js/issues/431","id":193401582,"user":{"login":"krishnasrinivas","id":634494,"avatar_url":"https://avatars.githubusercontent.com/u/634494?v=3","gravatar_id":"","url":"https://api.github.com/users/krishnasrinivas","html_url":"https://github.com/krishnasrinivas","followers_url":"https://api.github.com/users/krishnasrinivas/followers","following_url":"https://api.github.com/users/krishnasrinivas/following{/other_user}","gists_url":"https://api.github.com/users/krishnasrinivas/gists{/gist_id}","starred_url":"https://api.github.com/users/krishnasrinivas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krishnasrinivas/subscriptions","organizations_url":"https://api.github.com/users/krishnasrinivas/orgs","repos_url":"https://api.github.com/users/krishnasrinivas/repos","events_url":"https://api.github.com/users/krishnasrinivas/events{/privacy}","received_events_url":"https://api.github.com/users/krishnasrinivas/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T19:13:17Z","updated_at":"2016-03-07T19:13:17Z","body":"The problem is not because of SO_REUSEPORT but because on macos minio is listening on ipv6 address (whereas it fails on linux saying port is already in use)\r\n\r\n```\r\n$ sudo lsof -iTCP:9000 -sTCP:LISTEN\r\n\r\nCOMMAND   PID   USER   FD   TYPE            DEVICE SIZE/OFF NODE NAME\r\n\r\nmain    52821 harsha    4u  IPv4 0x56757194c2040e1      0t0  TCP *:cslistener (LISTEN)\r\n\r\nminio   52822 harsha    4u  IPv6 0x56757194c40d1f1      0t0  TCP *:cslistener (LISTEN)\r\n```\r\n\r\nworking on a fix where during the start,  minio makes sure that 9000(or the requested port) is not used on any of the ipv6 or ipv4 addresses.\r\n"}}