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

RockDb FileNotFoundException #3419

Open
vncoelho opened this issue Jul 15, 2024 · 18 comments · May be fixed by #3666
Open

RockDb FileNotFoundException #3419

vncoelho opened this issue Jul 15, 2024 · 18 comments · May be fixed by #3666

Comments

@vncoelho
Copy link
Member

Sometime ago I was able to run RocksDbStore normally.

Nowadays it is returning a crash

neo> FATAL [17:14:42.250] 	System.IO.FileNotFoundException
Could not load file or assembly 'RocksDbSharp, Version=8.11.3.46984,  Culture=neutral,  PublicKeyToken=null'. The...ch()
   at  System.Thr...eadStart()
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'RocksDbSharp, Version=8.11.3.46984, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

File name: 'RocksDbSharp, Version=8.11.3.46984, Culture=neutral, PublicKeyToken=null'
   at Neo.Plugins.Storage.Store..ctor(String path)
   at Neo.Plugins.Storage.RocksDBStore.GetStore(String path)
   at Neo.NeoSystem..ctor(ProtocolSettings settings, IStoreProvider storageProvider, String storagePath) in /opt/neoLib/src/Neo/NeoSystem.cs:line 136
   at Neo.NeoSystem..ctor(ProtocolSettings settings, String storageProvider, String storagePath) in /opt/neoLib/src/Neo/NeoSystem.cs:line 120
   at Neo.CLI.MainService.Start(CommandLineOptions options) in /opt/neoLib/src/Neo.CLI/CLI/MainService.cs:line 380
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
/opt/start_node.sh: line 2:   103 Aborted                 (core dumped) dotnet neo-cli.dll

The only method I have now in master to run a node in a consensus is MemoryStore. The rest is all bugging.

The configuration I used is the same as before. I run all setup with Docker images.
Build with mcr.microsoft.com/dotnet/sdk:8.0.303-jammy
Run with mcr.microsoft.com/dotnet/aspnet:8.0.7-jammy

There is no change from previous setup that was successful.

@vncoelho vncoelho changed the title RockDb corrupted RockDb FileNotFoundException Jul 15, 2024
@cschuchardt88
Copy link
Member

This has to do with running neo-cli as a dll. You have to call Plugins.Loaddlls manually.

@vncoelho
Copy link
Member Author

This has to do with running neo-cli as a dll. You have to call Plugins.Loaddlls manually.

Since when?
This was never a requirement before

@cschuchardt88
Copy link
Member

cschuchardt88 commented Jul 16, 2024

This has to do with running neo-cli as a dll. You have to call Plugins.Loaddlls manually.

Since when? This was never a requirement before

I think its a dotnet thing with static classes. I had to do this for new-cli. Because it wasn't loading plugins' store.

You maybe just need to copy the runtimes directory from RocksDBStore folder to neo-cli folder

Also PR #3372 seeks to fix all these issue with current neo-cli so please, i need your support.

image

@cschuchardt88
Copy link
Member

@vncoelho has problem been resolved?

@cschuchardt88
Copy link
Member

Resolved

@vncoelho
Copy link
Member Author

neo> FATAL [16:50:41.214] 	System.IO.FileNotFoundException
Could not load file or assembly 'RocksDbSharp, Version=9.4.0.50294,  Culture=neutral,  PublicKeyToken=null'. The...ch()
   at  System.Thr...eadStart()
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'RocksDbSharp, Version=9.4.0.50294, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

File name: 'RocksDbSharp, Version=9.4.0.50294, Culture=neutral, PublicKeyToken=null'
   at Neo.Plugins.Storage.Store..ctor(String path)
   at Neo.Plugins.Storage.RocksDBStore.GetStore(String path)
   at Neo.NeoSystem..ctor(ProtocolSettings settings, IStoreProvider storageProvider, String storagePath) in /opt/neoLib/src/Neo/NeoSystem.cs:line 137
   at Neo.NeoSystem..ctor(ProtocolSettings settings, String storageProvider, String storagePath) in /opt/neoLib/src/Neo/NeoSystem.cs:line 121
   at Neo.CLI.MainService.Start(CommandLineOptions options) in /opt/neoLib/src/Neo.CLI/CLI/MainService.cs:line 381
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
/opt/start_node.sh: line 2:   104 Aborted                 (core dumped) dotnet neo-cli.dll
root@8bb53b08234a:/# 

