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

Invalid address error when connecting to remote systems and no hostname specified #1619

Closed
ShinobiOtaku opened this issue Jan 6, 2016 · 4 comments

Comments

@ShinobiOtaku
Copy link
Contributor

If you have no hostname specified in HOCON, you get a "Invalid address" error when trying to connect to seed nodes (only tested with seed nodes running locally).

However, if you specify a hostname of "0.0.0.0", there's no issue.

These's a default applied if the hostname is blank - IpAddress.Any

Hostname = string.IsNullOrEmpty(configHost) ? IPAddress.Any.ToString() : configHost;

Therefore, a blank hostname and a hostname of "0.0.0.0" should behave the same.

I suspect the issue might be here:

PublicHostname = string.IsNullOrEmpty(publicConfigHost) ? configHost : publicConfigHost;

In the case where the hostname is blank, the public-hostname will be assigned blank
In the case where the hostname is "0.0.0.0", the public-hostname will also be assigned "0.0.0.0"

Therefore having the default of Hostname instead of configHost appears to be a simple fix:

PublicHostname = string.IsNullOrEmpty(publicConfigHost) ? Hostname : publicConfigHost;
@Aaronontheweb
Copy link
Member

@thelegendofando yep, that makes sense - would you like to send in a pull request for this change?

@ShinobiOtaku
Copy link
Contributor Author

@Aaronontheweb done. #1621

@Aaronontheweb
Copy link
Member

Thanks! @thelegendofando

@ShinobiOtaku
Copy link
Contributor Author

@Aaronontheweb For some reason git didn't pick up the removal of the old code. It shouldn't break anything, it's just messy. I've submitted PR #1623 to fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants