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

Node 7.7.2 MongoDB error #99

Closed
vmarchaud opened this issue Mar 9, 2017 · 3 comments
Closed

Node 7.7.2 MongoDB error #99

vmarchaud opened this issue Mar 9, 2017 · 3 comments

Comments

@vmarchaud
Copy link

Hello !

A dependency of pmx require async-listener, we got an issue over PM2 because of async-listener patching errors, i'm just opening an issue over here to see if you can check whats going on ?

NODE: 7.7.2
MongoDB: 2.2.24

TypeError: "listener" argument must be a function
at Socket.once (events.js:307:11)
at Socket.connect (net.js:943:10)
at Socket.connect (/usr/lib/node_modules/pm2/node_modules/async-listener/index.js:76:27)
at Object.exports.connect.exports.createConnection (net.js:76:35)
at Connection.connect (/var/nodes/site.com/node_modules/mongodb-core/lib/connection/connection.js:397:11)
at Pool.connect (/var/nodes/site.com/node_modules/mongodb-core/lib/connection/pool.js:638:16)
at Server.connect (/var/nodes/site.com/node_modules/mongodb-core/lib/topologies/server.js:383:17)
at Server.connect (/var/nodes/site.com/node_modules/mongodb/lib/server.js:361:17)
at open (/var/nodes/site.com/node_modules/mongodb/lib/db.js:226:19)
at Db.open (/var/nodes/site.com/node_modules/mongodb/lib/db.js:249:44)

Solution:
After downgrading to Node 7.7.1, my applications through PM2 was able to connect to the DB again.
@vhain
Copy link

vhain commented Mar 9, 2017

this is bug on Node 7.7.2 side. It's not working as expected as doc. Will be fixed by nodejs/node#11762

@vmarchaud
Copy link
Author

Thanks for the explanation :)

@ghost
Copy link

ghost commented Jan 16, 2019

Meet this bug on node v8.9.0

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