-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Monero Wallet RPC stops responding to Monero Python module after some time #5612
Comments
Please send a wallet stack trace when this occurs: gdb /path/to/monero-wallet-rpc PID Replace PID by the pid of the wallet that is unresponsive, and the path with the actual path. |
The wallet-rpc continues to run in a separate tmux window. Does this suggest that it is probably an issue with the Monero Python module? |
Maybe. We will know once we work out what's going on :) |
I have found that the last two lines of the log file of the wallet RPC that becomes unresponsive don't appear in working ones. The last lines of the log file look as follows:
|
That means it might be the daemon that wedges in a RPC. Send a stack trace for the daemon too. |
Thanks for your help. I have been looking into the issue to understand it better. Do you think the following log of the daemon may be relevant to the problem?
I am also not sure why I get the following error when I connected the three nodes to each other using the "--add-exclusive-node" option.
|
Yes. It should not happen. Give all relevant information for the case where it happens. Same for the second thing. |
I find it strange that "no peers are available." When I use "print_pl" in the daemon, no peers appear. I am not sure if this issue is relevant to the original problem, but how can I add the other two nodes in my test network? I tried -add-exclusive-node and --add-peer, but neither of them seems to work. |
I use --add-exclusive-node myself, it works fine. print_pl shows known peers. print_cn shows current connections. |
One of my commands:
|
My command looks very similar to yours, except that I am not using --regtest. The following is where the programs starts to go wrong. The line "n_indices is only 0" is the first error log. Perhaps the transaction being sent to the daemon is defective?
|
Can you please post the results of: mdb_dump -s tpxool_blob ~/.bitmonero/lmdb To paste.debian.net or similar site ? |
I put the result here because it was short. Please let me know if you prefer paste.debian.net. All three nodes' blockchains had the following result:
|
This is puzzling. |
Everything is running on 'Boron Butterfly' (v0.14.1.0-51766d02). I am using tmux to create windows for three daemons and three corresponding wallets. Using python module, I load wallets and daemons and create transactions as follows:
It seems that around 5-10 transactions go through successfully. But eventually the program comes to a halt with the traceback output in the original question. I have noticed that I sometimes get the following traceback output:
|
What are the command lines you use for each ? |
Starting a daemon:
Starting wallet RPC:
I'm using 18.04.2 LTS (Bionic Beaver) |
You may also use the following Python snippet to enable full debug logging and learn what exact data is being passed in the RPC requests:
BTW, are you using testnet as in public testnet, or you're creating your own local blockchain from scratch? |
I am creating my own local blockchain. Built based on what is described here: https://github.com/moneroexamples/private-testnet I have noticed that the following is another very common error message from some of the daemons:
|
You can ignore the timeouts. |
To clarify my issue, my program connects to wallets and their daemons using the Python Monero module inside a docker container as follows:
In the beginning, my program makes some transactions between the wallets, but then abruptly an HTTP connection to one of the wallets fails to start. The wallet RPC window hangs on "asking for 1 transactions" indefinitely. When I check the daemon log messages, the node that has failed usually outputs "Failed to calculate tx prunable hash," although I am not sure if this is always the case. The other nodes have a lot of the "(-4, LEVIN_ERROR_CONNECTION_TIMEDOUT)" error in their daemon logs. |
@moneromooo-monero Sorry, I missed your last response. How can I just ignore the timeouts? I cannot reconnect to the wallets once the connections becomes faulty. |
AFAICT, the exception kills the RPC thread, so the client never gets a reply. The timeouts are a consequence of that, not the actual problem. I'll debug that hopefully tomorrow. |
@moneromooo-monero I see. But what problem is causing the exceptions? Also, is there a way to reopen the connection? Thanks again for looking into this. |
Fixed in #5634 The n_indices is only 0 should not be an error, it means "we don't have enough outs to check anything yet, so we don't check anything". I'll fix it to be a debug message, |
Although the timeout error has disappeared, now I am getting a "block orphaned and rejected" error and the n_indices error appears again along with a "key image already spent" error later on.
|
If you're sure it should not be orphaned, file a bug. |
Okay. I was wondering one thing: If I add nodes using "--add-exclusive-node," then the nodes should appear in "print_cn" list and transactions must be relayed to the peers, right? |
Yes. |
I wrote a program that repeatedly requests for JSON responses from Monero Wallet RPCs at time intervals ranging from 10 seconds to a minute. Everything is running on a testnet in my local network.
Strangely, the RPC often stops responding after a while, causing a time out error. I cannot even reconnect to the wallet once the error occurs.
I observed that the problem only occurs when I run multiple instances of the program at the same time. So perhaps there is some kind of collision happening. Each instance of the program is connected to a different wallet on a different port, though. Also, the problem persists when I run a single Python module connected to multiple wallets.
The following is the traceback output:
The text was updated successfully, but these errors were encountered: