Local Cloud, Claiming core "That belongs to someone else" [Solved]

I have a local cloud server setup and I see the core connect to it and the core is breathing cyan but when I try to claim the core, through the CLI, I get “Failed to claim core, server said ‘That belongs to someone else’”. Not sure where to go from here. I have blew the server away and rebuilt it again but same results. I followed this tutorial: https://community.spark.io/t/tutorial-local-cloud-1st-time-instructions/5589

Can you check your spark.json file for your spark-cli? What does it say?

1 Like

That’s strange. My spark.config.json file was not updated with the access key and username when I setup the new user:

"access_token": null,
"username": null,
"apiUrl": "http://192.168.11.32:8080"

There is a local.config.json file that does have the access token given on spark cli login though:

"username": "cameron@domain.com",
"access_token": "490332xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"api-url": "http://192.168.11.32:8080"

In troubleshooting, I found a site that had me execute these commands:

spark config local api-url http://192.168.11.32:8080
spark config local

I’m assuming this caused the local.config.json file to be created. What should I do to get it back to the way it should be?

Thank you, so much, for your help.

1 Like

This think you are somehow confused. :smiley:

1.) There is a command known as spark config. This is used to switch around different profile (between :cloud:)

2.) If you want to create a new profile, the command is spark config profile_name apiUrl http://xxxx.xxx.xxx.xxx

The documentation is here: https://github.com/spark/spark-cli#spark-config

3.) I would recommend that you delete all the files in the .spark directory

4.) Create a new profile for your own :cloud: using the command mentioned in 2

5.) Login to your own :cloud: by switching to the profile using spark config profile_name

:wink:

1 Like

Perfect! Thank you for your excellent description. That makes a lot of sense now. The core is connected and I can see it with a spark list. I appreciate it.

1 Like

I sent in a proposed spark config identify command on Spark-cli which will display what profile and the ip address you are currently pointing to.

This should help new users fiddling with their own cloud and be sure that Spark-cli is reaching the correct server. Not sure when this PR will be pulled in but you can add it locally if there’s a strong need to. :wink: