Having Trouble Connecting Port 8551
It seems I'm having troubles getting either getting my execution client to open an http connection on port 8551, or my concensus client (nimbus) to connect to the connection on port 8551.
No errors from besu, but nimus keeps throwing a warning in the log:
"WRN 2022-08-27 04:50:51.599+00:00 Eth1 chain monitoring failure, restarting topics="eth1" err="Failed to setup web3 connection: WebSocket connection error: 403 Forbidden"
Is there a good place to start making the sure the connection is open or accessible? Have exactly same setup as recent Somer guides.
[EDIT] I don't know what finally made it work but ended up having to enable authentication in Besu, (--rpc-http-enabled --rpc-ws-wnabled), specify the ports, then use websocket connection via Nimbus config file, rather than http. Hope this doesn't leave any security holes but at least it's linking up now, can see that Nimbus reads the block headers from besu on my machine.
besu.service
ExecStart=/usr/local/bin/besu/bin/besu \
--network=mainnet \
--sync-mode=X_SNAP \
--data-path=/var/lib/besu \
--data-storage-format=BONSAI \
--rpc-http-enabled \
--rpc-http-port 8545 \
--engine-rpc-port 8551 \
--rpc-ws-enabled \
--engine-jwt-secret=/var/lib/jwtsecret/jwt.hex
nimbus.service
ExecStart=/usr/local/bin/nimbus_beacon_node \
--network=mainnet \
--data-dir=/var/lib/nimbus \
--web3-url=ws://127.0.0.1:8546 \
--jwt-secret=/var/lib/jwtsecret/jwt.hex \
--suggested-fee-recipient=MYADDRESS \
--graffiti="grafitti" \
--enr-auto-update=true
Just seemed like for me each client needed extra manual flags and port designations that weren't outlined in the Somer guides. Took brand new ETH1 sync, and lot of config variations to find one that worked. Hopefully this helps someone else if they get stuck. Thank you to everyone that helped and responded.
Posted Aug 27, 2022, 4:52 AM UTC · edited
Seems like you are missing a JWT. The beacon client has to use it to authenticate against the execution endpoint. The token should be somewhere in the execution client’s data directory (at least this is how geth works). You can also create a JWT and pass it to both clients manually.
thank you. JWT was generated using Somer guides:
and starting Nimbus using flags in /etc/systemd/system/nimbus.service is:
I put both http and ws links pulling my hair out, Nimbus docs said you can do both. Do you think it's a permissions or firewall issue?
It wont be a firewall issue if you are running both the execution and consensus nodes on the same machine.
It could definitely be a permissions issue though. In your services file, (For both Nimbus and Besu) which user as you executing the service as?
What happens when you type in
It will tell you which user owns the file, and what kind of permissions they (and everyone else) has.
Not sure if this formatting works but:
It's all root owned but most should be able to read it. I can access for reading with my normal login account. Someone else mentioned copying the JWT to the data directory of besu, but not sure that would help if permissions are working.