Skip to content

Owner API "can't create Tokio runtime" #509

@JKKGBE

Description

@JKKGBE

Describe the bug
After authenticating with wallet's Owner API, when calling

node_height
init_send_tx (estimate)
init_send_tx
retrieve_txs

for some time in a loop, in an interval, where init_send_tx is to an offline wallet (for the time being I don't know if this happens when the recipient's wallet is online) using Slatepack address (again, don't know if address's type plays a role), the below happens:

$ ./grin-wallet --floonet owner_api
20200813 19:07:26.094 WARN grin_wallet_controller::controller - Starting HTTP Owner API server at 127.0.0.1:3420.
20200813 19:07:26.094 WARN grin_wallet_controller::controller - HTTP Owner listener started.
20200813 20:17:18.172 ERROR grin_wallet_impls::node_clients::http - Error calling get_tip: Internal error: can't create Tokio runtime
20200813 20:17:33.202 ERROR grin_wallet_impls::node_clients::http - Error calling get_tip: Internal error: can't create Tokio runtime
20200813 20:17:48.228 ERROR grin_wallet_impls::node_clients::http - Error calling get_tip: Internal error: can't create Tokio runtime
20200813 20:18:03.276 ERROR grin_wallet_impls::node_clients::http - Error calling get_tip: Internal error: can't create Tokio runtime
20200813 20:18:18.308 ERROR grin_wallet_impls::node_clients::http - Error calling get_tip: Internal error: can't create Tokio runtime
20200813 20:18:33.355 ERROR grin_wallet_impls::node_clients::http - Error calling get_tip: Internal error: can't create Tokio runtime

and calling node_height then gives Ok.updated_from_node as false, when before it was true every time. When trying to authenticate with the wallet's Owner API again, calling init_secure_api goes through, but open_wallet gives

{
  "code":-32099,
  "message":"Lifecycle: Error opening wallet: Wallet store error: LMDB error: Too many open files , Data Dir: /[...]/.grin/floo/wallet_data"
}

Restarting the wallet's Owner API fixes the problem until it happens again after ~1h 10m. The interval in the loop is 15s.

Expected behavior
No error.

Desktop (please complete the following information):
Operating System: Arch Linux
Kernel: Linux 5.7.12-arch1-1
Architecture: x86-64

Wallet: 4.0.0

Additional context
I've seen the ulimit answer in #494, but it doesn't seem like a solution. I don't want to delay the problem, I want to fix it.
I don't get the other warn message that is quoted there, so I'm opening a new issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions