planetarium / libplanet

Blockchain in C#/.NET for on-chain, decentralized gaming
https://docs.libplanet.io/
GNU Lesser General Public License v2.1
506 stars 142 forks source link

“An item with the same key has already been added” exception occurs when creating `RocksDBStore` #1873

Closed longfin closed 1 year ago

longfin commented 2 years ago
Unexpected exception occurred during Run. System.ArgumentException: An item with the same key has already been added. Key: f3eaa2f9-0b5f-4ab9-b0ee-0be957e9e0aa
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at RocksDbSharp.RocksDb.Open(DbOptions options, String path, ColumnFamilies columnFamilies)
   at Libplanet.RocksDBStore.RocksDBUtils.OpenRocksDb(DbOptions options, String dbPath, ColumnFamilies columnFamilies) in /app/Lib9c/.Libplanet/Libplanet.RocksDBStore/RocksDBUtils.cs:line 16
   at Libplanet.RocksDBStore.RocksDBStore..ctor(String path, Int32 blockCacheSize, Int32 txCacheSize, Nullable`1 maxTotalWalSize, Nullable`1 keepLogFileNum, Nullable`1 maxLogFileSize, Int32 txEpochUnitSeconds, Int32 blockEpochUnitSeconds, Int32 dbConnectionCacheSize) in /app/Lib9c/.Libplanet/Libplanet.RocksDBStore/RocksDBStore.cs:line 167
   at Libplanet.Headless.Hosting.LibplanetNodeService`1.LoadStore(String path, String type, Int32 statesCacheSize) in /app/Libplanet.Headless/Hosting/LibplanetNodeService.cs:line 310
   at Libplanet.Headless.Hosting.LibplanetNodeService`1..ctor(LibplanetNodeServiceProperties`1 properties, IBlockPolicy`1 blockPolicy, IStagePolicy`1 stagePolicy, IEnumerable`1 renderers, Func`5 minerLoopAction, Progress`1 preloadProgress, Action`2 exceptionHandlerAction, Action`1 preloadStatusHandlerAction, Boolean ignoreBootstrapFailure, Boolean ignorePreloadFailure) in /app/Libplanet.Headless/Hosting/LibplanetNodeService.cs:line 100
   at NineChronicles.Headless.NineChroniclesNodeService..ctor(PrivateKey minerPrivateKey, LibplanetNodeServiceProperties`1 properties, IBlockPolicy`1 blockPolicy, NetworkType networkType, Progress`1 preloadProgress, Boolean ignoreBootstrapFailure, Boolean ignorePreloadFailure, Boolean strictRendering, Boolean isDev, Int32 blockInterval, Int32 reorgInterval, TimeSpan txLifeTime, Int32 minerCount, Int32 txQuotaPerSigner) in /app/NineChronicles.Headless/NineChroniclesNodeService.cs:line 256
   at NineChronicles.Headless.NineChroniclesNodeService.Create(NineChroniclesNodeServiceProperties properties, StandaloneContext context) in /app/NineChronicles.Headless/NineChroniclesNodeService.cs:line 336
   at NineChronicles.Headless.HostBuilderExtensions.UseNineChroniclesNode(IHostBuilder builder, NineChroniclesNodeServiceProperties properties, StandaloneContext context) in /app/NineChronicles.Headless/HostBuilderExtensions.cs:line 25
   at NineChronicles.Headless.Executable.Program.Run(String appProtocolVersionToken, String genesisBlockPath, Boolean noMiner, String host, Nullable`1 port, String swarmPrivateKeyString, String minerPrivateKeyString, String storeType, String storePath, String[] iceServerStrings, String[] peerStrings, String[] trustedAppProtocolVersionSigners, Boolean rpcServer, String rpcListenHost, Nullable`1 rpcListenPort, Boolean graphQLServer, String graphQLHost, Nullable`1 graphQLPort, String graphQLSecretTokenPath, Boolean noCors, Int32 workers, Int32 confirmations, Boolean nonblockRenderer, Int32 nonblockRendererQueue, Boolean strictRendering, NetworkType networkType, Boolean isDev, Int32 blockInterval, Int32 reorgInterval, Boolean logActionRenders, String awsCognitoIdentity, String awsAccessKey, String awsSecretKey, String awsRegion, Int32 txLifeTime, Int32 messageTimeout, Int32 tipTimeout, Int32 demandBuffer, String[] staticPeerStrings, Int32 minerCount, Boolean skipPreload, Int32 minimumBroadcastTarget, Int32 bucketSize, String chainTipStaleBehaviorType, Int32 txQuotaPerSigner, Boolean rpcRemoteServer, Boolean rpcHttpServer, Int32 pollInterval, Int32 maximumPollPeers, String transportType, Nullable`1 cancellationToken) in /app/NineChronicles.Headless.Executable/Program.cs:line 367
