I ran following commands
- Docker swarm init
docker swarm init
- Pull the image
docker pull [quay.io/mongodb/charts:19.12.2](http://quay.io/mongodb/charts:19.12.2)
- Run the iamge
docker run --rm [quay.io/mongodb/charts:19.12.2](http://quay.io/mongodb/charts:19.12.2) charts-cli test-connection 'mongodb://[172.31.50.8:27017](http://172.31.50.8:27017/)'
MongoDB connection URI successfully verified.
Before starting Charts, please create a Docker Secret containing this connection URI using the following command:
echo "mongodb://[172.31.50.8:27017](http://172.31.50.8:27017/)" | docker secret create charts-mongodb-uri -
- Create secret
echo "mongodb://[172.31.50.8:27017](http://172.31.50.8:27017/)" | docker secret create charts-mongodb-uri -
pyxyr9rwp40eb3j2jj0e6b5ly
- Run the docker
docker stack deploy -c charts-docker-swarm-19.12.2.yml mongodb-charts
docker service ls
- Create chart users
docker exec -it \
$(docker container ls --filter name=_charts -q) \
charts-cli add-user --first-name "<First>" --last-name "<Last>" \
--email "<[user@example.com](mailto:user@example.com)>" --password "<Password>" \
--role "<UserAdmin|User>"
1. But after installation, web server is not coming up.
2. I see following error
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | lastKnownVersion (‘1.9.1’)
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | existingClientAppIds ([ ‘mongodb-charts-vjsuf’ ])
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | migrationsExecuted ({})
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | (node:8) UnhandledPromiseRejectionWarning: Error: Error removing all functions:
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | at _checkApp.then.then.catch.err (/mongodb-charts/bin/charts-cli.js:33546:15)
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | at process._tickCallback (internal/process/next_tick.js:68:7)
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | (node:8) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | events.js:174
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | throw er; // Unhandled ‘error’ event
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | ^
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop |
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | Error: incorrect header check
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | at Zlib.zlibOnError [as onerror] (zlib.js:164:17)
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | Emitted ‘error’ event at:
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | at errorOrDestroy (internal/streams/destroy.js:107:12)
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | at Gunzip.onerror (_stream_readable.js:734:7)
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | at Gunzip.emit (events.js:198:13)
mongodb-charts_charts.1.kk1p9rm3mbkc@docker-desktop | at Zlib.zlibOnError [as onerror] (zlib.js:167:8)