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

Unhandled 'error' event #1

Closed
saubyk opened this issue Oct 3, 2019 · 9 comments
Closed

Unhandled 'error' event #1

saubyk opened this issue Oct 3, 2019 · 9 comments
Assignees

Comments

@saubyk
Copy link

saubyk commented Oct 3, 2019

Hi
I have noticed the following error in c-lightning log, when I am running my js api server as a plugin. Not able to replicate the scenario, which caused this, but thought to report, in case you want to take a look.

Please note, once this error is encountered, c-lightning aborts.

My project: https://github.com/saubyk/c-lightning-REST

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

Error: write EPIPE
    at afterWriteDispatched (internal/stream_base_commons.js:150:25)
    at writeGeneric (internal/stream_base_commons.js:141:3)
    at Socket._writeGeneric (net.js:768:11)
    at Socket._write (net.js:780:8)
    at doWrite (_stream_writable.js:428:12)
    at writeOrBuffer (_stream_writable.js:412:5)
    at Socket.Writable.write (_stream_writable.js:302:11)
    at Plugin.writeJsonrpcNotification (/REDACTED/node_modules/clightningjs/src/plugin.js:115:8)
    at /REDACTED/node_modules/clightningjs/src/plugin.js:101:12
    at Array.forEach (<anonymous>)
Emitted 'error' event on Socket instance at:
    at errorOrDestroy (internal/streams/destroy.js:107:12)
    at onwriteError (_stream_writable.js:443:5)
    at onwrite (_stream_writable.js:470:5)
    at internal/streams/destroy.js:49:7
    at Socket.dummyDestroy [as _destroy] (internal/process/stdio.js:7:3)
    at Socket.destroy (internal/streams/destroy.js:37:8)
    at afterWriteDispatched (internal/stream_base_commons.js:150:17)
    at writeGeneric (internal/stream_base_commons.js:141:3)
    at Socket._writeGeneric (net.js:768:11)
    at Socket._write (net.js:780:8) {
  errno: 'EPIPE',
  code: 'EPIPE',
  syscall: 'write'
}
Abort trap: 6
@darosior
Copy link
Member

darosior commented Oct 8, 2019

Thank you for the report. I'd be interested in having some repro case if you ever encounter this again.

Please note, once this error is encountered, c-lightning aborts.

Note that spurious plugin crashes should not happen anymore in the upcoming release ;-)

@darosior
Copy link
Member

darosior commented Oct 8, 2019

Oh, I've just seen that you use my library in your project Ride-The-Lightning/c-lightning-REST#16 . I'll look more deeply into this error then, and might work on a more robust solution.

@saubyk
Copy link
Author

saubyk commented Oct 8, 2019

@darosior thanks for looking into it. A robust solution, will definitely help. :-)

FYI
c-lightning-REST library, is being used by RTL and may soon be used by Zeus as well.

And, thanks for clightningjs, it really makes our REST APIs work like magic with c-lightning! :-)

@darosior darosior self-assigned this Oct 11, 2019
@darosior
Copy link
Member

@saubyk I've updated the lib (0.1.1), can you try with the latest release (and the latest c-lightning, v0.7.3rc1)

@saubyk
Copy link
Author

saubyk commented Oct 13, 2019

Thanks for the fix.
Would the fix work only on the latest release of c-lightning?

@saubyk
Copy link
Author

saubyk commented Oct 13, 2019

Hi @darosior
I am able to npm install the latest version on Mac, but npm is unable to find 0.0.4 and 0.1.1 versions for Ubuntu.
The latest version that I am able to install on Ubuntu is 0.0.2

@saubyk
Copy link
Author

saubyk commented Oct 14, 2019

@darosior ignore the above. I am able to get the latest version on Ubuntu.

@darosior
Copy link
Member

Would the fix work only on the latest release of c-lightning?

Yes

I am able to get the latest version on Ubuntu.

Great, how did it go ?

@saubyk
Copy link
Author

saubyk commented Oct 21, 2019

Closing this issue. Thanks for the fix.

@saubyk saubyk closed this as completed Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants