Task Tracker Tutorial — push failed: error finding cluster "Cluster0"

Hi everyone,

I’m following this Realm App Task Tracker Tutorial and I’m stuck at step E.6.

  • Obviously when creating a new Atlas Cluster, I chose a different cluster name rather than the default “Cluster0”.
  • After running realm-cli push and choosing “Yes” for default configuration.
    I got an error saying:
    push failed: error finding cluster "Cluster0": No cluster named Cluster0 exists in group 6242a8b0d7b4711dc6b7128c.

image

Is there anything we can do besides terminate the whole cluster and build again? Or is it the only way?

Thank you so much!

Hey @Julie_Lai - short answer, you don’t have to terminate the cluster. Let’s dig in a little bit to understand what’s going on here.

In this tutorial, in step E.1. you’ve cloned down a GitHub repository that contains configuration files for a Realm app that is pre-populated with some of the things you’ll use in the tutorial. These configuration files contain things like your Sync configuration, and triggers and functions that your backend Realm app will use. One of the files in your configuration directory is pre-populated with a cluster name, assuming you’ll accept the default cluster.

If you cd into the realm-tutorial-backend directory, you’ll see data_sources/mongo-db-atlas. When you cd into that directory, you’ll see a config.json file. It should look something like this:

{
    "name": "mongodb-atlas",
    "type": "mongodb-atlas",
    "config": {
        "clusterName": "Cluster0",
        "readPreference": "primary",
        "wireProtocolEnabled": false
    },
    "version": 1
}

If you change the clusterName here to match whatever you called the cluster, that should resolve the issue.

If you’re curious about any of the other things you see while you’re poking around in configuration files, check out the Realm Application Configuration reference. It’s a good reference to understand what all the parameters are for in the configuration objects.

Hope this helps!

2 Likes

Hi Dachary,
I followed your solution and ran realm-cli push again. It works!
Thanks so much for your support! :smiley:

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