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

Unhandled exception when using RocksDBStore plugin #330

Closed
AnnaShaleva opened this issue Aug 25, 2020 · 8 comments · Fixed by #332
Closed

Unhandled exception when using RocksDBStore plugin #330

AnnaShaleva opened this issue Aug 25, 2020 · 8 comments · Fixed by #332
Assignees

Comments

@AnnaShaleva
Copy link
Member

Describe the bug
I'm using Neo 3 preview3 release of neo-cli and trying to switch from LevelDBStore to RocksDBStore Plugin. I'm able to install RocksDBStore via neo-cli, but when I'm trying to re-run neo-cli with "Storage": {"Engine": "RocksDBStore"}, configuration, I get the following error:

NEO-CLI v3.0.0-preview3  -  NEO v3.0.0-preview3-00  -  NEO-VM v3.0.0-preview3

neo> [12:50:38.524] System.IO.FileNotFoundException
Could not load file or assembly 'RocksDbSharp, Version=6.2.2.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

   at Neo.Plugins.Storage.Store..ctor(String path)
   at Neo.Plugins.Storage.RocksDBStore.GetStore()
   at Neo.NeoSystem..ctor(String storageEngine)
   at Neo.CLI.MainService.Start(String[] args)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_1(Object state)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'RocksDbSharp, Version=6.2.2.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

File name: 'RocksDbSharp, Version=6.2.2.0, Culture=neutral, PublicKeyToken=null'
   at Neo.Plugins.Storage.Store..ctor(String path)
   at Neo.Plugins.Storage.RocksDBStore.GetStore()
   at Neo.NeoSystem..ctor(String storageEngine)
   at Neo.CLI.MainService.Start(String[] args)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_1(Object state)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()


Aborted (core dumped)

The same thing happens when I'm trying to install RocksDBStore Plugin manually. This problem looks like #198.

I tried also to unzip RocksDBSharp.dll into Plugins folder from nuget.org, but then it turns out that RocksDBNative.dll is also required and missing

To Reproduce
Steps to reproduce the behavior:

  1. Download and unzip neo-cli v3.0.0-preview3 for linux-x64 from releases
  2. Download RocksDBStore Plugin v3.0.0-preview3 from releases
  3. Unzip RocksDBStore plugin into neo-cli/Plugins/ folder as described in guide
  4. Setup single-node environment as described in guide (with "Storage": {"Engine": "RocksDBStore"}, configuration)
  5. Run ./neo-cli

Expected behavior
Node is running with RocksDB storage.

Platform:

  • OS: Ubuntu 18.04.4 LTS (Bionic Beaver)
  • Version: neo-cli v3.0.0-preview3
@shargon shargon mentioned this issue Aug 25, 2020
@shargon shargon self-assigned this Aug 25, 2020
@shargon
Copy link
Member

shargon commented Aug 26, 2020

Could you check this change #332 ?

@AnnaShaleva
Copy link
Member Author

I built #332 and put binaries into Plugins folder. Unfortunately, this does not solve the problem.

@shargon
Copy link
Member

shargon commented Aug 26, 2020

I see that your error was different to my error, i will check it again

@kokahunter
Copy link

kokahunter commented Aug 26, 2020

I experienced this with previous neo versions and leveldb. rocksdb.dll is probably missing in neo-cli path.

This is a small challenge as well when developing plugins with other dependencies as you have to find out which dll is needed in neo-cli path and which in the plugin path.

Would be nice to have a cleaner solution for this.

@shargon
Copy link
Member

shargon commented Aug 26, 2020

The release binary doesn't contains the dependencies. Could you create a new relase with it @superboyiii ? Also it will require #332 for work.

@superboyiii
Copy link
Member

The release binary doesn't contains the dependencies. Could you create a new relase with it @superboyiii ? Also it will require #332 for work.

Fine, whenever it's merged.

@superboyiii
Copy link
Member

I experienced this with previous neo versions and leveldb. rocksdb.dll is probably missing in neo-cli path.

This is a small challenge as well when developing plugins with other dependencies as you have to find out which dll is needed in neo-cli path and which in the plugin path.

Would be nice to have a cleaner solution for this.

Are you in linux? Would you like to try install this dependency? neo-project/docs#1127

@AnnaShaleva
Copy link
Member Author

AnnaShaleva commented Aug 27, 2020

@superboyiii, all works fine with the following things done:

  1. Binaries of RocksDBStore from Fix RocksDb #332 inside the neo-cli/Plugins folder
  2. RocksDBSharp.dll from https://www.nuget.org/packages/RocksDbSharp/ inside the neo-cli folder
  3. sudo apt-get install librocksdb-dev

All of these components are required.

AnnaShaleva added a commit to nspcc-dev/neo-bench that referenced this issue Aug 28, 2020
Release version of RocksDBStore does not work properly, that's why we
have to build it from source. It also requires RocksDBSharp.dll which
can be fetched from nuget portal. It also requires librocksdb-dev.

See neo-project/neo-modules#330
AnnaShaleva added a commit to nspcc-dev/neo-bench that referenced this issue Sep 1, 2020
Release version of RocksDBStore does not work properly, that's why we
have to build it from source. It also requires RocksDBSharp.dll which
can be fetched from nuget portal. It also requires librocksdb-dev.

See neo-project/neo-modules#330
AnnaShaleva added a commit to nspcc-dev/neo-bench that referenced this issue Sep 1, 2020
Release version of RocksDBStore does not work properly, that's why we
have to build it from source. It also requires RocksDBSharp.dll which
can be fetched from nuget portal. It also requires librocksdb-dev.

See neo-project/neo-modules#330
AnnaShaleva added a commit to nspcc-dev/neo-bench that referenced this issue Sep 1, 2020
Release version of RocksDBStore does not work properly, that's why we
have to build it from source. It also requires RocksDBSharp.dll which
can be fetched from nuget portal. It also requires librocksdb-dev.

See neo-project/neo-modules#330
AnnaShaleva added a commit to nspcc-dev/neo-bench that referenced this issue Sep 2, 2020
Release version of RocksDBStore does not work properly, that's why we
have to build it from source. It also requires librocksdb-dev.

See neo-project/neo-modules#330
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.

4 participants