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.

Steps to reproduce

$ npm i -g ndb

... snip ...
+ ndb@1.0.3
added 182 packages from 110 contributors in 22.355s

$ ndb

events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at Pipe.onread (net.js:660:25)
Emitted 'error' event at:
    at emitErrorNT (intenal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Tell us about your environment:

  • ndb version: 1.0.3 (tried 10.0, 1.0.1, and 1.0.2)
  • Platform / OS version: Debian 9 testing
  • Node.js version: 10.7 (tried 10.6 and 10.4.1)

What is the expected result?

ndb to start

What happens instead?

ECONNRESET error

Thanks for this project. Looking forward to try it out!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11

github_iconTop GitHub Comments

5reactions
b0ocommented, Jul 21, 2018

@ak239 I checked the troubleshooting link you provided and figured out that this seems to be a sandboxing issue with Puppeteer.

Details Modifying the Puppeteer launch arguments here:

https://github.com/GoogleChromeLabs/ndb/blob/97d893c7e59b5ddfc3530e2d54e490232886a7e9/ndb.js#L35-L38

To include --no-sandbox fixed the issue for me:

diff --git a/ndb.js b/ndb.js
index 13fa599..6947312 100755
--- a/ndb.js
+++ b/ndb.js
@@ -34,7 +34,8 @@ updateNotifier({pkg: require('./package.json')}).notify();
     userDataDir: await setupUserDataDir(configDir),
     args: [
       '--app=data:text/html,<style>html{background:#242424;}</style>',
-      '--enable-features=NetworkService'
+      '--enable-features=NetworkService',
+      '--no-sandbox',
     ]
   });

Enabling kernel.unprivileged_userns_clone fixed this for me (via https://github.com/GoogleChrome/puppeteer/issues/290#issuecomment-403876758):

sudo sysctl -w kernel.unprivileged_userns_clone=1
3reactions
gerbuscommented, Nov 1, 2018

After installing the above suggested dependencies, I get:

events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at Pipe.onStreamRead (internal/stream_base_commons.js:111:27)
Emitted 'error' event at:
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Ndb debugger for node.js won't start - Stack Overflow
Im trying to start the ndb debugger from VS code, but every time i run the "ndb server.js" command, a window opens and...
Read more >
NDB node wont start even with --intial option - MySQL Bugs
Bug #20261, NDB node wont start even with --intial option ... Category: MySQL Cluster: Cluster (NDB) storage engine, Severity: S2 (Serious).
Read more >
The ndb_mgmd daemon does not start - Server Fault
The ndb_mgmd daemon does not start. I want to configure a NDB Mysql cluster, I followed the documentation of its official page.
Read more >
installation - MySQL NDB Installer won't start (webserver already ...
I have encountered an odd error where I accidentally closed the shell that was running the python script that launched the installer for...
Read more >
ndsrepair issues when using ndsd -ndb - Support
In cases where ndsd cores when starting then even ndsrepair won't work,as ... At present there is no -ndb mode for eDirectory 8.8.1...
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