Mongodb chart deployment error

I’m trying to deploy mongodb-charts
even thought docker service ls shows that it is running i can not add user

docker exec -it $(docker container ls --filter name=_charts -q) charts-cli add-user --first-name "name" --last-name "last-name" --email "" --password "123456789" -- role "<UserAdmin|User>"

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

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

i tried removing everything and redeploying only to get same error

1 Like

Check this link

May be you tried to add user before services are up
Your last line says authentication error invalid user/password

1 Like

thank you for your replay. i tried everything suggested in the linked issue.
i also tried clean everything again and redeploy and running log before adding user.
i get this error:

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

1 Like

Few threads are recommending to delete everything and fresh install should resolve the issue

Also see comments from @Stennie from this link

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

Another from Stackoverflow

Facing issue to create user for MongoDB Charts (On Prem)

1 Like

If you want to start from scratch, be sure to delete the mongodb-charts_keys Docker volume too, using

docker volume rm mongodb-charts_keys
1 Like

thank you all.
found the problem, other app using mongodb was dropping all dbs.

1 Like

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