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 #2759

Closed
dnohr opened this issue Mar 9, 2017 · 5 comments
Closed

Node 7.7.2 MongoDB error #2759

dnohr opened this issue Mar 9, 2017 · 5 comments

Comments

@dnohr
Copy link

dnohr commented Mar 9, 2017

I'm not sure if it's PM2 or a MongoDB driver bug. After upgrading to Node 7.7.2, my applications connected to MongoDB failed with following error. I have full connection from my server to the database.

NODE: 7.7.2
PM2: 2.4.2
MongoDB: 2.2.24

Stack trace:
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.

Just a heads up before upgrading your environment to the latest node release.

Thanks.

@vmarchaud
Copy link
Contributor

We will push an update today to avoid this with pm2, still opened an issue over the responsible module : othiym23/async-listener#99
Thanks for reporting this !

@vhain
Copy link

vhain commented Mar 9, 2017

@vmarchaud @dnohr actually, it's bug on Node 7.7.2 and will be fixed by nodejs/node#11762

@dnohr
Copy link
Author

dnohr commented Mar 9, 2017

@vhain Sounds good, thanks for the details.

@FullTS
Copy link

FullTS commented Mar 13, 2017

The same problem!

@vmarchaud
Copy link
Contributor

We released pmx 1.0.4 that should fix this issue

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants