MongoDB username and password escaping issue


suddenly I started to get the following error below and not sure why.

I’m using MongoDB replicas

The format is as follows for the setup and I dont have any weird characters in the username nor password

[undefined][2023-02-28 16:37:19,006][ERROR] Error connecting to mongodb server
Traceback (most recent call last):
  File "/usr/lib/pritunl/lib/python3.10/site-packages/pritunl/setup/", line 288, in setup_server
  File "/usr/lib/pritunl/lib/python3.10/site-packages/pritunl/utils/", line 101, in get_db_ver_int
    return get_int_ver(get_db_ver())
  File "/usr/lib/pritunl/lib/python3.10/site-packages/pritunl/utils/", line 93, in get_db_ver
    return _get_version_doc().get('version') or (
  File "/usr/lib/pritunl/lib/python3.10/site-packages/pritunl/utils/", line 79, in _get_version_doc
    client = pymongo.MongoClient(settings.conf.mongodb_uri,
  File "/usr/lib/pritunl/lib/python3.10/site-packages/pymongo/", line 670, in __init__
    res = uri_parser.parse_uri(
  File "/usr/lib/pritunl/lib/python3.10/site-packages/pymongo/", line 494, in parse_uri
    user, passwd = parse_userinfo(userinfo)
  File "/usr/lib/pritunl/lib/python3.10/site-packages/pymongo/", line 61, in parse_userinfo
    raise InvalidURI("Username and password must be escaped according to "
pymongo.errors.InvalidURI: Username and password must be escaped according to RFC 3986, use urllib.parse.quote_plus().

pritunl version
pritunl v1.30.3354.99

Any ideas why this happens ?

got it sorted, was new to mongodb and the connection string was wrong, should have just been single user auth not every host their own.