not resolved yet perhaps, were you able to use it?

@vncoelho vncoelho reopened this Oct 29, 2024
@vncoelho
Copy link
Member Author

@cschuchardt88 I just tried with current master branch and all deps installed

@Hecate2
Copy link
Contributor

Hecate2 commented Dec 4, 2024

Does it work now?

@shargon
Copy link
Member

shargon commented Jan 8, 2025

@vncoelho do you still receiving this error?

@vncoelho
Copy link
Member Author

vncoelho commented Jan 8, 2025

@vncoelho do you still receiving this error?

I will check asap until tomorrow.

@vncoelho
Copy link
Member Author

vncoelho commented Jan 8, 2025

@shargon, verified and the same error.

NEO-CLI v3.7.5  -  NEO v3.7.5  -  NEO-VM v3.7.5

neo> FATAL [17:53:28.539] 	System.IO.FileNotFoundException
Could not load file or assembly 'RocksDbSharp, Version=9.4.0.50294,  Culture=neutral,  PublicKeyToken=null'. The...ch()
   at  System.Thr...eadStart()
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'RocksDbSharp, Version=9.4.0.50294, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

File name: 'RocksDbSharp, Version=9.4.0.50294, Culture=neutral, PublicKeyToken=null'
   at Neo.Plugins.Storage.Store..ctor(String path)
   at Neo.Plugins.Storage.RocksDBStore.GetStore(String path)
   at Neo.NeoSystem..ctor(ProtocolSettings settings, IStoreProvider storageProvider, String storagePath) in /opt/neoLib/src/Neo/NeoSystem.cs:line 137
   at Neo.NeoSystem..ctor(ProtocolSettings settings, String storageProvider, String storagePath) in /opt/neoLib/src/Neo/NeoSystem.cs:line 121
   at Neo.CLI.MainService.Start(CommandLineOptions options) in /opt/neoLib/src/Neo.CLI/CLI/MainService.cs:line 381
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
/opt/start_node.sh: line 2:   667 Aborted                 (core dumped) ( cd /opt/node/Neo.CLI/; dotnet neo-cli.dll )

Client has

RUN apt-get update && apt-get install -y --no-install-recommends \
	    unzip \
	    screen \
	    expect \
	    libsnappy-dev \
	    libleveldb-dev \
	    librocksdb-dev \

@shargon
Copy link
Member

shargon commented Jan 8, 2025

@shargon, verified and the same error.

NEO-CLI v3.7.5  -  NEO v3.7.5  -  NEO-VM v3.7.5

neo> FATAL [17:53:28.539] 	System.IO.FileNotFoundException
Could not load file or assembly 'RocksDbSharp, Version=9.4.0.50294,  Culture=neutral,  PublicKeyToken=null'. The...ch()
   at  System.Thr...eadStart()
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'RocksDbSharp, Version=9.4.0.50294, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

File name: 'RocksDbSharp, Version=9.4.0.50294, Culture=neutral, PublicKeyToken=null'
   at Neo.Plugins.Storage.Store..ctor(String path)
   at Neo.Plugins.Storage.RocksDBStore.GetStore(String path)
   at Neo.NeoSystem..ctor(ProtocolSettings settings, IStoreProvider storageProvider, String storagePath) in /opt/neoLib/src/Neo/NeoSystem.cs:line 137
   at Neo.NeoSystem..ctor(ProtocolSettings settings, String storageProvider, String storagePath) in /opt/neoLib/src/Neo/NeoSystem.cs:line 121
   at Neo.CLI.MainService.Start(CommandLineOptions options) in /opt/neoLib/src/Neo.CLI/CLI/MainService.cs:line 381
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
/opt/start_node.sh: line 2:   667 Aborted                 (core dumped) ( cd /opt/node/Neo.CLI/; dotnet neo-cli.dll )

Client has

RUN apt-get update && apt-get install -y --no-install-recommends \
	    unzip \
	    screen \
	    expect \
	    libsnappy-dev \
	    libleveldb-dev \
	    librocksdb-dev \

