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

Issue with connecting to RPC over websockets. #43

Closed
ImmanuelSegol opened this issue Sep 18, 2018 · 0 comments
Closed

Issue with connecting to RPC over websockets. #43

ImmanuelSegol opened this issue Sep 18, 2018 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@ImmanuelSegol
Copy link
Collaborator

ImmanuelSegol commented Sep 18, 2018

software versions:
node v8.12.0
btcd v0.12.0-beta

I have been experiencing wired behavior when attempting to connect to the BTCD JSON-RPC over a web socket connection on Windows machine (on my Linux machine everything worked fine).

I would constantly get this error from btcd:
HTTP: TLS handshake error from 127.0.0.1:50198: tls: first record does not look like a TLS handshake

And Walli-server would display: error: could not connect to BTCD: "Parse Error"

I attempted to connect useing the rpc.cert and rpc.key:
const ws = new WebSocket('wss://127.0.0.1:18334/ws', { headers: { 'Authorization': 'Basic '+new Buffer(${'user'}:${'user'}).toString('base64') }, key:key, cert: cert, ca: [cert] });

Only to recive the following errors
btcd error: TLS handshake error from 127.0.0.1:50315: read tcp4 127.0.0.1:18334->127.0.0.1:50315: wsarecv: An existing connection was forcibly closed by the remote host.
node error:ERROR:Error: write EPROTO 101057795:error:1414D17A:SSL routines:tls12_check_peer_sigalg:wrong curve:openssl\ssl\t1_lib.c:1097:

After further investigation I found out that there is a EPROTO error on node 8 and above:
#19359
#16196

I installed Node 10 and everything worked great I didn't test with other versions.
But I think we should implement connecting to the RPC with the rpc.cert file.

@ImmanuelSegol ImmanuelSegol self-assigned this Sep 18, 2018
@ImmanuelSegol ImmanuelSegol added bug Something isn't working enhancement New feature or request labels Sep 19, 2018
ImmanuelSegol referenced this issue in ImmanuelSegol/walli-server Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant