ethereum-optimism / op-geth

GNU Lesser General Public License v3.0
255 stars 654 forks source link

failed to init L2: failed to get L2 chain ID #207

Open liobah opened 6 months ago

liobah commented 6 months ago

When I run the following command: op-node --l1=http://localhost:8545/ --l1.rpckind=erigon --l2=http://localhost:8561 --l2.jwt-secret=/shared/jwt.txt --network=op-mainnet --rpc.addr=0.0.0.0 --rpc.port=8559

I get the following error message in the logs: op-node | t=2023-12-22T21:44:18+0000 lvl=info msg="Not opted in to ProtocolVersions signal loading, disabling ProtocolVersions contract now." op-node | t=2023-12-22T21:44:18+0000 lvl=info msg="Rollup Config" l2_chain_id=10 l2_network=OP-Mainnet l1_chain_id=1 l1_network=mainnet l2_start_time=1,686,068,903 l2_block_hash=0xdbf6a80fef073de06add9b0d14026d6e5a86c85f6d102c36d3d8e9cf89c2afd3 l2_block_number=105,235,063 l1_block_hash=0x438335a20d98863a4c0c97999eb2481921ccd28553eac6f913af7c12aec04108 l1_block_number=17,422,590 regolith_time="@ genesis" canyon_time="@ 1704992401 ~ Thu Jan 11 17:00:01 UTC 2024" delta_time="(not configured)" eclipse_time="(not configured)" fjord_time="(not configured)" interop_time="(not configured)" op-node | t=2023-12-22T21:44:18+0000 lvl=info msg="Initializing rollup node" version=v0.0.0-54a7dbf8-1702417143 op-node | t=2023-12-22T21:44:18+0000 lvl=eror msg="Error initializing the rollup node" err="failed to init L2: failed to get L2 chain ID: 401 Unauthorized: signature is invalid\n" op-node | t=2023-12-22T21:44:18+0000 lvl=crit msg="Application failed" message="failed to setup: unable to create the rollup node: failed to init L2: failed to get L2 chain ID: 401 Unauthorized: signature is invalid\n"

Could someone help me to find the reason.

protolambda commented 6 months ago

The "401 Unauthorized: signature is invalid" indicates the JWT is wrong. Is the op-geth node configured with the same JWT? It should be configured like --authrpc.jwtsecret=/shared/jwt.txt to match the op-node.

protolambda commented 5 months ago

@liobah has this been resolved? Can we close this issue?