-
Notifications
You must be signed in to change notification settings - Fork 68
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
Connecting to a remote stratum server #11
Comments
that code is for demonstration only, it sends fake data when connecting, that's why it's disconnecting you right way |
It disconnects even before authorizatjon, even before it sends fake data.
|
before executing the client, set the environment variable |
I am having exactly the same issue right now. For multiple remote popular pools which supports stratum protocol, i am getting "Connection closed" right after trying to connect to the pool. |
I am having the same issue as well. |
@mersed @aashidham did you get some other way to connect? |
Added envman@8460548 to send the error out. then the following error code shows the socket error:
mine was ENOTFOUND, removed the stratum+tcp:// from the start of the address and it worked. |
@envman thanks for that, can you make the PR? I'll merge it (as it's not a breaking change) |
maybe that could be added to the README, because, indeed, stratum+tcp is not a valid protocol per se |
@pocesar Thanks :-) |
added to readme, just check you're happy with the way I wrote it ;) |
@marslan390 Are you able to use the client in order to connect with the remote server? Indeed, removing "stratum+tcp" will allow you to connect to the server, but I am still encountering few issues. After the connection, I am sending the subscribe and I am getting appropriate response to that call. After that, sending authorize, but response is not what I am expecting to be: With socket.stratumAuthorize(stratumUsername, stratumPassword) we are sending: but that actually is not what happens. In this case on "socket.stratumAuthorize()" im getting the same response from the server as on socket.stratumSubscribe() . Tested against https://www.litecoinpool.org and few other servers/pools. Also please make a note that using raw socket connection (nodejs net module) within the node and writting to the socket directly using the same parameters will result with proper messages. |
@mersed did you got it working? |
I've used the client.js inside the example directory and tried to connect to a remote stratum server: https://gist.github.com/aashidham/dd33b949d8ad4eb9ba57301b7888065e
But it fails with 'connection closed'. Any idea why?
The text was updated successfully, but these errors were encountered: