{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/7173","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/7173/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/7173/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/7173/events","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/7173","id":70178314,"number":7173,"title":"portforward unittest error","user":{"login":"ddysher","id":2191361,"avatar_url":"https://avatars.githubusercontent.com/u/2191361?v=3","gravatar_id":"","url":"https://api.github.com/users/ddysher","html_url":"https://github.com/ddysher","followers_url":"https://api.github.com/users/ddysher/followers","following_url":"https://api.github.com/users/ddysher/following{/other_user}","gists_url":"https://api.github.com/users/ddysher/gists{/gist_id}","starred_url":"https://api.github.com/users/ddysher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddysher/subscriptions","organizations_url":"https://api.github.com/users/ddysher/orgs","repos_url":"https://api.github.com/users/ddysher/repos","events_url":"https://api.github.com/users/ddysher/events{/privacy}","received_events_url":"https://api.github.com/users/ddysher/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/area/networking","name":"area/networking","color":"006b75"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/kind/bug","name":"kind/bug","color":"ff0000"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/priority/P1","name":"priority/P1","color":"eb6420"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/status/triaged","name":"status/triaged","color":"70c060"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-22T16:48:14Z","updated_at":"2015-04-22T18:17:46Z","closed_at":null,"body":"```\r\nI0422 09:58:40.823928   32558 portforward.go:216] Forwarding from 12345 -> 12345\r\nI0422 09:58:40.824093   32558 portforward.go:216] Forwarding from 12345 -> 12345\r\nI0422 09:58:40.824159   32558 portforward.go:216] Forwarding from 12345 -> 12345\r\nE0422 09:58:40.824280   32558 portforward.go:205] Unable to create listener: Error listen tcp6: no suitable address found\r\nE0422 09:58:40.824346   32558 portforward.go:205] Unable to create listener: Error listen tcp4 [::1]:12345: non-IPv4 address\r\nE0422 09:58:40.824397   32558 portforward.go:205] Unable to create listener: Error listen tcp6 127.0.0.1:12345: bind: invalid argument\r\n--- FAIL: TestGetListener (0.00 seconds)\r\n\tportforward_test.go:275: Asked a tcp4 forward for: localhost:12345, got listener 127.0.0.1:12345, expected: 12345\r\n\tportforward_test.go:275: Asked a tcp4 forward for: 127.0.0.1:12345, got listener 127.0.0.1:12345, expected: 12345\r\n\tportforward_test.go:275: Asked a tcp6 forward for: [::1]:12345, got listener ::1:12345, expected: 12345\r\n\tportforward_test.go:262: Test case #3 failed: Data {localhost tcp6 false ::1} an error has been raised(false) where it should not (or reciprocally): listen tcp6: no suitable address found\r\nI0422 09:58:40.824522   32558 portforward.go:216] Forwarding from 5000 -> 5000\r\nI0422 09:58:40.824643   32558 portforward.go:216] Forwarding from 5000 -> 5000\r\nI0422 09:58:40.824709   32558 portforward.go:216] Forwarding from 6000 -> 6000\r\nI0422 09:58:40.824878   32558 portforward.go:242] Handling connection for 5000\r\nI0422 09:58:40.825124   32558 portforward.go:242] Handling connection for 6000\r\nFAIL\r\nFAIL\tgithub.com/GoogleCloudPlatform/kubernetes/pkg/client/portforward\t0.078s\r\n```\r\n\r\nI've seen this in two of my linux machines. @ncdc @akram "},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/95289667","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/7173#issuecomment-95289667","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/7173","id":95289667,"user":{"login":"ncdc","id":354,"avatar_url":"https://avatars.githubusercontent.com/u/354?v=3","gravatar_id":"","url":"https://api.github.com/users/ncdc","html_url":"https://github.com/ncdc","followers_url":"https://api.github.com/users/ncdc/followers","following_url":"https://api.github.com/users/ncdc/following{/other_user}","gists_url":"https://api.github.com/users/ncdc/gists{/gist_id}","starred_url":"https://api.github.com/users/ncdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncdc/subscriptions","organizations_url":"https://api.github.com/users/ncdc/orgs","repos_url":"https://api.github.com/users/ncdc/repos","events_url":"https://api.github.com/users/ncdc/events{/privacy}","received_events_url":"https://api.github.com/users/ncdc/received_events","type":"User","site_admin":false},"created_at":"2015-04-22T18:17:46Z","updated_at":"2015-04-22T18:17:46Z","body":"I wonder if `\"localhost\"` used here (https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/client/portforward/portforward.go#L189) should be 127.0.0.1 instead? Will that always work on ipv4 and ipv6, or would there ever be issues?\r\n\r\nI know @akram put in the most recent changes because `localhost` was resolving to `::1` instead of `127.0.0.1` for him, and I previously wasn't using `net.SplitHostPort`, and the extra colons in `::1` was tripping up my custom code that mimicked SplitHostPort (but didn't account for an ipv6 style localhost)."}}