-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Connection reset error stops spark after some time? #23
Comments
I believe 81fdabd should fix this, can you try running from master and confirm? $ git clone https://github.com/shesek/spark-wallet && cd spark-wallet && npm install && npm run dist:npm
$ ./dist/cli.js [args] |
Hmm, re-reading the error log, this might not be it (but 81fdabd is desirable regardless). Kinda hard to diagnose without a local reproduction, I'll ponder on this some more :) |
I got the same error almost immediately after the first or second payment:
Did a "git pull" and "npm run dist:npm" and the error didn't show up again after a few payments.. |
Is this after an incoming or an outgoing payment?
Thanks for checking this! Please report back if you're bumping into this error again. |
They were all outgoing payments, also the few that crashed it before the update. Did 2 outgoing payments extra "a couple of hours ago" (as the wallet tells me). The wallet keeps running without any problems but I'll report back if it occurs again. |
Nope, no help :(
|
I saw no problems at all sending payments, so I tried receiving a payment from coinpanic.com and Spark crashed:
EDIT: Today I made and received 2 payments and Spark had no problems. So it's not that Spark crashes all the time. |
Hi, maybe this information could help you : |
@darosior Thanks! That's very helpful, I am able to reproduce with that. It looks like this is related to the changes introduced in 62798ca. Removing the use of diff --git a/src/transport/tls.js b/src/transport/tls.js
index 3b8f1e5..874dc18 100644
--- a/src/transport/tls.js
+++ b/src/transport/tls.js
@@ -10,7 +11,8 @@ const defaultDir = path.join(require('os').homedir(), '.spark-wallet', 'tls')
module.exports = (app, name=app.settings.host, dir=defaultDir, leEmail) => {
const tlsOpt = leEmail ? letsencrypt(name, dir, leEmail) : selfsigned(name, dir)
, redir = (req, res) => (res.writeHead(301, { Location: `https://${ req.headers.host || name }/` }), res.end())
- , server = createMultiServer(tlsOpt, app, redir)
+ , server = https.createServer(tlsOpt, app) I knew from the beginning that |
Actually... it looks like The simple fix is to explicitly bind for I guess |
It appears that unlike `http(s)` servers, plain `net` module servers don't handle the socket `error` event, which causes an uncaught exception and stops the process. With this change, we explicitly handle the error, log it to stderr and keep the process running. Refs #23.
Released in v0.1.2. @darosior @sumBTC @rustyrussell could you please confirm this fixes it? |
My conclusion is that the issue has been solved. Tried all kinds of stuff and sometimes I see a connection warning on the phone but the process on the server keeps going. Nice and thanks a lot! |
Alright, I'm closing this. Please report back if you're still experiencing crashes. |
From my logs (stdout & stderr of spark). This has happened several times. spark-wallet --version == 0.1.1.
The text was updated successfully, but these errors were encountered: