Fail to install mongodb charts on Centos

Hi
I try it install MongDB Charts on my Centos 7.
My docker version is 19.03.6
After run docker stack deploy -c charts-docker-swarm-19.12.2.yml mongodb-charts
docker service ls always show this:
ID NAME MODE REPLICAS IMAGE PORTS
attyf7r08cx0 mongodb-charts_charts replicated 0/1 quay.io/mongodb/charts:19.12.2 *:80->80/tcp, *:443->443/tcp

and docker service log attyf7r08cx0 print nothing!
so I try to run docker run quay.io/mongodb/charts:19.12.2
got this:
:heavy_check_mark: parsedArgs
:heavy_check_mark: installDir (’/mongodb-charts’)
:heavy_check_mark: log
:heavy_check_mark: salt
:heavy_check_mark: productNameAndVersion ({ productName: ‘MongoDB Charts Frontend’, version: ‘1.9.1’ })
:heavy_check_mark: gitHash (undefined)
:heavy_check_mark: supportWidgetAndMetrics (undefined)
:heavy_check_mark: tileServer (undefined)
:heavy_check_mark: tileAttributionMessage (undefined)
:heavy_check_mark: rawFeatureFlags (undefined)
:heavy_check_mark: stitchMigrationsLog ({ completedStitchMigrations: })
:heavy_check_mark: featureFlags ({})
:heavy_multiplication_x: chartsMongoDBUri failure: ENOENT: no such file or directory, open ‘/run/secrets/charts-mongodb-uri’
:heavy_multiplication_x: tokens failure: ENOENT: no such file or directory, open ‘/mongodb-charts/volumes/keys/charts-tokens.json’
:heavy_multiplication_x: encryptionKeyPath failure: ENOENT: no such file or directory, open ‘/mongodb-charts/volumes/keys/mongodb-charts.key’
:heavy_check_mark: lastAppJson ({})
:heavy_check_mark: stitchConfigTemplate
:heavy_check_mark: libMongoIsInPath (true)

Have anyone got the same errors? And how to fix it ?
Thanks!

Looks like you missed a step:
https://docs.mongodb.com/charts/19.12/installation#create-a-docker-secret-for-the-metadata-database

Also as you may have seen on the compose download page:

MongoDB Charts On-Premises will be end of life on September 1, 2021

1 Like

hi, @chris, thanks for replying.
I do remember to execute the Step 6:
docker run --rm quay.io/mongodb/charts:19.12.2 charts-cli test-connection ‘mongodb://172.17.0.1’
MongoDB connection URI successfully verified.

Before starting Charts, please create a Docker Secret containing this connection URI using the following command:
echo “mongodb://172.17.0.1” | docker secret create charts-mongodb-uri -
[root@VM-186-157-centos /data/mongodb/mongodb-charts]# echo “mongodb://172.17.0.1” | docker secret create charts-mongodb-uri -
pv92cnbt4hlf9otoqx6ghnged

I followed every step guide and this worked on my Ubuntu18.04LTS.
But it failed on Centos 7.

Hi @He-Qingwei -

The errors you saw when you started using docker run are expected, as the volumes and secrets are not mounted when you start this way. It is possible to mount the volumes with additional parameters, but it would likely be easier to figure out why docker stack deploy didn’t work.

The most common cause of the 0/1 replicas is that the image is still in the process of being pulled down. Did you try this again once the image was definitely available locally?

Tom

Hi, @tomhollander
Thanks for replying.
Before stack deploy, I run docker pull quay.io/mongodb/charts:19.12.2 for getting charts image manually.
Here is my docker images outputs:

REPOSITORY               TAG                 IMAGE ID            CREATED             SIZE
mongo                    latest              ca8e14b1fda6        2 weeks ago         493MB
quay.io/mongodb/charts   19.12.2             bfd64537eef0        6 months ago        714MB

Do any else images are required for docker stack deploy ?

Best wishes, Qingwei

And here is some logs @tomhollander :

error msg="Failed creating ingress network: network sandbox join failed: subnet sandbox join failed for \"10.255.0.0/16\": overlay subnet 10.255.0.0/16 failed check with host route table: requested network overlaps wit
Feb 08 10:54:23 VM-14-228-centos dockerd[1346]: time="2021-02-08T10:54:23.665071455+08:00" level=warning msg="Peer operation failed:Unable to find the peerDB for nid:m66sf37g0wcbfxpu11rp6ykrh op:&{3 m66sf37g0wcbfxpu11rp6ykrh  [] [] [] [] false false false func1}"
Feb 08 10:54:27 VM-14-228-centos dockerd[1346]: time="2021-02-08T10:54:27.315458585+08:00" level=info msg="initialized VXLAN UDP port to 4789 "
Feb 08 10:54:27 VM-14-228-centos dockerd[1346]: time="2021-02-08T10:54:27.607537671+08:00" level=warning msg="failed to deactivate service binding for container mongodb-charts_charts.1.wlvlodd7th7z25koq5og3dh4y" error="No such container: mongodb-charts_charts.1.wlvlodd7th7z25koq5og3dh4y" module=node/agent node.id=
Feb 08 10:54:27 VM-14-228-centos dockerd[1346]: time="2021-02-08T10:54:27.786356910+08:00" level=warning msg="Error (Unable to complete atomic operation, key modified) deleting object [endpoint_count m66sf37g0wcbfxpu11rp6ykrh], retrying...."
Feb 08 10:54:27 VM-14-228-centos dockerd[1346]: time="2021-02-08T10:54:27.786408737+08:00" level=error msg="Failed creating ingress network: network sandbox join failed: subnet sandbox join failed for \"10.255.0.0/16\": overlay subnet 10.255.0.0/16 failed check with host route table: requested network overlaps wit
Feb 08 10:54:27 VM-14-228-centos dockerd[1346]: time="2021-02-08T10:54:27.786431349+08:00" level=warning msg="Peer operation failed:Unable to find the peerDB for nid:m66sf37g0wcbfxpu11rp6ykrh op:&{3 m66sf37g0wcbfxpu11rp6ykrh  [] [] [] [] false false false func1}"
Feb 08 10:54:27 VM-14-228-centos dockerd[1346]: time="2021-02-08T10:54:27.897323149+08:00" level=warning msg="Error (Unable to complete atomic operation, key modified) deleting object [endpoint_count 80ujoovfx0qf5t6h89rqvy2dc], retrying...."