Snipa22 / nodejs-pool

Other
481 stars 421 forks source link

api error #452

Open 011248163264 opened 5 years ago

011248163264 commented 5 years ago

i have found this issui after an clean install on ubuntu

/home/xmr/.pm2/logs/api-error.log last 15 lines: 1|api | at Object. (/home/xmr/nodejs-pool/init.js:11:22) 1|api | at Module._compile (module.js:635:30) 1|api | at Object.Module._extensions..js (module.js:646:10) 1|api | at Module.load (module.js:554:32) 1|api | at tryModuleLoad (module.js:497:12) 1|api | at Function.Module._load (module.js:489:3) 1|api | at Object. (/home/xmr/.nvm/versions/node/v8.9.3/lib/node_modules/pm2/lib/ProcessContainerFork.js:75:21) 1|api | at Module._compile (module.js:635:30) 1|api | at Object.Module._extensions..js (module.js:646:10) 1|api | at Module.load (module.js:554:32) 1|api | at tryModuleLoad (module.js:497:12) 1|api | at Function.Module._load (module.js:489:3) 1|api | at Function.Module.runMain (module.js:676:10) 1|api | at startup (bootstrap_node.js:187:16) 1|api | at bootstrap_node.js:608:3

camthegeek commented 5 years ago

This is only a partial print of the error. Try opening /home/xmr/.pm2/logs/api-error.log and then getting the full error from there. This does not mean we want the whole error log but the error from start to finish.

011248163264 commented 5 years ago

ok the error its not coming up again, but i have a new:

