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

Closed
steamonimo opened this issue Oct 19, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@steamonimo
Copy link

commented Oct 19, 2017

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

1.9.1

Does this issue reproduce with the latest release?

yes

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

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Oct 19, 2017

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

@steamonimo

This comment has been minimized.

Copy link
Author

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.
You can’t perform that action at this time.