erigontech / erigon

Ethereum implementation on the efficiency frontier https://erigon.gitbook.io
GNU Lesser General Public License v3.0
3.12k stars 1.11k forks source link

method handler crashed when calling `trace_block` on ETH Goerli #8552

Open johnhckuo opened 12 months ago

johnhckuo commented 12 months ago

System information

Erigon version: v2.52.5

OS & Version: Linux

Erigon Command (with flags/config): ./build/bin/erigon --http.api=eth,engine,erigon,web3,net,debug,trace,txpool,parity

Consensus Layer: none

Chain/Network: ETH Goerli

Expected behaviour

trace_block should return successfully with correct block number

Actual behaviour

rpc error:

{"level":"ERROR","timestamp":"2023-10-20T04:03:16.853Z","file":"ledger/transaction.go:1135","message":"getBlockTraceTxs with block 9897666, error &rpc.jsonError{Code:-32000, Message:\"method handler crashed\", Data:interface {}(nil)}","tag":"ledger","coin":"goerli"}

Erigon node error log:

[EROR] [10-20|08:32:06.195] RPC method trace_block crashed: interface conversion: *cli.remoteConsensusEngine is not consensus.Engine: missing method APIs

Steps to reproduce the behaviour

Starts up Erigon v2.52.5, and curl trace_block endpoint on Goerli with correct block number, then node will panic.

Backtrace

[backtrace]
cshintov commented 11 months ago

Are you running rpcdaemon separately? Are you giving it --datadir flag?

Faced the same issue. I was running rpcdaemon as a separate container, and the fix was to add --datadir and use tini to run rpcdaemon. Need to have a different pid than erigon process - otherwise you'll get the below error:

mdbx_lck_seize:31231 lock-against-without-lck, err 11
[EROR] [10-27|10:58:33.275] Erigon startup                           err="mdbx_env_open: resource temporarily unavailable, label: chaindata, trace: [kv_mdbx.go:293 node.go:365 node.go:368 backend.go:233 node.go:122 main.go:80 make_app.go:43 command.go:274 app.go:332 app.go:309 main.go:41 proc.go:250 asm_amd64.s:1598]"
mdbx_env_open: resource temporarily unavailable, label: chaindata, trace: [kv_mdbx.go:293 node.go:365 node.go:368 backend.go:233 node.go:122 main.go:80 make_app.go:43 command.go:274 app.go:332 app.go:309 main.go:41 proc.go:250 asm_amd64.s:1598]
[INFO] [10-27|10:59:06.621] logging to file system                   log dir=/data/erigon/logs file prefix=erigon log level=info json=false