Failed to claim core, server said [ 'That belongs to someone else' ]

I created my own private cloud using this link: https://github.com/spark/spark-server/

When I am trying to get claim core it gives this error message:

Failed to claim core, server said [ ‘That belongs to someone else’ ].

I am able to create account and Wifi set up but when it comes to claiming the core I am getting this error.

Is something I am missing during configuration or set up? Please help !

Did you modify your spark cli to point to your own :cloud: instead?

I thinking claiming is not a feature on the local cloud. What does spark list say?

Yes. I did change spark.config.json and try to login and find out spark list and it returns null.

One more thing I noticed that spark.config.json is getting changed and entry is no longer there. i do not know why.

Try using spark config profile_name apiUrl "http://IP_ADDRESS" to create a new profile and switch over using spark config profile_name

See the docs here: https://github.com/spark/spark-cli#spark-config

I did try your solution and now I have core Id. But my server failed to handshake and it is trying find MyCoreId.pub.pem file inside core_keys which actually not there. I have default.pub.pem in other folder but not inside core_keys folder.

I renamed the default.pub.pem to make it MyCoreid.pub.pem but it is not working. Any suggestions?

you should not rename default.pub.pem. That’s the server public key.

The missing puzzle is to upload your core public key to the core_keys folder. I would recommend following this tutorial:

1 Like

Thanks. I am able to connect to spark local cloud. But I still have 2 open questions. I would appreciate if you can help me with this.

a) How should I find the cloud_public.der file ?
b) Do we have any IDE so that I can connect to local cloud and compile my code and push it to my core.

Thanks again !

Which public key file are you referring to? The Spark cloud or your own cloud?

In the tutorial, there’s a link a placed inside with the spark cloud public key.

Currently, compiling on the local cloud is not available. You can either use the spark cloud to compile and flash via your own cloud or compile locally on your computer and flash it :wink:

2 Likes

I was referring to spark cloud public key. Ok. I will use that link for the public key. Thanks !

Any tutorial on compiling and flashing locally.

Thanks !

Hi ,

I have reached to the point where I can up my core for local cloud. The core which I was using having many access token so I deleted all of them except one. When I am trying to run spark setup and configure the core it says it needs to delete the access token but gave me error message:

Removing access toekn xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
error removing token: Error: socket hang up

Please let me know what I am making mistake.

That’s a bug in Spark-cli if I remember correctly

Any solution to overcome this? How I can move forward?

If you want to, you can see the docs here:

http://docs.spark.io/api/#authentication-deleting-an-access-token

and use a general curl command to remove them :wink:

I did this:

curl https://api.spark.io/v1/access_tokens/f450c25851f671f7f3927f2a243317b3ed3aa422 -u Username:Password -X DELETE

and it says empty reply from server.

i managed to get a response but i think the fix is not up yet

KEN-MBP:dbcyan kennethlimcp$ curl https://api.spark.io/v1/access_tokens/111 -u username:password -X DELETE
{
  "code": 400,
  "error": "invalid_request",
  "error_description": "Malformed auth header"
}curl: (3) <url> malformed

See: https://github.com/spark/spark-cli/issues/99

This is the actual curl request:

curl https://api.spark.io/v1/access_tokens/f450c25851f671f7f3927f2a243317b3ed3aa422 -u skumar2@littelfuse.com:Welcome#2012 -X DELETE

Hi ,

I am somehow able to setup my account and my local server says " core is online" and gives me message and the core id.

Now, I set up my account , user id and password but when it goes claiming the core it gives me this:

Claiming your core

Failed to claim core, server said [ ‘Device is not connected’ ]
Please wait until your core is breathing cyan and then press ENTER

I think if this is done then I am all set. Please let me know …

Thanks for your support.

I am still waiting for reply from somebody.

If my core is listening to local server and it does have the core id then why server failed to claim core??

Is there any bug in spark -cli?

1.) Cores are not required to be claimed in the local :cloud: as the current setup is a 1 user scenario.

2.) Once the core is connected to the local :cloud:, you will be able to see it with any account on the :cloud:

Hope this answers your question?

Thanks but when I write “spark list” it says, my core is offline:

Ideally when the core it connected it should say like below:

Checking with the cloud…
Retrieving cores… (this might take a few seconds)
my_core_name (0123456789ABCDEFGHI) 0 variables, and 4 functions
Functions:
int digitalWrite(string)
int digitalRead(string)
int analogWrite(string)
int analogRead(string)

Thanks,
Satyen