2018-09-03 10:29 +00:00: {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":18081} 2018-09-03 10:29 +00:00: TypeError: Cannot read property 'block_header' of undefined at /home/xmr/nodejs-pool/lib/worker.js:448:32 at /home/xmr/nodejs-pool/lib/support.js:100:24 at Object.parseBody (/home/xmr/nodejs-pool/node_modules/request-json/main.js:74:12) at Request._callback (/home/xmr/nodejs-pool/node_modules/request-json/main.js:148:26) at self.callback (/home/xmr/nodejs-pool/node_modules/request-json/node_modules/request/request.js:187:22) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at Request.onRequestError (/home/xmr/nodejs-pool/node_modules/request-json/node_modules/request/request.js:813:8) at emitOne (events.js:116:13) at ClientRequest.emit (events.js:211:7) at Socket.socketErrorListener (_http_client.js:387:9) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at emitErrorNT (internal/streams/destroy.js:64:8) at args.(anonymous function) (/home/xmr/.nvm/versions/node/v8.9.3/lib/node_modules/pm2/node_modules/event-loop-inspector/index.js:133:29) at _combinedTickCallback (internal/process/next_tick.js:138:11)

011248163264 commented 5 years ago

worker-error.log

011248163264 commented 5 years ago

the api-error.log is empty

011248163264 commented 5 years ago

the blockManager-error.log:

2018-09-03 10:29 +00:00: {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":18081} Upstream error from the block daemon. Resetting scanner due to: {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":18081}

011248163264 commented 5 years ago

when i try also connect to api in the webbrowser: http://192.168.1.141/api/authenticate

Cannot GET /authenticate

i cannot login to admin gui, with the default login, but also with a changed user and password

bobbieltd commented 5 years ago

Your server hardware specification ? Manual installation by commands or you curled the bash ?

011248163264 commented 5 years ago

Hi, thats a testsytem asus laptop with i5 8GB RAM Ubuntu 1604 Installation with curl

bobbieltd commented 5 years ago

The bash is oudated and it won’t download blockchain and sync for you. Your monerod is not synced. Check monerod log and wait until it is synced.

011248163264 commented 5 years ago

Ok thats my log bitmonero log:

2018-09-03 11:24:58.305 7f72025a4740 INFO global src/daemon/main.cpp:279 Monero 'Helium Hydra' (v0.11.1.0-793bc97) 2018-09-03 11:24:58.305 7f72025a4740 INFO global src/daemon/protocol.h:55 Initializing cryptonote protocol... 2018-09-03 11:24:58.305 7f72025a4740 INFO global src/daemon/protocol.h:60 Cryptonote protocol initialized OK 2018-09-03 11:24:58.306 7f72025a4740 INFO global src/daemon/p2p.h:63 Initializing p2p server... 2018-09-03 11:24:58.576 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:120 Exception: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector > 2018-09-03 11:24:58.576 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:121 Unwound call stack: 2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [1] ./monerod:cxa_throw+0x106 [0x7cc756] 2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [2] ./monerod:void boost::throw_exception(boost::system::system_error const&)+0x1d1 [0x5854a1] 2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [3] ./monerod:boost::asio::detail::do_throw_error(boost::system::error_code const&, char const*)+0x55 [0x585585] 2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [4] ./monerod:boost::asio::basic_socket_acceptor<boost::asio::ip::tcp, boost::asio::socket_acceptor_service >::bind(boost::asio::ip::basic_endpoint const&)+0x8d [0x5a358d] 2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [5] ./monerod:epee::net_utils::boosted_tcp_server<epee::levin::async_protocol_handler<nodetool::p2p_connection_context_t > >::init_server(unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator >)+0x35c [0x662f3c] 2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [6] ./monerod:epee::net_utils::boosted_tcp_server<epee::levin::async_protocol_handler<nodetool::p2p_connection_context_t > >::init_server(std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)+0x71 [0x6638c1] 2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [7] ./monerod:nodetool::node_server<cryptonote::t_cryptonote_protocol_handler >::init(boost::program_options::variables_map const&)+0x17ea [0x66532a] 2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [8] ./monerod:daemonize::t_p2p::t_p2p(boost::program_options::variables_map const&, daemonize::t_protocol&)+0x4d9 [0x666d49] 2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [9] ./monerod:daemonize::t_daemon::t_daemon(boost::program_options::variables_map const&)+0x4e6 [0x5719d6] 2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [10] ./monerod:daemonize::t_executor::run_interactive(boost::program_options::variables_map const&)+0x1d [0x67994d] 2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [11] ./monerod:bool daemonizer::daemonize(int, char const**, daemonize::t_executor&&, boost::program_options::variables_map const&)+0x17c [0x67bd3c] 2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [12] ./monerod:main+0x14be [0x54703e] 2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [13] /lib/x86_64-linux-gnu/libc.so.6:libc_start_main+0xf0 [0x7f71ffb1d830] 2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [14] ./monerod:_start+0x29 [0x54e0d9] 2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159
2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:120 Exception: std::runtime_error 2018-09-03 11:24:58.600 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:121 Unwound call stack: 2018-09-03 11:24:58.601 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [1] ./monerod:cxa_throw+0x106 [0x7cc756] 2018-09-03 11:24:58.601 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [2] ./monerod:daemonize::t_p2p::t_p2p(boost::program_options::variables_map const&, daemonize::t_protocol&)+0x655 [0x666ec5] 2018-09-03 11:24:58.601 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [3] ./monerod:daemonize::t_daemon::t_daemon(boost::program_options::variables_map const&)+0x4e6 [0x5719d6] 2018-09-03 11:24:58.601 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [4] ./monerod:daemonize::t_executor::run_interactive(boost::program_options::variables_map const&)+0x1d [0x67994d] 2018-09-03 11:24:58.601 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [5] ./monerod:bool daemonizer::daemonize(int, char const*, daemonize::t_executor&&, boost::program_options::variables_map const&)+0x17c [0x67bd3c] 2018-09-03 11:24:58.601 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [6] ./monerod:main+0x14be [0x54703e] 2018-09-03 11:24:58.601 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [7] /lib/x86_64-linux-gnu/libc.so.6:__libc_start_main+0xf0 [0x7f71ffb1d830] 2018-09-03 11:24:58.601 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [8] ./monerod:_start+0x29 [0x54e0d9] 2018-09-03 11:24:58.601 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159
2018-09-03 11:24:58.601 7f72025a4740 INFO global src/daemon/core.h:89 Deinitializing core... 2018-09-03 11:24:58.602 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:120 Exception: cryptonote::DB_ERROR
2018-09-03 11:24:58.602 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:121 Unwound call stack: 2018-09-03 11:24:58.603 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [1] ./monerod:
cxa_throw+0x106 [0x7cc756] 2018-09-03 11:24:58.603 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [2] ./monerod:cryptonote::Blockchain::deinit()+0x496 [0x739c76] 2018-09-03 11:24:58.603 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [3] ./monerod:cryptonote::core::deinit()+0x25 [0x767535] 2018-09-03 11:24:58.603 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [4] ./monerod:daemonize::t_core::~t_core()+0xcb [0x58fc4b] 2018-09-03 11:24:58.603 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [5] ./monerod:daemonize::t_daemon::t_daemon(boost::program_options::variables_map const&)+0x7ef [0x571cdf] 2018-09-03 11:24:58.603 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [6] ./monerod:daemonize::t_executor::run_interactive(boost::program_options::variables_map const&)+0x1d [0x67994d] 2018-09-03 11:24:58.603 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [7] ./monerod:bool daemonizer::daemonize(int, char const*, daemonize::t_executor&&, boost::program_options::variables_map const&)+0x17c [0x67bd3c] 2018-09-03 11:24:58.603 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [8] ./monerod:main+0x14be [0x54703e] 2018-09-03 11:24:58.603 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [9] /lib/x86_64-linux-gnu/libc.so.6:__libc_start_main+0xf0 [0x7f71ffb1d830] 2018-09-03 11:24:58.603 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159 [10] ./monerod:_start+0x29 [0x54e0d9] 2018-09-03 11:24:58.603 7f72025a4740 INFO stacktrace src/common/stack_trace.cpp:159
2018-09-03 11:24:58.603 7f72025a4740 ERROR daemon src/daemon/core.h:94 Failed to deinitialize core... 2018-09-03 11:24:58.603 7f72025a4740 INFO global src/daemon/protocol.h:77 Stopping cryptonote protocol... 2018-09-03 11:24:58.603 7f72025a4740 INFO global src/daemon/protocol.h:81 Cryptonote protocol stopped successfully 2018-09-03 11:24:58.603 7f72025a4740 ERROR daemon src/daemon/main.cpp:287 Exception in main! Failed to initialize p2p server. 2018-09-03 11:25:12.123 7fd1885ba740 INFO logging contrib/epee/src/mlog.cpp:148 New log categories:
:WARNING,net:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,stacktrace:INFO,logging:INFO,msgwriter:INFO 2018-09-03 11:25:12.127 7fd1885ba740 ERROR msgwriter src/common/scoped_message_writer.h:102 Error: Couldn't connect to daemon: 127.0.0.1:18081

bobbieltd commented 5 years ago

Monerod is in error. Git the latest monero + check firewall if port 18080 is open + if your harddisk has more than 100Gb free.

011248163264 commented 5 years ago

who must i save the passwordfile ?

Monero 'Helium Hydra' (v0.11.1.0-793bc97) Logging to /usr/local/src/monero/build/release/bin/monero-wallet-rpc.log 2018-09-03 11:34:06.702 7fb189a85740 WARN wallet.rpc src/wallet/wallet_rpc_server.cpp:1853 Loading wallet... Error: the password file specified could not be read

bobbieltd commented 5 years ago

sudo systemctl stop monero cd /usr/local/src sudo rm -rf monero sudo git clone --recursive https://github.com/monero-project/monero cd monero sudo make -j2 sudo systemctl start monero Check log and wait for full sync.

bobbieltd commented 5 years ago

Your monero is oudated. You need the latest or at least v0.12.x

bobbieltd commented 5 years ago

For wallet, you can bind localhost 127.0.0.1, no need password for simplicity. Disable rpcpassword in mysql config if you enable it par hasard.

bobbieltd commented 5 years ago

I misunderstood. the password file specified could not be read , you need create pass_file with wallet password in content and run wallet rpc with password parameter to that file.

011248163264 commented 5 years ago

ok i try to update monero first

bobbieltd commented 5 years ago

Please read the readme of Monero github. Run this : sudo apt update && sudo apt install build-essential cmake pkg-config libboost-all-dev libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-dev libexpat1-dev doxygen graphviz libpcsclite-dev libpgm-dev

011248163264 commented 5 years ago

i connot finish the compiling:

make[1]: Verzeichnis „/usr/local/src/monero/build/release“ wird verlassen Makefile:72: die Regel für Ziel „release-all“ scheiterte make: *** [release-all] Fehler 2

bobbieltd commented 5 years ago

Try this ( I guess you forgot —recursive when git ) sudo apt update && sudo apt install build-essential cmake pkg-config libboost-all-dev libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-dev libexpat1-dev doxygen graphviz libpcsclite-dev libpgm-dev cd /usr/local/src/monero sudo git submodule init && sudo git submodule update sudo make -j2

011248163264 commented 5 years ago

i make sudo git clone --recursive https://github.com/monero-project/monero

bobbieltd commented 5 years ago

Ubuntu version ? Try Ubuntu 16.04

bobbieltd commented 5 years ago

Ahhhh, if you curled the bash, you need to remove all gtest libs installed by the bash.

011248163264 commented 5 years ago

can i also try to install without curl

bobbieltd commented 5 years ago

The worst case, download monero release binary files and run without compilation.

011248163264 commented 5 years ago

I have installed ubuntu 16.04 desktop

bobbieltd commented 5 years ago

The problem now that you still can not run Monero daemon. You can not do anything. Try this sudo rm /usr/lib/libg* and try to sudo make again

011248163264 commented 5 years ago

sudo rm /usr/lib/libg* the same issue

so i must have the binary monero ?

bobbieltd commented 5 years ago

It is sure that you the bash file but you need to run it manually and try to fix if any command is not correct anymore. Curling the bash won’t work anymore (many things are outdated). Snipa is on Hawai :)) and doesn’t maintain this repo so even if I PR the changes, no one will merge it.

bobbieltd commented 5 years ago

Look at error and try to look at Monero’s repo issues. Your problem now is how to compile and run Monero daemon.

011248163264 commented 5 years ago

can i use this version ? https://getmonero.org/downloads/#linux