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

Complex password handling #19

Open
gsrmf opened this issue Nov 12, 2018 · 0 comments
Open

Complex password handling #19

gsrmf opened this issue Nov 12, 2018 · 0 comments

Comments

@gsrmf
Copy link

gsrmf commented Nov 12, 2018

Recently updated this module and set the configuration again, failing to connect with the following error

Error: Password contains an illegal unescaped character
    at parseConnectionString (/home/mfdev/.pm2/modules/pm2-mongodb/node_modules/mongodb/lib/url_parser.js:298:13)
    at parseHandler (/home/mfdev/.pm2/modules/pm2-mongodb/node_modules/mongodb/lib/url_parser.js:129:14)
    at module.exports (/home/mfdev/.pm2/modules/pm2-mongodb/node_modules/mongodb/lib/url_parser.js:25:12)
    at deprecated (internal/util.js:47:15)
    at connect (/home/mfdev/.pm2/modules/pm2-mongodb/node_modules/mongodb/lib/operations/mongo_client_ops.js:180:3)
    at connectOp (/home/mfdev/.pm2/modules/pm2-mongodb/node_modules/mongodb/lib/operations/mongo_client_ops.js:284:3)
    at /home/mfdev/.pm2/modules/pm2-mongodb/node_modules/mongodb/lib/utils.js:437:24
    at new Promise (<anonymous>)
    at executeOperation (/home/mfdev/.pm2/modules/pm2-mongodb/node_modules/mongodb/lib/utils.js:432:10)
    at MongoClient.connect (/home/mfdev/.pm2/modules/pm2-mongodb/node_modules/mongodb/lib/mongo_client.js:168:10)

Checked the configuration values and the password for the db is set up correctly

{
    "pm2-mongodb": {
        "ip": "127.0.0.1",
        "port": 27017,
        "username": "<hidden>",
        "password": "Ta7=-8u~;c-Ab*8G",
        "authDB": "admin",
        "refresh_rate": 5000,
        "probes": {
            "Repl Status": {
                "mode": "smart"
            },
            "Insert": {
                "mode": "smart"
            }
        }
    },
    "module-db": {
        "pm2-mongodb": {}
    },
    "module-db-v2": {
        "pm2-mongodb": {}
    }
}

Versions in use are as follows
OS: Ubuntu 14.04.5 LTS
NodeJS: 8.12.0
PM2: 3.2.2
MongoDB: 3.4.16
pm2-mongodb: 1.0.1

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

1 participant