question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connection reset error stops spark after some time?

See original GitHub issue

From my logs (stdout & stderr of spark). This has happened several times. spark-wallet --version == 0.1.1.

...
GET /stream?access-key=RAviKLwv5ZZBLUDngcBiagM7cLdPv923iSy6MdrVdus 200 25.565 ms - -
POST /rpc 200 13.431 ms - 411
uncaughtException, stopping process
Error: read ECONNRESET
    at _errnoException (util.js:1022:11)
    at TCP.onread (net.js:628:25)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Sep 25, 2018

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!

1reaction
shesekcommented, Sep 23, 2018

@darosior Thanks! That’s very helpful, I am able to reproduce with that.

It looks like this is related to the changes introduced in https://github.com/shesek/spark-wallet/commit/62798caf243415d4194d5dc6b6e7bf388bb00d02. Removing the use of createMultiServer appears to fix the issue:

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 createMultiServer is quite hacky and error-prone, and it has already caused issues previously (#10), so I think I’m just going to remove it. This means that users trying to access a TLS-enabled Spark server without using https:// will receive a connection error (instead of a 301 redirection), but I think that might be better than continuing to maintain this hack. :-\

Read more comments on GitHub >

github_iconTop Results From Across the Web

How does java net SocketException Connection reset happen
1. First, check if the Server is running by doing telnet on the host port on which the server runs. · 2. Check...
Read more >
Spark Streaming stops after sometime due to Executor Lost
I dont see any other exception or error being thrown. The application stops after couple of hours. Logs shows all the executor are...
Read more >
Training stops with "java.net.ConnectException: Connection ...
I'm trying to use Lightgbm in spark standalone cluster mode (3 workers, 2 cores each, 4gb ram each). One worker gets assigned as...
Read more >
How to Fix the ERR_CONNECTION_RESET Error in 7 Ways
ERR_CONNECTION_RESET happens when the browser fails to establish a connection with the destination site. Read to find out 7 ways to fix it....
Read more >
How to Fix the "ERR_CONNECTION_RESET" Error (5 Ways)
Learn how to fix the "ERR_CONNECTION_RESET" error code that displays in Google Chrome because there was a failed connection.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found