xDai Stable Chain xDai Stable Chain BlockScout BlockScout TokenBridge TokenBridge

Indexer.Block.Realtime.Fetcher terminating - geth private network

Hi,

I try to deploy a blockscout instance on a geth private network
It works, but I still get an error:

2019-07-09T16:58:48.889 [error] Task #PID<0.1910.0> started from Indexer.Block.Realtime.Fetcher terminating
** (Protocol.UndefinedError) protocol Enumerable not implemented for nil. This protocol is implemented for: Indexer.BoundQueue, Ecto.Adapters.SQL.Stream, Postgrex.Stream, DBConnection.Prepa
reStream, DBConnection.Stream, Timex.Interval, Flow, MapSet, Stream, IO.Stream, Date.Range, Range, GenEvent.Stream, File.Stream, Function, List, Map, HashDict, HashSet
(elixir) /home/build/elixir/lib/elixir/lib/enum.ex:1: Enumerable.impl_for!/1
(elixir) /home/build/elixir/lib/elixir/lib/enum.ex:141: Enumerable.reduce/3
(elixir) lib/enum.ex:3015: Enum.reduce/3
(elixir) lib/enum.ex:2850: Enum.max_by/3
(indexer) lib/indexer/block/fetcher.ex:185: Indexer.Block.Fetcher.update_block_cache/1
(indexer) lib/indexer/block/fetcher.ex:175: Indexer.Block.Fetcher.fetch_and_import_range/2
(indexer) lib/indexer/block/realtime/fetcher.ex:262: Indexer.Block.Realtime.Fetcher.do_fetch_and_import_block/3
(indexer) lib/indexer/logger.ex:14: Indexer.Logger.metadata/2
(indexer) lib/indexer/block/realtime/fetcher.ex:245: Indexer.Block.Realtime.Fetcher.fetch_and_import_block/4
(elixir) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
(stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Function: &Indexer.Block.Realtime.Fetcher.fetch_and_import_block/3
Args: [8118272, %Indexer.Block.Fetcher{broadcast: :realtime, callback_module: Indexer.Block.Realtime.Fetcher, json_rpc_named_arguments: [transport: EthereumJSONRPC.HTTP, transport_optio
ns: [http: EthereumJSONRPC.HTTP.HTTPoison, url: “http://IP_NODE_SERVER:8545”, http_options: [recv_timeout: 60000, timeout: 60000, hackney: [pool: :ethereum_jsonrpc]]], variant: EthereumJSON
RPC.Geth], receipts_batch_size: 250, receipts_concurrency: 10}, false]

Blockscout has been launched setting these environment variables:

ETHEREUM_JSONRPC_HTTP_URL=http://IP_NODE_SERVER:8545
ETHEREUM_JSONRPC_TRACE_URL=$ETHEREUM_JSONRPC_HTTP_URL
ETHEREUM_JSONRPC_WS_URL=http://IP_NODE_SERVER:8546
ETHEREUM_JSONRPC_VARIANT=geth

I tried to tweak some values directly in the code, like recv_timeout, receipts_batch_size, receipts_concurrency, trying different values, and relaunch blockscout but I still get the error

Geth has been launched with these parameters:

geth --rpc --rpcaddr 0.0.0.0 --port 30303 --rpcport 8545 --rpcapi debug,net,eth,shh,web3,txpool --wsapi “eth,net,web3,network,debug,txpool” --ws --wsaddr 0.0.0.0 --wsport 8546 --wsorigins "" --syncmode=full --gcmode=archive --rpcvhosts= --networkid NETWORK_ID

Hi,

Instead of ETHEREUM_JSONRPC_WS_URL=http://IP_NODE_SERVER:8546 it should be ETHEREUM_JSONRPC_WS_URL=ws://IP_NODE_SERVER:8546

Thanks !
I ran it again with ws instead of http, but I still get the error

Which version of Geth and Blockscout are you using?

Geth
Version: 1.8.27-stable

Blockscout
Commit 31d8560737abec41eea63d7df15458933069f29b (master which has been cloned few days ago)

Ah, I see other differences:

replace

  • --wsorigins "" with --wsorigins "*"
  • --rpcvhosts= with --rpcvhosts=*

Take a look FAQ: What settings are required on a Parity or Geth Client?

Thank you.
I tried but same. I don’t get this error with parity.

Anyway, I choose another solution : to use the docker folder of blockscout