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

Failure to form a cluster on .NET 9 when using Azure discovery with Akka.Management 1.5.35 #3079

Closed
object opened this issue Jan 16, 2025 · 15 comments

Comments

@object
Copy link

object commented Jan 16, 2025

Version Information
Akka.Management
Akka.Discovery.Azure
Akka.Coordination.Azure
Version 1.5.35
.NET 9

Describe the bug
Services start but unable to form a cluster continuously raising the following exception:

  "Message": "Failed to create/retrieve self discovery entry, retrying.",
  "MessageTemplate": "{Message:l}",
  "Renderings": [
    "Failed to create/retrieve self discovery entry, retrying."
  ],
  "Exception": {
    "Type": "FileNotFoundException",
    "Message": "Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.",
    "StackTrace": "   at Akka.Discovery.Azure.ClusterMemberTableClient.GetEntityAsync(String rowKey, CancellationToken token)\r\n   at Akka.Discovery.Azure.ClusterMemberTableClient.GetOrCreateAsync(String host, IPAddress address, Int32 port, CancellationToken token)\r\n   at Akka.Discovery.Azure.Actors.AzureDiscoveryGuardian.<Initializing>b__24_1(CancellationToken token)\r\n   at Akka.Discovery.Azure.Actors.AzureDiscoveryGuardian.ExecuteOperationWithRetry[T](Func`2 operation)\r\n   at Akka.Actor.PipeToSupport.PipeTo[T](Task`1 taskToPipe, ICanTell recipient, Boolean useConfigureAwait, IActorRef sender, Func`2 success, Func`2 failure)"
  },
  "_Message": "Failed to create/retrieve self discovery entry, retrying.",
  "Thread": "0038",
  "LogSource": "AzureDiscoveryGuardian (akka://Oddjob)",
  "Timestamp": "2025-01-16T06:47:49.7561942Z",
  "ActorPath": "akka://Oddjob/system/azure-discovery-guardian",
  "SourceContext": "Akka.Event.DummyClassForStringSources",

To Reproduce
Build applications using Akka.Management 1.5.35, run on .NET 9.

Environment
Linux with .NET SDK 9.0

Additional context
After downgrading Akka.Management packages to the version 1.5.33 the problem goes away.

@Aaronontheweb
Copy link
Member

We shouldn't even be referencing this package with the distributions we emit for .NET 6+ - this is a .NET Standard thing

Aaronontheweb added a commit to akkadotnet/akka.net that referenced this issue Jan 22, 2025
Upgrading to 8.x for system libraries caused some DLL hell issues on downstream dependencies that don't dual-target: akkadotnet/Akka.Management#3079
@Aaronontheweb
Copy link
Member

This should be addressed via akkadotnet/akka.net#7482

Aaronontheweb added a commit to akkadotnet/akka.net that referenced this issue Jan 22, 2025
Upgrading to 8.x for system libraries caused some DLL hell issues on downstream dependencies that don't dual-target: akkadotnet/Akka.Management#3079
@Aaronontheweb
Copy link
Member

We are now in the process of updating every library to use Akka.NET v1.5.37, which rolls back to the BCL versions to 6.0.

@object
Copy link
Author

object commented Jan 23, 2025

I see on Nuget only main Akka packages updated, not Sql or Azure. Will you also update them?

@object
Copy link
Author

object commented Jan 23, 2025

I have rebuilt our services using whatever Akka package I could find with version 1.5.37. Now they can't form a cluster ("No coordinator found to register. "Probably, no seed-nodes configured and manual cluster join not performed?")

And this:

Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.

  | Exception_StackTrace | at Akka.Discovery.Azure.ClusterMemberTableClient.GetEntityAsync(String rowKey, CancellationToken token) at Akka.Discovery.Azure.ClusterMemberTableClient.GetOrCreateAsync(String host, IPAddress address, Int32 port, CancellationToken token) at Akka.Discovery.Azure.Actors.AzureDiscoveryGuardian.b__24_1(CancellationToken token) at Akka.Discovery.Azure.Actors.AzureDiscoveryGuardian.ExecuteOperationWithRetry[T](Func2 operation) at Akka.Actor.PipeToSupport.PipeTo[T](Task1 taskToPipe, ICanTell recipient, Boolean useConfigureAwait, IActorRef sender, Func2 success, Func2 failure)

Was I too quick and should have waited for more packages to come?

@Aaronontheweb
Copy link
Member

Yes, I'd hold your horses and wait for the entire package train to get updated. We're making sure everything is dual targeted and are fixing areas where we manually upgraded the BCL in some places. This is going to take all day.

@Aaronontheweb
Copy link
Member

Fixing the dual targeting stuff also exposed some problems / API gaps in libraries like Akka.Persistence.Sql - this is a consequence of not using a giant MonoRepo for everything (and that invites its own set of problems)

@object
Copy link
Author

object commented Jan 23, 2025

Yes, with multiple repos things become more fragile. I will wait until everything is updated to 1.5.37. But Phobos doesn't need a new release, right?

@Aaronontheweb
Copy link
Member

But Phobos doesn't need a new release, right?

Probably not but we're going to do one any way out of an abundance of caution

Yes, with multiple repos things become more fragile.

Overall it's supposed to reduce the testing burden for each plugin by "pricing in" the QA on the original libraries as an output artifact, but stuff like having inconsistent package targeting across dependencies is a problem.

@Aaronontheweb
Copy link
Member

although in this case we screwed up by having the .NET Standard version use a higher "version" of the BCL than what we use on .NET 6 - that was the real mistake. We could have either fixed it by dropping .NET 6 and moving to .NET 8 or by rolling back the .NET Standard 6->8 upgrade. We're choosing the latter.

@object
Copy link
Author

object commented Jan 23, 2025

I wonder why you didn't choose the first option - just drop .NET 6 and move to .NET 8.

@Aaronontheweb
Copy link
Member

I wonder why you didn't choose the first option - just drop .NET 6 and move to .NET 8.

That's one of those things we'd rather do as a planned move rather than in response to a mess we created

@Aaronontheweb
Copy link
Member

This should be resolved now - I think everything is all up to date.

@object
Copy link
Author

object commented Jan 23, 2025

Everything is looking good!

@Aaronontheweb
Copy link
Member

Everything is looking good!

Glad to hear that!

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

No branches or pull requests

2 participants