System.ArgumentException: An item with the same key has already been added. Key: f3eaa2f9-0b5f-4ab9-b0ee-0be957e9e0aa
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at RocksDbSharp.RocksDb.Open(DbOptions options, String path, ColumnFamilies columnFamilies)
   at Libplanet.RocksDBStore.RocksDBUtils.OpenRocksDb(DbOptions options, String dbPath, ColumnFamilies columnFamilies) in /app/Lib9c/.Libplanet/Libplanet.RocksDBStore/RocksDBUtils.cs:line 16
   at Libplanet.RocksDBStore.RocksDBStore..ctor(String path, Int32 blockCacheSize, Int32 txCacheSize, Nullable`1 maxTotalWalSize, Nullable`1 keepLogFileNum, Nullable`1 maxLogFileSize, Int32 txEpochUnitSeconds, Int32 blockEpochUnitSeconds, Int32 dbConnectionCacheSize) in /app/Lib9c/.Libplanet/Libplanet.RocksDBStore/RocksDBStore.cs:line 167
   at Libplanet.Headless.Hosting.LibplanetNodeService`1.LoadStore(String path, String type, Int32 statesCacheSize) in /app/Libplanet.Headless/Hosting/LibplanetNodeService.cs:line 310
   at Libplanet.Headless.Hosting.LibplanetNodeService`1..ctor(LibplanetNodeServiceProperties`1 properties, IBlockPolicy`1 blockPolicy, IStagePolicy`1 stagePolicy, IEnumerable`1 renderers, Func`5 minerLoopAction, Progress`1 preloadProgress, Action`2 exceptionHandlerAction, Action`1 preloadStatusHandlerAction, Boolean ignoreBootstrapFailure, Boolean ignorePreloadFailure) in /app/Libplanet.Headless/Hosting/LibplanetNodeService.cs:line 100
   at NineChronicles.Headless.NineChroniclesNodeService..ctor(PrivateKey minerPrivateKey, LibplanetNodeServiceProperties`1 properties, IBlockPolicy`1 blockPolicy, NetworkType networkType, Progress`1 preloadProgress, Boolean ignoreBootstrapFailure, Boolean ignorePreloadFailure, Boolean strictRendering, Boolean isDev, Int32 blockInterval, Int32 reorgInterval, TimeSpan txLifeTime, Int32 minerCount, Int32 txQuotaPerSigner) in /app/NineChronicles.Headless/NineChroniclesNodeService.cs:line 256
   at NineChronicles.Headless.NineChroniclesNodeService.Create(NineChroniclesNodeServiceProperties properties, StandaloneContext context) in /app/NineChronicles.Headless/NineChroniclesNodeService.cs:line 336
   at NineChronicles.Headless.HostBuilderExtensions.UseNineChroniclesNode(IHostBuilder builder, NineChroniclesNodeServiceProperties properties, StandaloneContext context) in /app/NineChronicles.Headless/HostBuilderExtensions.cs:line 25
   at NineChronicles.Headless.Executable.Program.Run(String appProtocolVersionToken, String genesisBlockPath, Boolean noMiner, String host, Nullable`1 port, String swarmPrivateKeyString, String minerPrivateKeyString, String storeType, String storePath, String[] iceServerStrings, String[] peerStrings, String[] trustedAppProtocolVersionSigners, Boolean rpcServer, String rpcListenHost, Nullable`1 rpcListenPort, Boolean graphQLServer, String graphQLHost, Nullable`1 graphQLPort, String graphQLSecretTokenPath, Boolean noCors, Int32 workers, Int32 confirmations, Boolean nonblockRenderer, Int32 nonblockRendererQueue, Boolean strictRendering, NetworkType networkType, Boolean isDev, Int32 blockInterval, Int32 reorgInterval, Boolean logActionRenders, String awsCognitoIdentity, String awsAccessKey, String awsSecretKey, String awsRegion, Int32 txLifeTime, Int32 messageTimeout, Int32 tipTimeout, Int32 demandBuffer, String[] staticPeerStrings, Int32 minerCount, Boolean skipPreload, Int32 minimumBroadcastTarget, Int32 bucketSize, String chainTipStaleBehaviorType, Int32 txQuotaPerSigner, Boolean rpcRemoteServer, Boolean rpcHttpServer, Int32 pollInterval, Int32 maximumPollPeers, String transportType, Nullable`1 cancellationToken) in /app/NineChronicles.Headless.Executable/Program.cs:line 367
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.