You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running mongodb-runner stop --all, the following error is thrown and the MongoDB instance is not stopped:
/node_modules/mongodb-runner/dist/cli.js:170
throw err;
^
Error: kill ESRCH
at process.kill (node:internal/process/per_thread:233:13)
at MongoServer.close (/node_modules/mongodb-runner/dist/mongoserver.js:201:21)
at /node_modules/mongodb-runner/dist/mongocluster.js:162:88
at Array.map (<anonymous>)
at MongoCluster.close (/node_modules/mongodb-runner/dist/mongocluster.js:162:61)
at /node_modules/mongodb-runner/dist/runner-helpers.js:87:75
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 2)
at async Object.stop (/node_modules/mongodb-runner/dist/runner-helpers.js:86:5)
at async stop (/node_modules/mongodb-runner/dist/cli.js:121:9) {
errno: -3,
code: 'ESRCH',
syscall: 'kill'
}
Node.js v18.18.2
Code/Gist
Expected Behavior/Code
MongoDB instance should be stopped, no error thrown.
Environment
node.js / npm versions: 18.18.2
OS: macos 14.5 (23F79)
The text was updated successfully, but these errors were encountered:
It seems that there is an issue with mongo stop all
here a server created
> mongodb-runner start -t standalone
Server started and running at mongodb://127.0.0.1:54879/
Run the following command to stop the instance:
mongodb-runner stop --id=1ef1f912-597f-4e2e-9f2c-c63d4ed99801
Then an error on mongo stop all
> mongodb-runner stop --all
/Users/antoinecormouls/Desktop/Repos/parse/parse-server/node_modules/mongodb-runner/dist/cli.js:170
throw err;
^
MongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
at Topology.selectServer (/Users/antoinecormouls/Desktop/Repos/parse/parse-server/node_modules/mongodb/lib/sdam/topology.js:303:38)
at async Topology._connect (/Users/antoinecormouls/Desktop/Repos/parse/parse-server/node_modules/mongodb/lib/sdam/topology.js:196:28)
at async Topology.connect (/Users/antoinecormouls/Desktop/Repos/parse/parse-server/node_modules/mongodb/lib/sdam/topology.js:158:13)
at async topologyConnect (/Users/antoinecormouls/Desktop/Repos/parse/parse-server/node_modules/mongodb/lib/mongo_client.js:223:17)
at async MongoClient._connect (/Users/antoinecormouls/Desktop/Repos/parse/parse-server/node_modules/mongodb/lib/mongo_client.js:236:13)
at async MongoClient.connect (/Users/antoinecormouls/Desktop/Repos/parse/parse-server/node_modules/mongodb/lib/mongo_client.js:161:13)
at async MongoClient.connect (/Users/antoinecormouls/Desktop/Repos/parse/parse-server/node_modules/mongodb/lib/mongo_client.js:322:16)
at async MongoServer.withClient (/Users/antoinecormouls/Desktop/Repos/parse/parse-server/node_modules/mongodb-runner/dist/mongoserver.js:221:24)
The stop system seems to try to connect to a 27017 port but there is no instances on this port
Edit
I found that Mongo instances are referenced or stored globally, such as under: /Users/antoinecormouls/.mongodb/runner2. There are some ghost references, causing the system to try to connect to and close already-closed runners.
Bug Report
Current Behavior
When running
mongodb-runner stop --all
, the following error is thrown and the MongoDB instance is not stopped:Code/Gist
Expected Behavior/Code
MongoDB instance should be stopped, no error thrown.
Environment
The text was updated successfully, but these errors were encountered: