Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rpc calls made by web3.js over websockets do not get a response. #163

Open
RobbeVerhelst opened this issue Jun 9, 2022 · 12 comments
Open

Comments

@RobbeVerhelst
Copy link

RobbeVerhelst commented Jun 9, 2022

I found this issue when trying to benchmark different Hyperledger Besu nodes using Hyperledger Caliper. Our setup is x amount of non-validator nodes behind a dshackle loadbalancer.

When running Caliper we saw that we didn't get any response from dshackle over websockets. When we ran Caliper directly on a besu node everything worked fine. After some further investigation we saw Caliper uses web3.js to make rpc calls. So to test this out we made a small web3 project and found that when web3 tries to send rpc calls over websockets to dshackle it does not get a reply. We do however see the rpc call coming into dshackle (in a grafana dashboard), but the web3 project does not get a reply. When we try to do the rpc calls over https we do get a reply from dshackle, unfortunately Caliper is not able to use anything else but websockets.

Somewhere in the websocket part of dshackle it is not able to send the response to the web3 project.

@splix
Copy link
Member

splix commented Jun 9, 2022

What method do you call over websockets? It's possible that those methods are just not enabled by default

@RobbeVerhelst
Copy link
Author

Unfortunately that's not possible, I call eth_blockNumber and am able to get the response from that using wscat and even ethers.js using ws.
It's specifically web3.js that's not getting a response for some reason

@splix
Copy link
Member

splix commented Jun 10, 2022

Do you mean that the a request for eth_blockNumber made with wscat works, but the exactly same request with web3.js doesn't work?

@splix
Copy link
Member

splix commented Jun 10, 2022

I mean, I'm sure there is some difference in the calls that makes one request working and another one not

@RobbeVerhelst
Copy link
Author

RobbeVerhelst commented Jun 10, 2022

Yes, I'm sending the same request using web3.js as I am with wscat, but also with ethers.js I get a response. Specifically web3.js is not getting the answer from dshackle, but dshackle does get the request and it is "successful" when checking the grafana dashboard. But on the web3 side I get nothing. So web3.js does something different then ethers.js or wscat. But when I change the url in my web3 project to the url of the besu node, then it does work. So it's not that the web3 project doesn't work at all.

@splix
Copy link
Member

splix commented Jun 10, 2022

Can you trace the requests with Wireshark and provide me with the details?

@PDVJAM
Copy link

PDVJAM commented Sep 20, 2022

Any updates on this? We actually have the same issue with web3 and websockets.

@splix
Copy link
Member

splix commented Sep 20, 2022

@PDVJAM can you provide with traffic traces between the dshackle and the upstreams? We need something to look at to find out what is the problem

@PDVJAM
Copy link

PDVJAM commented Nov 15, 2022

@PDVJAM can you provide with traffic traces between the dshackle and the upstreams? We need something to look at to find out what is the problem

Our dshackle deployed to the k8s, so I don't think I can do some wireshark for you.
@RobbeVerhelst were you able to solve the issue?

@splix
Copy link
Member

splix commented Nov 15, 2022

The latest version of the code in master supports logging of all requests, including requests to the upstreams. So if you are able try with a version from master that could provide enough details

@PDVJAM
Copy link

PDVJAM commented Jan 4, 2023

The latest version of the code in master supports logging of all requests, including requests to the upstreams. So if you are able try with a version from master that could provide enough details

Is there a docker image already or must be built manually?

@brixial
Copy link

brixial commented Jan 23, 2023

i guess this also has the same context?
#224

vdoflip pushed a commit to jit-strategies/dshackle that referenced this issue Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants