Using the command helm upgrade --install mongodb bitnami/mongodb --version 10.21.1 -f mongodb.yml
quits with an error Error: failed to download "bitnami/mongodb" at version "10.21.1"
If I remove the version instruction --version 10.21.1 and the installation works.
Is there any version definitely needed?
Mender Server:
In the last step āCreate the admin userā I get the following error: error: unable to upgrade connection: container not found ("useradm")
The chart version 10.21.1 for bitnami/mongodb no longer exists. Could you replace the --version argument with 11.2.0? Remember to update the Mender chart values. Note that the snippet deploying the Mender helm chart depends on the $MONGODB_ROOT_PASSWORD env variable from the MongoDB deployment step.
In the meantime I will make sure to update the documentation. All the services that are in CrashLoopBackOff state depends on MongoDB.
This looks like the minio credentials in the Mender helm chart values does not match the generated access key ($MINIO_ACCESS_KEY and $MINIO_SECRET_KEY) from this step.
Tip: you donāt have to redeploy everything from scratch to update the values, you can run:
helm get values mender > values.yml
vim values.yml # Update values in section global.s3.*
helm upgrade mender -f values.yml
If this doesnāt help, could you share the logs from the deployments-* pod?
2022-07-14T14:37:01.525790194Z stderr F RequestError: send request failed
2022-07-14T14:37:01.525797681Z stderr F caused by: Put "https://artifacts.interelectronix.com/mender-artifact-storage": x509: certificate is valid for d2bc123fc7ac1ea25c3581b93e5a12e6.cf3bcb6853f16c11ffa66b5e1d33adda.traefik.default, not artifacts.interelectronix.com
Iām facing the same issue. However, my initial deployment was with the recommended version, 11.2.0. I tried changing to the latest chart version, which is 13.1.2, but Iām still seeing the same containers in CrashLoopBackOff status.
Any suggestions?
Thanks,
stu
@walterp Sorry, I completely missed your last reply. Your issue seems to be related to your certificate setup. The ingress does not have a certificate configured for the artifacts (minio) hostname, so it is serving with the fallback certificate from the IngressController. Make sure the tls configuration in the minio TLS configuration matches the certificate secret.
@stumarr Which pods are in CrashLoopBackoff state? Can you inspect the logs from the crashing pods and see if you find some hints on why they are failing?
The Mender pods are crashing because the mongodb instance is not reachable. I can also see that the mongodb arbiter is crashing, could you inspect why it is crashing?
The hostname in the mongodb URL is incorrect; by default the helm chart is creating a headless service which is reachable using the FQDN mongodb-headless.default.svc.cluster.local. If you havenāt changed the default port name for the service (āmongodbā) you can utilize the DNS service record (SRV) that kubernetes creates for headless services and use the more compact connection string: mongodb+srv://root:mongorootpassword123@mongodb-headless.default.svc.cluster.local?tls=false
Are you able to connect to the MongoDB cluster? Note that if you redeployed the MongoDB helm chart following the instructions, you might have changed the root password to the cluster which you need to input into the mender helm values. To see the current root password, you can inspect the secret generated by the mongodb helm chart:
MGO_ROOT_PWD=$(kubectl get secret -l 'app.kubernetes.io/name=mongodb' -o 'jsonpath={.items[].data.mongodb-root-password}' | base64 -d)
echo "Connection string: mongodb+srv://root:${MGO_ROOT_PWD}@mongodb-headless.default.svc.cluster.local?tls=false"
# Enter the new connection string into mender Helm values at `global.mongodb.URL`
# Then run `helm upgrade mender -f <path/to/mender.yaml>`
I think thatās the issue that Iām trying to highlight here. I am not able to connect to MongoDB. If I canāt connect to it manually, Iām sure the Mender components will also be unable to connect. However, it doesnāt seem to be an issue with the credentials because when I hard-code the root password it times out when I try to connect to MongoDB.
@alfrunes we were able to resolve our issue. It turns out that I made the mistake of creating my own yaml files instead of using, for example, the cat >mender-ingress.yml <<EOF method. This was causing an issue with the secrets. I appreciate the help.
One last issueā¦This step isnāt working for me. I enter the credentials and it just refreshes the login screen but never logs in. Is there a pod that I need to restart?
Create the Admin User
USERADM_POD=$(kubectl get pod -l āapp.kubernetes.io/name=useradmā -o name | head -1)
kubectl exec $USERADM_POD ā useradm create-user --username ādemo@mender.ioā --password ādemodemoā