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

Websocat client cannot connect even though wscat does? #244

Closed
Aracki opened this issue May 28, 2024 · 2 comments
Closed

Websocat client cannot connect even though wscat does? #244

Aracki opened this issue May 28, 2024 · 2 comments

Comments

@Aracki
Copy link

Aracki commented May 28, 2024

wscat -c ws://node-ethereum:8545 does connect, but websocat ws://node-ethereum:8545 just timeout with

websocat: WebSocketError: I/O failure

How can I debug this type of error? (version websocat 1.13.0)

@vi
Copy link
Owner

vi commented May 28, 2024

Try capturing a traffic dump. Alternatively, make Websocat log traffic itself.

websocat -t - ws-c:log:tcp:node-ethereum:8545

One of reasons NodeJS-based tool can connect while other tools can't is the lack of permessage-deflate support and forced, unconditional usage of it by server.

Using strace or analogue can also be helpful.


I/O failure

What if you try to use explicit IP address instead of node-ethereum?

@Aracki
Copy link
Author

Aracki commented May 29, 2024

The problem was that websocat doesn't print that it's connected and some of the messages I was sending caused it to return I/O failure 🤦

Sorry, it was working from the beginning. It's just that a find "connected" output more convenient to know if you can start sending messages over websocket like wscat does with -c flag.

@Aracki Aracki closed this as completed May 29, 2024
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

2 participants