eos icon indicating copy to clipboard operation
eos copied to clipboard

Dawn 4.0 mongo_db_plugin does't work

Open red-butterfly opened this issue 8 years ago • 18 comments

The mongo_db_plugin does't work in EOS Dawn 4.0:

2629991ms thread-0 main.cpp:101 main ] /mnt/500G/project/blockchain/EOS/eos-4.0/libraries/appbase/application.cpp(290): Throw in function appbase::abstract_plugin &appbase::application::get_plugin(const string &) const Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorstd::runtime_error > std::exception::what: unable to find plugin: eosio::mongo_db_plugin

red-butterfly avatar May 14 '18 10:05 red-butterfly

I've got exactly same issue here (issue#3018)

BH4EHN avatar May 14 '18 11:05 BH4EHN

change CMakeLists.txt mongo_db_plugin compile error #

`[100%] Building CXX object plugins/mongo_db_plugin/CMakeFiles/mongo_db_plugin.dir/mongo_db_plugin.cpp.o /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:134:31: error: no member named 'block' in 'eosio::chain::block_trace' process_block(bt, bt.block); ~~ ^ /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:137:63: error: no member named 'block' in 'eosio::chain::block_trace' block_trace_queue.emplace_back(std::make_pair(bt, bt.block)); ~~ ^ /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:406:42: error: no member named 'receiver' in 'eosio::chain::action_trace' kvp("receiver", act.receiver.to_string()), ~~~ ^ /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:410:38: error: no member named 'data_access' in 'eosio::chain::action_trace' for (const auto& data : act.data_access) { ~~~ ^ /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:412:62: error: no member named 'data_access_info' in namespace 'eosio::chain' subdoc.append(kvp("type", data.type == chain::data_access_info::read ? "read" : "write"), ~~~~~~~^ /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:466:28: error: no member named 'region_traces' in 'eosio::chain::block_trace' for (const auto& rt: bt.region_traces) { ~~ ^ /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:477:28: error: no template named 'contains'; did you mean 'boost::contains'? if ( req.containschain::deferred_transaction() ) { ^~~~~~~~ boost::contains /home/server123/opt/boost_1_66_0/include/boost/algorithm/string/predicate.hpp:464:22: note: 'boost::contains' declared here using algorithm::contains; ^ /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:478:68: error: expected '(' for function-style cast or type construction auto trx = req.getchain::deferred_transaction(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:478:70: error: expected expression auto trx = req.getchain::deferred_transaction(); ^ /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:489:69: error: expected '(' for function-style cast or type construction auto cancel = req.getchain::deferred_reference(); ~~~~~~~~~~~~~~~~~~~~~~~~~^ /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:489:71: error: expected expression auto cancel = req.getchain::deferred_reference(); ^ /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:519:40: error: no member named 'input_transactions' in 'eosio::chain::signed_block'; did you mean 'transactions'? for (const auto& packed_trx : block.input_transactions) { ^~~~~~~~~~~~~~~~~~ transactions /home/server123/eos/libraries/chain/include/eosio/chain/block.hpp:58:37: note: 'transactions' declared here vector<transaction_receipt> transactions; /// new or generated transactions ^ /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:520:50: error: no member named 'get_signed_transaction' in 'eosio::chain::transaction_receipt' const signed_transaction& trx = packed_trx.get_signed_transaction(); ~~~~~~~~~~ ^ /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:533:39: error: no member named 'implicit_transactions' in 'eosio::chain::block_trace' for (const auto& implicit_trx : bt.implicit_transactions ){ ~~ ^ /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:592:30: error: no member named 'regions' in 'eosio::chain::signed_block' for (const auto& r: block.regions) { ~~~~~ ^ /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:831:34: error: no member named 'applied_block_callbacks' in 'eosio::chain::controller::config' chain_plug->chain_config().applied_block_callbacks.emplace_back( ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ /home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:833:34: error: no member named 'applied_irreversible_block_callbacks' in 'eosio::chain::controller::config' chain_plug->chain_config().applied_irreversible_block_callbacks.emplace_back( ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ 17 errors generated. plugins/mongo_db_plugin/CMakeFiles/mongo_db_plugin.dir/build.make:62: recipe for target 'plugins/mongo_db_plugin/CMakeFiles/mongo_db_plugin.dir/mongo_db_plugin.cpp.o' failed make[2]: *** [plugins/mongo_db_plugin/CMakeFiles/mongo_db_plugin.dir/mongo_db_plugin.cpp.o] Error 1 CMakeFiles/Makefile2:5547: recipe for target 'plugins/mongo_db_plugin/CMakeFiles/mongo_db_plugin.dir/all' failed make[1]: *** [plugins/mongo_db_plugin/CMakeFiles/mongo_db_plugin.dir/all] Error 2 Makefile:162: recipe for target 'all' failed make: *** [all] Error 2

>>>>>>>>>>>>>>>>>>>> MAKE building EOSIO has exited with the above error.

`