Could you show us the ls output, where is the RocksDbSharp library located?

@vncoelho
Copy link
Member Author

vncoelho commented Jan 8, 2025

@shargon, verified and the same error.

NEO-CLI v3.7.5  -  NEO v3.7.5  -  NEO-VM v3.7.5

neo> FATAL [17:53:28.539] 	System.IO.FileNotFoundException
Could not load file or assembly 'RocksDbSharp, Version=9.4.0.50294,  Culture=neutral,  PublicKeyToken=null'. The...ch()
   at  System.Thr...eadStart()
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'RocksDbSharp, Version=9.4.0.50294, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

File name: 'RocksDbSharp, Version=9.4.0.50294, Culture=neutral, PublicKeyToken=null'
   at Neo.Plugins.Storage.Store..ctor(String path)
   at Neo.Plugins.Storage.RocksDBStore.GetStore(String path)
   at Neo.NeoSystem..ctor(ProtocolSettings settings, IStoreProvider storageProvider, String storagePath) in /opt/neoLib/src/Neo/NeoSystem.cs:line 137
   at Neo.NeoSystem..ctor(ProtocolSettings settings, String storageProvider, String storagePath) in /opt/neoLib/src/Neo/NeoSystem.cs:line 121
   at Neo.CLI.MainService.Start(CommandLineOptions options) in /opt/neoLib/src/Neo.CLI/CLI/MainService.cs:line 381
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
/opt/start_node.sh: line 2:   667 Aborted                 (core dumped) ( cd /opt/node/Neo.CLI/; dotnet neo-cli.dll )

Client has

RUN apt-get update && apt-get install -y --no-install-recommends \
	    unzip \
	    screen \
	    expect \
	    libsnappy-dev \
	    libleveldb-dev \
	    librocksdb-dev \

Could you show us the ls output, where is the RocksDbSharp library located?

Do you know the list of required dlls for this plug-in?

@shargon
Copy link
Member

shargon commented Jan 8, 2025

RocksDbSharp

RocksDbSharp is a nuget, so at least RocksDbSharp.dll

@vncoelho
Copy link
Member Author

vncoelho commented Jan 8, 2025

aheuaea, the .dll is there. However, just the dlls.

For OracleService, for example, we have:

if [ $PLUGIN_TO_INCLUDE = "OracleService" ]; then
    echo "Going to copy file $ORIGIN_PATH/$PLUGIN_TO_INCLUDE.dll TO $DEST_FOLDER - and some other dependencies"
    cp -ri $ORIGIN_PATH/$PLUGIN_TO_INCLUDE.dll $DEST_FOLDER
    cp -ri $ORIGIN_PATH/Neo.FileStorage.API.dll $DEST_FOLDER
    cp -ri $ORIGIN_PATH/Grpc.Net.Common.dll $DEST_FOLDER
    cp -ri $ORIGIN_PATH/Grpc.Net.ClientFactory.dll $DEST_FOLDER
    cp -ri $ORIGIN_PATH/Grpc.Net.Client.dll $DEST_FOLDER
    cp -ri $ORIGIN_PATH/Grpc.Core.Api.dll $DEST_FOLDER
    cp -ri $ORIGIN_PATH/Grpc.AspNetCore.Server.dll $DEST_FOLDER
    cp -ri $ORIGIN_PATH/Grpc.AspNetCore.Server.ClientFactory.dll $DEST_FOLDER
    cp -ri $ORIGIN_PATH/Google.Protobuf.dll $DEST_FOLDER
    exit 
fi

@cschuchardt88
Copy link
Member

problem solved #3665

@vncoelho vncoelho linked a pull request Jan 9, 2025 that will close this issue
@vncoelho
Copy link
Member Author

vncoelho commented Jan 9, 2025

Your suggestion on @cschuchardt88 also solves

<ItemGroup>
  <ProjectReference Include="..\Plugins\RocksDBStore\RocksDBStore.csproj" />
</ItemGroup>

I think that is enough for now.

@Jim8y
Copy link
Contributor

Jim8y commented Jan 9, 2025

close this issue? @vncoelho

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

Successfully merging a pull request may close this issue.

5 participants