-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Remote hostnames that defaults to non-FQDNs are unreachable #5083
Comments
Thanks @evenbrenden - this is exactly why we made 1.4.21-beta1 a beta. Looks to me like our new address parser must not be handling this case correctly. We'll get it fixed before 1.4.21 goes stable. |
Actually... This doesn't look like a bug with Akka.NET:
Can you double check your HOCON and make sure that everything is in order there? |
reproduction for akkadotnet#5083
@Aaronontheweb I believe @evenbrenden made a type when writing the address in the issue. Here's what's changed in our seed-nodes configuration: BEFORE: AFTER: @evenbrenden can you double-check the issue and correct the addresses if necessary. |
ok, let me give that a shot in my reproduction. Worth noting: the |
Yep, that line works just fine in my reproduction spec also. |
@object @evenbrenden do you have some logs to go along with this error message? It's possible that the issue here can be a DNS reachability problem - in which case you might want to try:
Can you also check if
That can be another fun source of trouble for DNS issues sometimes. I've seen situations where the resolution is different depending on where it's performed (last time it was the result of a Kubernetes DNS caching error.) |
Was trying to make a concise example, but it backfired :) Yes, that is a typo.
This...partly works, most nodes are struggling. Can't be sure why, some associations followed by disassociations in the logs. But this certainly works:
This does not work:
And neither does this:
I believe - but can't really confirm - that the machine defaults to a hostname that is not fully qualified. Could that cause the nodes to be unreachable, even if the machines can actually reach each other without FQDNs?
Can confirm that the IPs are the same for these two, in both directions. I'll try to gather some logs, but at a first glance, there are |
Ah ok, I see what's going on here:
This won't work because Akka.Remote has no idea that
This is the right way to do it - Akka.Remote knows that the sender and the recipient are supposed to be the same in this scenario. |
So unless we can get the |
Depends on the transport, but Akka.NET will call |
@Aaronontheweb so the only way to use FQDN is to explicitly set hostname (or public_hostname) in Akka HOCON. Which requires setting these values during deployment, something that would be great to avoid. Is it possible to make a convention that will hint Akka to set FQDN value to a hostname, for example: In addition to also support I.e. if hostname is set zeros and public-hostname is set to an empty string, Akka will concatenate a DNC name with domain name. What do you think, Aaron? |
But I see that self Akka.NET doesn't call DNS. GetHostName. This must be happening inside Dotnetty which is abandoned (sigh). So perhaps this is more complicated than I first thought. |
@object just an idea, but you could read an environment variable with the correct FQDN and programmatically override the |
@ismaelhamed Yes, that's probably the easiest in our case. Thanks for the tip. |
This is what we do ourselves. Edit: not just for FQDNs - any hostname binding when we're running in production environments. |
Actually we are doing the same already. So it's just to modify our code slightly. Then IMHO it will be difficult (and probably unreasonable) to intercept DotNetty settings, we should do it in the code. Should we close the issue @evenbrenden ? |
I agree, as long as we need something else than a static config, we might as well handle it application-side. Thanks @Aaronontheweb @object @ismaelhamed! |
To mix hostname and FQDN is already a multihomed setup |
Version Information
Version of Akka.NET?
1.4.21-beta1
Which Akka.NET Modules?
Describe the bug
As part of a host migration we need to use fully qualified domain names for our seed nodes, i.e. changing from
to
host1:1234
andhost2:1234
are our Lighthouse services, and are both configured withIn our case,
akka.remote.dot-netty.tcp.hostname
defaults tohost1
andhost2
for their respective nodes, i.e. not FQDNs. With this configuration, the seed nodes are not found and the cluster does not get up. Setting thehostname
s to FQDNshost1.domain.com
andhost2.domain.com
fixes this, but leaves us with a hardcoded set of hostnames and a separate configuration per node.Expected behavior
My question is if this is expected behaviour (given a host that does not provide an FQDN for itself) and/or whether there exists a way to continue using hostname-agnostic configurations for
akka.remote.dot-netty.tcp
.Actual behavior
An unreachable cluster. I am assuming that this also applies to any remote non-seed nodes too, i.e. a node on port 2345 is unreachable if hostname is not an FQDN.
To Reproduce
Unfortunately I do not have minimal example, but the changes described above should be sufficient to reproduce.
Environment
The text was updated successfully, but these errors were encountered: