existingClientAppIds failure: An error occurred authenticating: invalid username/password, I have faced with this error in MongoDB Charts logs file in windows

I have faced with an error in MongoDBChats logs file in windows, it Have thrown this error in the last line:

existingClientAppIds failure: An error occurred authenticating: invalid username/password

I followed the following setups specified on MongoDB docs for MongoDB Charts m installation:

`https://docs.mongodb.com/charts/19.12/installation/`

The steps I followed are as follows:

  1. Have a local MongoDB instance running.
  2. Initialize Docker Swarm docker swarm init
  3. Pull the chart image docker pull quay.io/mongodb/charts:19.12.2
  4. Check connection through the internal CLI client docker run --rm quay.io/mongodb/charts:19.12.2 charts-cli test-connection 'mongodb://host.docker.internal'

Expected response:

`MongoDB connection URI successfully verified.`
  1. Generate docker secret charts-mongodb-uri echo "mongodb://host.docker.internal" | docker secret create charts-mongodb-uri -
  2. Deploy stack to swarm docker stack deploy -c charts-docker-swarm-19.12.2.yml mongodb-charts
  3. Create User:
   $ docker exec -it \
   $(docker container ls --filter name=_charts -q) \
   charts-cli add-user --first-name "<First>" --last-name "<Last>" \
   --email "<user@example.com>" --password "<Password>" \
   --role "<UserAdmin|User>"

I’m getting back an error:

`add-user command error: clientAppId not found. No Charts apps configured to add user to.`

Docker Service Logs:

mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ parsedArgs
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ installDir ('/mongodb-charts')
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ log
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ salt
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ productNameAndVersion ({ productName: 'MongoDB Charts Frontend', version: '1.9.1' })
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ gitHash ('1a46f17f')
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ supportWidgetAndMetrics ('on')
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ tileServer (undefined)
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ tileAttributionMessage (undefined)
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ rawFeatureFlags (undefined)
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ stitchMigrationsLog ({ completedStitchMigrations: [] })
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ featureFlags ({})
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ lastAppJson ({})
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ existingInstallation (false)
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ tenantId ('18c9543e-8677-4046-9166-5d54a2a6e1bb')
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ chartsMongoDBUri
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ tokens
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ encryptionKeyPath
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ stitchConfigTemplate
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ libMongoIsInPath (true)
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ mongoDBReachable (true)
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ stitchMigrationsExecuted ([ 'stitch-1332',  'stitch-1897',  'stitch-2041',  'migrateStitchProductFlag',  'stitch-2041-local',  'stitch-2046-local',  'stitch-2055',  'multiregion',  'dropStitchLogLogIndexStarted' ])
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ minimumVersionRequirement (true)
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ stitchConfig
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ stitchConfigWritten (true)
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ stitchChildProcess
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ indexesCreated (true)
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ stitchServerRunning (true)
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ stitchAdminCreated (false)
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✔ lastKnownVersion ('0.9.0')
mongodb-charts_charts.1.ozvhqbhhmq9n@docker-desktop    |  ✖ existingClientAppIds failure: An error occurred authenticating: invalid username/password

I have done all the provided previous solutions by this community, but still not working
:pensive::pensive::pensive::pensive:

  1. I have deleted all the volume
  2. I have uninstalled and reinstall the docker as well as MongoDB charts
  3. I have done the troubleshooting provided by MongoDB charts installation

Looking for answer,
Is this a community?? :thinking:

Hi @M.Mustafa_Amarkhil,

This is a community forum where others are volunteering their time and experience, so you may have to be patient for responses to questions requiring more specific expertise (especially during or after extended holiday periods).

I’m not sure how to resolve your specific error, but apparently it is due to an incomplete install. One of my colleagues suggested deleting dangling containers/images with docker system prune (assuming you don’t have any other Docker assets) and trying the installation again.

I would also draw your attention to this note on the download page for MongoDB Charts On-Premises, as this product version is no longer being updated outside of security fixes:

Note: MongoDB Charts On-Premises will be end of life on September 1, 2021. If you’re currently using the on-premises version of Charts, there is no need for immediate action. We will continue to provide support, including releasing any important security fixes, until September 1, 2021. Additionally, we will provide a mechanism to assist with migrating on-premises dashboards to the cloud version of Charts.

MongoDB Charts is available and will continue to be available as a service within MongoDB Cloud

The cloud version of MongoDB Charts is integrated with MongoDB Atlas (including the M0 free tier), continues to be actively updated, and can be configured through the web UI without any local installation.

If you’re interested, see Launch MongoDB Charts to get started.

Regards,
Stennie

1 Like

@Stennie_X
Thank you sir,
I will try my best and patiently looking for new answers.

Hi @M.Mustafa_Amarkhil -

This error can occur if your metadata database was previously configured for Charts, but the authentication keys are not present in the volume used by your current Charts instance. Without knowing all the steps you followed it’s hard to say how you got in this state. But if you’re happy to start fresh, you should be able to get past this by deleting the app, auth, log and metadata databases, as well as your Docker volumes, and then reinstalling.

HTH
Tom

2 Likes

Hi @tomhollander
Thank you so much sir,
this one is the right answer, inspite of deleting everything, the didn’t work correctly, but by fresh installation this system worked fine.

A bundle of thanks again dear sir,

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.