Open RyanGhd opened 7 years ago
Stack trace suggests that the SnapshotSelectionCriteria.MaxSequenceNr
field is missing (in terms of System.MissingFieldException
). Something that is rather impossible to occur at compile time, so I guess you may have some problem with dependencies/assemblies loaded. Working version of akka.cluster.sharding has prerelease flag on it and it also depends on the akka.persistence, which currently has prerelease flag too.
@Horusiath thank you for your quick reply. tried different versions and the following packages are the latest versions that work properly in my case:
Akka 1.2.3
Akka.Cluster 1.2.3
Akka.Cluster.Sharding 1.2.0.36-beta
Akka.Cluster.Tools 1.2.3
Akka.Logger.NLog 1.2.0
Akka.Persistence 1.2.0.36-beta
Akka.Persistence.Sql.Common 1.2.0.36-beta
Akka.Persistence.SqlServer 1.1.1.7-beta
Akka.Remote 1.2.3
Akka.Remote.Transport.Helios 1.2.3
Akka.Serialization.Hyperion 1.2.3.43-beta
Also tried packages released after the following versions and each version has some issues:
Akka.Cluster.Sharding 1.2.0.36-beta
Akka.Persistence 1.2.0.36-beta
Akka.Persistence.Sql.Common 1.2.0.36-beta
I have the similar cause
System.MissingFieldException: Field not found: 'Akka.Persistence.SnapshotSelectionCriteria.MaxSequenceNr'.
but from the different stack trace
[ERROR][16/08/2017 22:17:06][Thread 0012][[akka://test/user/pra#590350025]] Persistence failure when replaying events for persistenceId [tracked-xxxs]. Last known sequence number [0]
Cause: System.MissingFieldException: Field not found: 'Akka.Persistence.SnapshotSelectionCriteria.MaxSequenceNr'.
at Akka.Persistence.Redis.Snapshot.RedisSnapshotStore.<LoadAsync>d__6.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
at Akka.Persistence.Redis.Snapshot.RedisSnapshotStore.LoadAsync(String persistenceId, SnapshotSelectionCriteria criteria)
at Akka.Persistence.Snapshot.SnapshotStore.<>c__DisplayClass5_0.<ReceiveSnapshotStore>b__0()
at Akka.Util.Internal.AtomicState.<CallThrough>d__7`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Akka.Util.Internal.AtomicState.<CallThrough>d__7`1.MoveNext()
I've got it today after updating from Akka 1.2 to 1.3. I've created a test application to check this issue and found the same behavior. In may case, the Redis server does not report about any successful connection at all.
<package id="Akka" version="1.3.0" targetFramework="net46" />
<package id="Akka.Persistence" version="1.3.0" targetFramework="net46" />
<package id="Akka.Persistence.Redis" version="0.2.6-beta" targetFramework="net46" />
<package id="Akka.Serialization.Hyperion" version="1.2.3.43-beta" targetFramework="net46" />
<package id="DotNetty.Buffers" version="0.4.6" targetFramework="net46" />
<package id="DotNetty.Codecs" version="0.4.6" targetFramework="net46" />
<package id="DotNetty.Common" version="0.4.6" targetFramework="net46" />
<package id="DotNetty.Handlers" version="0.4.6" targetFramework="net46" />
<package id="DotNetty.Transport" version="0.4.6" targetFramework="net46" />
<package id="Google.Protobuf" version="3.3.0" targetFramework="net46" />
<package id="Google.ProtocolBuffers" version="2.4.1.555" targetFramework="net46" />
<package id="Hyperion" version="0.9.2" targetFramework="net46" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="1.1.0" targetFramework="net46" />
<package id="Microsoft.Extensions.Logging" version="1.1.1" targetFramework="net46" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="1.1.1" targetFramework="net46" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net46" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net46" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="net46" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net46" />
@ia64mail Persistence.Redis is not yet updated for the 1.3 Release. I know work is being done, but i cannot give you an estimate right now.
@Danthar Thank you, will look forward for updates.
Akka.Cluster.Sharding.PersistentShardCoordinator throws exception when replaying the events. It can connect to the database and create all tables related to persistence. It also sends the following query to the database :
and after that fails with the following exception:
Akka.net version: 1.2.3 platform windows: 10 db: sqlserver 2016
To reproduce the exception please run following sample app : AkkaClusterTest.zip
logs: