Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: multiple IP addresses on one network adapter #22346

steamonimo opened this issue Oct 19, 2017 · 2 comments

net: multiple IP addresses on one network adapter #22346

steamonimo opened this issue Oct 19, 2017 · 2 comments


Copy link

@steamonimo steamonimo commented Oct 19, 2017

What version of Go are you using (go version)?


Does this issue reproduce with the latest release?


What operating system and processor architecture are you using (go env)?

Windows 2012 Server R2

What did you do?

I have multiple IP addresses assigned to one network adapter: x.x.x.x and y.y.y.y

Golang Web Application is working on port 443 of x.x.x.x
The very same application is copied and configured to work on port 443 of y.y.y.y

What did you expect to see?

TLS on different IP addresses but same ports should not lead to conflicts in ListenAndServeTLS.

What did you see instead?

Despite the fact that the Applications are using different IP addresses the following error will appear when the second application is started:

listen tcp :443: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.

@ianlancetaylor ianlancetaylor changed the title Multiple IP addresses on one network adapter net: multiple IP addresses on one network adapter Oct 19, 2017
Copy link

@ianlancetaylor ianlancetaylor commented Oct 19, 2017

How exactly are you starting the listener? Show us the code.

Copy link

@steamonimo steamonimo commented Oct 20, 2017

In the process of extracting the minimal source I actually found the problem in my code. One of my Apps was bound to :443 instead of x.x.x.x:443. Therefore the order of execution played a role here. Issue resolved - my apologies!

@steamonimo steamonimo closed this Oct 20, 2017
@golang golang locked and limited conversation to collaborators Oct 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.