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 rejection error on followers when log is not initialized #17

Open
andyautida14 opened this issue Aug 25, 2018 · 1 comment
Open

Comments

@andyautida14
Copy link

andyautida14 commented Aug 25, 2018

I ran example/index.js on my local machine without any modification on Node.js version 8.11.4. I think the error happens when the followers receive a packet with type "append" from the leader and log replication is not enabled.

Here's the logs:

(node:19891) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 101)
(node:19891) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'getLastInfo' of null
    at MsgRaft.raft.on (/home/andy/programs/liferaft/index.js:294:48)
    at MsgRaft.emit (/home/andy/programs/liferaft/node_modules/eventemitter3/index.js:130:35)
    at RepSocket.socket.on (/home/andy/programs/liferaft/example/index.js:29:12)
    at emitTwo (events.js:126:13)
    at RepSocket.emit (events.js:214:7)
    at Parser.<anonymous> (/home/andy/programs/liferaft/example/node_modules/axon/lib/sockets/rep.js:51:15)
    at emitOne (events.js:116:13)
    at Parser.emit (events.js:211:7)
    at Parser._write (/home/andy/programs/liferaft/example/node_modules/amp/lib/stream.js:91:16)
    at doWrite (_stream_writable.js:397:12)
@ChakshuGautam
Copy link

ChakshuGautam commented Oct 23, 2023

This is happening with log replication initialized as well. Did you find a solution?

I am doing the following hack in the library.
raft.log = options.Log;

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