{"action":"created","issue":{"url":"https://api.github.com/repos/michalmuskala/mongodb_ecto/issues/52","repository_url":"https://api.github.com/repos/michalmuskala/mongodb_ecto","labels_url":"https://api.github.com/repos/michalmuskala/mongodb_ecto/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/michalmuskala/mongodb_ecto/issues/52/comments","events_url":"https://api.github.com/repos/michalmuskala/mongodb_ecto/issues/52/events","html_url":"https://github.com/michalmuskala/mongodb_ecto/issues/52","id":117012305,"number":52,"title":"Error connecting to remote database","user":{"login":"AdamBrodzinski","id":1445367,"avatar_url":"https://avatars.githubusercontent.com/u/1445367?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamBrodzinski","html_url":"https://github.com/AdamBrodzinski","followers_url":"https://api.github.com/users/AdamBrodzinski/followers","following_url":"https://api.github.com/users/AdamBrodzinski/following{/other_user}","gists_url":"https://api.github.com/users/AdamBrodzinski/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamBrodzinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamBrodzinski/subscriptions","organizations_url":"https://api.github.com/users/AdamBrodzinski/orgs","repos_url":"https://api.github.com/users/AdamBrodzinski/repos","events_url":"https://api.github.com/users/AdamBrodzinski/events{/privacy}","received_events_url":"https://api.github.com/users/AdamBrodzinski/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2015-11-15T19:25:28Z","updated_at":"2016-06-30T21:09:41Z","closed_at":"2015-11-15T19:42:38Z","body":"I spun up a temp. test db on Compose.io and am having issues connecting. I can connect with the shell but I must be messing up the config somehow? It's also a replica set so I used the same hostname that the shell used. It wasn't clear how the mongo URI should be used in the config.\r\n\r\nI can’t figure out why it’s crashing… Any tips? It works great with a local mongo. I can login using the shell:\r\n`mongo candidate.16.mongolayer.com:11213/chatty -u testu -p testp`\r\n\r\n```elixir\r\n\r\nconfig :chatty, Chatty.Repo,\r\n  database: \"chatty\",\r\n  username: \"testu\",\r\n  password: \"testp\",\r\n  #hostname: \"candidate.16.mongolayer.com:11213,candidate.57.mongolayer.com\"\r\n  hostname: \"candidate.16.mongolayer.com\",\r\n  port: \"11213\"\r\n```\r\n\r\nand the error on startup:\r\n\r\n```\r\nState: %{auth: [{\"testu\", \"testp\"}], database: \"chatty\", opts: [backoff: 1000, pool_name: Chatty.Repo.Pool, pool: Ecto.Pools.Poolboy, otp_app: :chatty, repo: Chatty.Repo, hostname: 'candidate.16.mongolayer.com', port: \"11213\"], queue: %{}, request_id: 0, socket: nil, tail: nil, timeout: 5000, wire_version: nil, write_concern: [w: 1]}\r\n[error] GenServer #PID<0.1716.0> terminating\r\n** (stop) an exception was raised:\r\n    ** (FunctionClauseError) no function clause matching in :inet_tcp.getserv/1\r\n        (kernel) inet_tcp.erl:36: :inet_tcp.getserv(\"11213\")\r\n        (kernel) gen_tcp.erl:157: :gen_tcp.connect1/4\r\n        (kernel) gen_tcp.erl:144: :gen_tcp.connect/4\r\n        (mongodb) lib/mongo/connection.ex:187: Mongo.Connection.connect/2\r\n        (connection) lib/connection.ex:608: Connection.enter_connect/5\r\n        (stdlib) proc_lib.erl:240: :proc_lib.init_p_do_apply/3\r\n    (kernel) gen_tcp.erl:149: :gen_tcp.connect/4\r\n    (mongodb) lib/mongo/connection.ex:187: Mongo.Connection.connect/2\r\n    (connection) lib/connection.ex:608: Connection.enter_connect/5\r\n    (stdlib) proc_lib.erl:240: :proc_lib.init_p_do_apply/3\r\n```\r\n\r\nThe URI compose gives me is:  \r\n```\r\nmongodb://<user>:<password>@candidate.16.mongolayer.com:11213,candidate.57.mongolayer.com:10138/chatty?replicaSet=set-56489fdcbab49bb86e000bfb\r\n```"},"comment":{"url":"https://api.github.com/repos/michalmuskala/mongodb_ecto/issues/comments/229789665","html_url":"https://github.com/michalmuskala/mongodb_ecto/issues/52#issuecomment-229789665","issue_url":"https://api.github.com/repos/michalmuskala/mongodb_ecto/issues/52","id":229789665,"user":{"login":"AdamBrodzinski","id":1445367,"avatar_url":"https://avatars.githubusercontent.com/u/1445367?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamBrodzinski","html_url":"https://github.com/AdamBrodzinski","followers_url":"https://api.github.com/users/AdamBrodzinski/followers","following_url":"https://api.github.com/users/AdamBrodzinski/following{/other_user}","gists_url":"https://api.github.com/users/AdamBrodzinski/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamBrodzinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamBrodzinski/subscriptions","organizations_url":"https://api.github.com/users/AdamBrodzinski/orgs","repos_url":"https://api.github.com/users/AdamBrodzinski/repos","events_url":"https://api.github.com/users/AdamBrodzinski/events{/privacy}","received_events_url":"https://api.github.com/users/AdamBrodzinski/received_events","type":"User","site_admin":false},"created_at":"2016-06-30T21:09:41Z","updated_at":"2016-06-30T21:09:41Z","body":"@Morganjackson not anymore, i switched over to using RethinkDB and the Elixir driver"}}
{"actor":{"display_login":"AdamBrodzinski"}}