Issues deploying Charts container on RHEL server

Hi,

I am new to Mongo. I have setup an on-prem MongoDB and I was trying to setup Mongo Charts (ver 19.12.2) by following the documentation.

Below is what i see for each command executed (in sequence):

docker stack deploy -c /home/mongodb-charts/charts-docker-swarm-19.12.2.yml mongodb-charts
Creating network mongodb-charts_backend
Creating service mongodb-charts_charts

docker service ls
ID NAME MODE REPLICAS IMAGE
tjpbzxt01ymi mongodb-charts_charts replicated 0/1 quay.io/mongodb/charts:19.12.2

docker service logs tjpbzxt01ymi
No output. It hangs there for a long time. I had to exit out of this.

Even after waiting for half-day, i do not see the replicas as 1/1 and i cant pull up the container logs.

Below is my environment:

RHEL v 7.9
Docker Client v1.13.1
Docker Server v1.13.1

Note: I updated the version number in docker compose file to 3.1 (from 3.3) as i was seeing an “unsupported version error”

Any guidance on how to debug this issue is very much appreciated.

Hi @Tej_R -

The first thing I’d check is whether the Charts image has been pulled down successfully. You can do this by running docker pull quay.io/mongodb/charts:19.12.2 before trying to deploy the stack. I’ve seen behaviour similar to what you’ve described when there are problems pulling the image due to network problems, low disk space, etc.

Let me know if that helps at all.
Tom

1 Like

Hi @tomhollander ,

Thanks for the quick response.

I had network restrictions from the server and hence i used a workaround:

Download the image on a different machine -> save it as a tar file -> move the tar file to the server -> load the image into docker

Do you think something might have gone wrong with the above workaround.

I can try downloading the image again but can’t do it directly on the server. Is there an alternative location to get the image.

Also, how can i verify the integrity/correctness of the image after i download it?

Thanks.

Hi @Tej_R -

If you imported the image this way, I’d say it is no longer tied to its quay.io registry name. If you execute docker images it will show the expected names for all images. For example here are some of mine:

REPOSITORY               TAG                 IMAGE ID            CREATED             SIZE
mongodb-charts-dev       latest              683b657d6295        16 hours ago        656MB
mongo                    latest              fb58c9bbce4e        3 days ago          493MB
mongo                    <none>              ba0c2ff8d362        8 weeks ago         492MB
quay.io/mongodb/charts   19.12.2             bfd64537eef0        4 months ago        714MB
alpine                   latest              a24bb4013296        5 months ago        5.57MB

If your Charts image is showing as just charts (or something else) instead of quay.io/mongodb/charts you’ll need to update your compose file to reference the local image name.

Tom

1 Like

Hi @tomhollander.

Here is what i see when i execute docker images:

docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
quay.io/mongodb/charts 19.12.2 bfd64537eef0 4 months ago 714 MB

Based on the output, i do not see anything incorrect here.

Also, I downloaded the image again and repeated the steps to deploy (I removed the previous image) and seeing the same issue.

What else can i check?

Do you get any output when you type this?

docker run quay.io/mongodb/charts:19.12.2

This command won’t result in Charts starting successfully, but if there’s some fundamental problem you may get some clues in the error messages.

Tom

1 Like

Hi @tomhollander

I got the following output for docker run quay.io/mongodb/charts:19.12.2

: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)

I am seeing 3 errors here. However, i was able to generate a docker secret (charts-mongodb-uri) as part of the setup process. So not sure why i am seeing an error related to it. And i have no clue about the other 2 errors.

Thanks @Tej_R. The errors here are expected - when the container is run directly it doesn’t have access to the secrets or volumes. However this did confirm that the image itself is installed correctly.

After re-reading your initial post I picked up that you’re using Docker 1.13.1. This is a very old version, and as per the Charts documentation you need to be using version 17.06 or higher. So I suspect that may be why it’s not working.

Also in case you missed the announcement, please note that the on-prem release of Charts will only be supported until September 2021.

Tom

2 Likes

Thanks again, @tomhollander.

Looks like i am left with no other options. My company only allows us to use RHEL servers and Windows Server 2012 R2.
The docker version supported on RHEL is only 1.13.1. So, looks like this option is not viable.

I was researching on the possibility of setting up MongoDB and Charts on Windows Server 2012 R2. I can set up MongoDB v4.2 but looks like docker isn’t supported on 2012.

I saw the announcement about retirement of on-prem charts after Sep 2021. I felt, it would have been better if there wasn’t a dependency on docker for Charts.

Thanks,