{"action":"opened","issue":{"url":"https://api.github.com/repos/nats-io/gnatsd/issues/175","labels_url":"https://api.github.com/repos/nats-io/gnatsd/issues/175/labels{/name}","comments_url":"https://api.github.com/repos/nats-io/gnatsd/issues/175/comments","events_url":"https://api.github.com/repos/nats-io/gnatsd/issues/175/events","html_url":"https://github.com/nats-io/gnatsd/issues/175","id":127705962,"number":175,"title":"Server shouldn't be able to establish routes to itself","user":{"login":"pires","id":1752631,"avatar_url":"https://avatars.githubusercontent.com/u/1752631?v=3","gravatar_id":"","url":"https://api.github.com/users/pires","html_url":"https://github.com/pires","followers_url":"https://api.github.com/users/pires/followers","following_url":"https://api.github.com/users/pires/following{/other_user}","gists_url":"https://api.github.com/users/pires/gists{/gist_id}","starred_url":"https://api.github.com/users/pires/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pires/subscriptions","organizations_url":"https://api.github.com/users/pires/orgs","repos_url":"https://api.github.com/users/pires/repos","events_url":"https://api.github.com/users/pires/events{/privacy}","received_events_url":"https://api.github.com/users/pires/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-20T15:23:58Z","updated_at":"2016-01-20T15:23:58Z","closed_at":null,"body":"How to reproduce with latest `master`:\r\n```\r\n$ ./gnatsd --cluster nats://localhost:6222 --routes nats://localhost:6222 -DV\r\n```\r\n\r\nHere's what I see:\r\n```\r\n[35433] 2016/01/20 15:23:07.177801 [INF] Starting gnatsd version 0.7.3\r\n[35433] 2016/01/20 15:23:07.177919 [INF] Listening for route connections on localhost:6222\r\n[35433] 2016/01/20 15:23:07.180640 [INF] Listening for client connections on 0.0.0.0:4222\r\n[35433] 2016/01/20 15:23:07.180729 [INF] gnatsd is ready\r\n[35433] 2016/01/20 15:23:07.180766 [DBG] Trying to connect to route on localhost:6222\r\n[35433] 2016/01/20 15:23:07.182566 [DBG] 127.0.0.1:6222 - rid:1 - Route connection created\r\n[35433] 2016/01/20 15:23:07.182582 [DBG] 127.0.0.1:6222 - rid:1 - Route connect msg sent\r\n[35433] 2016/01/20 15:23:07.182666 [DBG] 127.0.0.1:54390 - rid:2 - Route connection created\r\n[35433] 2016/01/20 15:23:07.182864 [TRC] 127.0.0.1:54390 - rid:2 - ->> [CONNECT {\"verbose\":false,\"pedantic\":false,\"tls_required\":false,\"name\":\"8313e507c8dee5b540e80ecbbd2ae556\"}]\r\n[35433] 2016/01/20 15:23:07.182883 [DBG] 127.0.0.1:6222 - rid:1 - Registering remote route \"8313e507c8dee5b540e80ecbbd2ae556\"\r\n[35433] 2016/01/20 15:23:07.182891 [DBG] 127.0.0.1:6222 - rid:1 - Route sent local subscriptions\r\n[35433] 2016/01/20 15:23:07.182939 [DBG] 127.0.0.1:54390 - rid:2 - Detected duplicate remote route \"8313e507c8dee5b540e80ecbbd2ae556\"\r\n[35433] 2016/01/20 15:23:07.182945 [DBG] 127.0.0.1:54390 - rid:2 - Router connection closed\r\n[35433] 2016/01/20 15:23:07.183000 [DBG] 127.0.0.1:6222 - rid:1 - Router connection closed\r\n[35433] 2016/01/20 15:23:07.183035 [DBG] Attempting reconnect for solicited route \"nats://localhost:6222\"\r\n[35433] 2016/01/20 15:23:08.183622 [DBG] Trying to connect to route on localhost:6222\r\n[35433] 2016/01/20 15:23:08.186011 [DBG] 127.0.0.1:6222 - rid:3 - Route connection created\r\n[35433] 2016/01/20 15:23:08.186029 [DBG] 127.0.0.1:6222 - rid:3 - Route connect msg sent\r\n[35433] 2016/01/20 15:23:08.186041 [DBG] 127.0.0.1:54392 - rid:4 - Route connection created\r\n[35433] 2016/01/20 15:23:08.186186 [TRC] 127.0.0.1:54392 - rid:4 - ->> [CONNECT {\"verbose\":false,\"pedantic\":false,\"tls_required\":false,\"name\":\"8313e507c8dee5b540e80ecbbd2ae556\"}]\r\n[35433] 2016/01/20 15:23:08.186212 [DBG] 127.0.0.1:6222 - rid:3 - Registering remote route \"8313e507c8dee5b540e80ecbbd2ae556\"\r\n[35433] 2016/01/20 15:23:08.186219 [DBG] 127.0.0.1:6222 - rid:3 - Route sent local subscriptions\r\n[35433] 2016/01/20 15:23:08.186251 [DBG] 127.0.0.1:54392 - rid:4 - Detected duplicate remote route \"8313e507c8dee5b540e80ecbbd2ae556\"\r\n[35433] 2016/01/20 15:23:08.186256 [DBG] 127.0.0.1:54392 - rid:4 - Router connection closed\r\n[35433] 2016/01/20 15:23:08.186302 [DBG] 127.0.0.1:6222 - rid:3 - Router connection closed\r\n[35433] 2016/01/20 15:23:08.186331 [DBG] Attempting reconnect for solicited route \"nats://localhost:6222\"\r\n[35433] 2016/01/20 15:23:09.189305 [DBG] Trying to connect to route on localhost:6222\r\n[35433] 2016/01/20 15:23:09.191021 [DBG] 127.0.0.1:6222 - rid:5 - Route connection created\r\n[35433] 2016/01/20 15:23:09.191038 [DBG] 127.0.0.1:6222 - rid:5 - Route connect msg sent\r\n[35433] 2016/01/20 15:23:09.191110 [DBG] 127.0.0.1:54394 - rid:6 - Route connection created\r\n[35433] 2016/01/20 15:23:09.191214 [TRC] 127.0.0.1:54394 - rid:6 - ->> [CONNECT {\"verbose\":false,\"pedantic\":false,\"tls_required\":false,\"name\":\"8313e507c8dee5b540e80ecbbd2ae556\"}]\r\n[35433] 2016/01/20 15:23:09.191230 [DBG] 127.0.0.1:6222 - rid:5 - Registering remote route \"8313e507c8dee5b540e80ecbbd2ae556\"\r\n[35433] 2016/01/20 15:23:09.191241 [DBG] 127.0.0.1:6222 - rid:5 - Route sent local subscriptions\r\n[35433] 2016/01/20 15:23:09.191253 [DBG] 127.0.0.1:54394 - rid:6 - Detected duplicate remote route \"8313e507c8dee5b540e80ecbbd2ae556\"\r\n[35433] 2016/01/20 15:23:09.191258 [DBG] 127.0.0.1:54394 - rid:6 - Router connection closed\r\n[35433] 2016/01/20 15:23:09.191302 [DBG] 127.0.0.1:6222 - rid:5 - Router connection closed\r\n[35433] 2016/01/20 15:23:09.191334 [DBG] Attempting reconnect for solicited route \"nats://localhost:6222\"\r\n```"}}