rise-worlds avatar May 14 '18 12:05 rise-worlds

programs/nodeos/CMakeLists.txt:60 the code have been commented。 so will not make the target object. And added db_size_api_plugin, so there will be something change on database.

paritygeeker avatar May 14 '18 23:05 paritygeeker

I've got identical issue as @rise-worlds trying to build mongodb plugin in docker, after modifying some makefiles to have it compiled / linked.

Will the plugin be phased out ? Is there any alternative to query historical block / transaction ?

ripley avatar May 24 '18 15:05 ripley

@ripley use the new sql_db_plugin

rise-worlds avatar May 25 '18 00:05 rise-worlds

@rise-worlds Thank you for the info, I just took a quick look at the files under directory plugins/sql_db_plugin, seems most of the them are skeletons for now. Did you successfully poll data and save to db via the plugin?

ripley avatar May 25 '18 04:05 ripley

I've got the same error although in Ubuntu the MongoDB plugin is compiled and built by default. I'm at this commit ID on master branch cd21f12e539452ff405729a4bf8bde0391172264 My nodeos version:

nodeos -v
3441553710

trungtt198x avatar May 31 '18 17:05 trungtt198x

Do you plan to enable the mongo_db_plugin? If I understand it correctly, without it there is no way to explore transactions (other than through the limited history API).

andr11111 avatar Jun 12 '18 21:06 andr11111

Maybe this PR will solve this: https://github.com/EOSIO/eos/pull/4304

noprom avatar Jun 24 '18 13:06 noprom

@noprom that is the idea. Try it out and let us know.

heifner avatar Jun 24 '18 17:06 heifner

@heifner , will try that out immediately.

noprom avatar Jun 24 '18 22:06 noprom

@heifner hi, wondering if there is a way to rebase this branch to have the mongo plugin isolated from other changes, or if you can suggest a way to merge this with 1.0.8 version. thanks!

gustavomick avatar Jul 04 '18 04:07 gustavomick

HI @gustavomick, you can try our docker image to setup the mongo in 5 seconds: https://github.com/EOSpace/eos-sync

noprom avatar Jul 04 '18 05:07 noprom

@heifner is mongo plugin filtering using filter-on config.ini setting? is there a way to filter? thanks

gustavomick avatar Jul 05 '18 06:07 gustavomick

  • I just rebased with release/1.1.
  • There is currently no filter capability. What kind of filter capability are you interested in? A filter of which collections get populated?

heifner avatar Jul 05 '18 15:07 heifner

@heifner thanks , yeah i would like to know if is possible to filter using the config.ini filter-on parameter, i think is really handy for dapp that has a full node and only whant specific transactions on their history (like only those related to the dapps contract) so together with that history filtering should be very useful that mongoplugin would be replicating only those in the same fashion. or is other way to do that? thanks!

gustavomick avatar Jul 05 '18 18:07 gustavomick

agreed with @gustavomick

blocksbarcelona avatar Jul 05 '18 20:07 blocksbarcelona

see #4304

wanderingbort avatar Jul 09 '18 14:07 wanderingbort