question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lots of net_peercount errors on Alchemy node

See original GitHub issue

I’m using the latest Docker version and it appears that using Alchemy as an upstream node produces a lot of the following errors:

Code: | -32601
-- | --
Message: | Unsupported method [net_peerCount]. See available methods at https://docs.alchemy.com/alchemy/documentation/apis

In the yaml it’s not included in the list of supported methods as well as validation is gererally set to False.

Any idea what‘s wrong here?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
nlordellcommented, Nov 2, 2022

From what I can tell disable-validation is not respected in the WebSocket connection. validate-peers is though, and can be used to work around this:

upstreams:
  - id: alchemy-eth
    chain: ethereum
    priority: 100
    options:
      validate-peers: false
    labels:
      provider: alchemy
      archive: true
    connection:
      ethereum:
        rpc:
          url: "https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_USER}"
        ws:
          url: "wss://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_USER}"
0reactions
nlordellcommented, Nov 3, 2022

I am also seeing the occasional:

2022-03-11 08:01:15.241 | WARN  |         WsConnection | Failed to process WS message. class java.lang.IllegalStateException: State is not ready

It seems to happen reliably every 30s. My theory is that it may be something specific to the WebSocket server on the Alchemy side (I don’t see this for local Geth connections or Infura for example).

Read more comments on GitHub >

github_iconTop Results From Across the Web

net.peerCount 0 · Issue #16269 · ethereum/go ... - GitHub
The testnet uses a custom genesis block. You initialized your chain to mainnet, and then tried to connect to the Ropsten testnet, so...
Read more >
net.peerCount is Zero and blockNumber has stuck
I had a problem that my blockNumber gets stuck. Then I ran geth upgradedb and started geth --rpc --mine console again. It looked...
Read more >
Create your own Ethereum Blockchain | By Michael Whittle
Creating and exploring a private Ethereum blockchain using Geth.
Read more >
Geth / Mist doesn't keep any peers, sync takes forever ... - Reddit
0) I am running Ethereum Wallet 0.7.4 x64 on Windows 8.1 x64. I checked that the internet time is synced with time.nist.gov.
Read more >
NuCypher Documentation
Peer Count - The total number of peers this node has discovered. ... a 429 status code or Alchemy-specific error message is returned....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found