Failed when execute 'spark core remove' in local cloud

Seems spard core remove cannt be used in local cloud? it response me below in cli :

Are you sure? Please Type yes to continue: yes
releasing core 53ff74065075535141251681
server said Not Found

What does spark list say? Did you add your server IP address in spark.config.json?

hi @kennethlimcp,

server list result as below:

Checking with the cloud…
Retrieving cores… (this might take a few seconds)
null (53ff74065075535141251681) is online
Functions:
int digitalread(String args)
int digitalwrite(String args)
int analogread(String args)
int analogwrite(String args)

for the config file,

{
β€œaccess_token”: β€œ9325ae59aec2e49c403c91b94b2edfc130f3ff7b”,
β€œusername”: β€œ***@gmail.com”,
β€œapiUrl”: β€œhttp://192.168.1.100:8080”
}

in the server console it printed:

192.168.1.100 - - [Thu, 28 Aug 2014 12:20:48 GMT] β€œDELETE /v1/devices/53ff74065075535141251681 HTTP/1.1” 404 9 β€œ-” β€œ-”

Hmm… Can you do spark core add 53ff74065075535141251681 and see what happens?

The cores in the Local :cloud: is not tagged to any account yet and is available for everyone.

Try to add then remove again to see if it works. I will test it later after completing some dev work on the Spark. :wink:

@kennethlimcp Thanks your reply , I just added and then removed ,still the some issue.

B.T.W, I recoved Factory mode, and then It is first White(no flashοΌ‰, and then flash with Green ,and then flash Red when i plugin USB, and looped upon steps. below is logs in server console.

1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_151’,
duration: 258.247 }
Session ended for _151
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_152’,
duration: 25.01 }
Session ended for _152
Connection from: 192.168.1.106, connId: 154
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.106’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_153’ }
Core online!
Connection from: 192.168.1.106, connId: 155
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.106’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_154’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_153’,
duration: 25.004 }
Session ended for _153
Connection from: 192.168.1.106, connId: 156
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.106’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_155’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_154’,
duration: 25.017 }
Session ended for _154
Connection from: 192.168.1.106, connId: 157
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.106’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_156’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_155’,
duration: 25.013 }
Session ended for _155
Connection from: 192.168.1.106, connId: 158
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.106’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_157’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_156’,
duration: 25.008 }
Session ended for _156
Connection from: 192.168.1.106, connId: 159
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.106’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_158’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_157’,
duration: 25.021 }
Session ended for _157
Connection from: 192.168.1.106, connId: 160
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.106’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_159’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_158’,
duration: 25.015 }
Session ended for _158
Connection from: 192.168.1.106, connId: 161
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.106’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_160’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_159’,
duration: 25.003 }
Session ended for _159
Connection from: 192.168.1.106, connId: 162
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.106’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_161’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_160’,
duration: 25.007 }
Session ended for _160
Connection from: 192.168.1.106, connId: 163
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.106’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_162’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_161’,
duration: 25 }
Session ended for _161
Connection from: 192.168.1.106, connId: 164
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.106’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_163’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_162’,
duration: 25.006 }
Session ended for _162
Connection from: 192.168.1.106, connId: 165
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.106’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_164’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_163’,
duration: 25.015 }
Session ended for _163
Connection from: 192.168.1.106, connId: 166
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.106’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_165’ }
Core online!

Are you on the latest spark-server?

Hi , @kennethlimcp , server download last week. Master branch.

You might want to perform a npm update since there is a new version 1-2 days back.

There should not be having so much disconnection. Anyways, will be switching over to my Local :cloud: now to test your issue. :wink:

@dave, the remove core API endpoint has not been added to the spark-server i supposed?

@yuanetking, i think the function is not available for now and you can delete the public keys of the core found in core_keys folder for now.

1 Like

@kennethlimcp, OK, i just test all the api described in document , :slight_smile: .

and , i am not skilled Git, i run the server from Souce , not Node npm, for the latest version , I just update master branch from git will be ok, right ?

you can simply cd to the spark-server folder and perform an npm update.

If you do git clone for the Spark-server, you will need to perform npm install in the js folder. :wink:

1 Like

@kennethlimcp still the same issues, The problem maybe come from firmware side, but not the server side , i suppose. Factory reset will cover the old version of firmware into hardware? So which firmware i should replace into hardware ? CC3000.bin , Tinker.bin, firmware.bin ?

and i checked one thread similar to my issue, http://community.spark.io/t/spark-local-cloud-beta-collection-of-issues/6146 , can i refer to this ?

Connection from: 192.168.1.107, connId: 1
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.107’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_0’ }
Core online!
Connection from: 192.168.1.107, connId: 2
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.107’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_1’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_0’,
duration: 25.009 }
Session ended for _0
Connection from: 192.168.1.107, connId: 3
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.107’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_2’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_1’,
duration: 25.001 }
Session ended for _1
Connection from: 192.168.1.107, connId: 4
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.107’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_3’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_2’,
duration: 25.004 }
Session ended for _2
Connection from: 192.168.1.107, connId: 5
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.107’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_4’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_3’,
duration: 25.005 }
Session ended for _3
Connection from: 192.168.1.107, connId: 6
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.107’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_5’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_4’,
duration: 25.001 }
Session ended for _4
Connection from: 192.168.1.107, connId: 7
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.107’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_6’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_5’,
duration: 25 }
Session ended for _5
Connection from: 192.168.1.107, connId: 8
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.107’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_7’ }
Core online!
1: Core disconnected: socket error Error: read ECONNRESET { coreID: β€˜53ff74065075535141251681’,
cache_key: β€˜_6’,
duration: 25.009 }
Session ended for _6
Connection from: 192.168.1.107, connId: 9
on ready { coreID: β€˜53ff74065075535141251681’,
ip: β€˜192.168.1.107’,
product_id: 0,
firmware_version: 7,
cache_key: β€˜_8’ }
Core online!

hi @kennethlimcp, i just flash tinker, cc300, and firmware bins by usb,seem hardware is working fine(Cyan led breathing now) , but when i spark list it result me:

Checking with the cloud…
Retrieving cores… (this might take a few seconds)
No cores found.

i have already added core by command β€˜spark core add core_id’

can you test for the senario ?

spark core add is definitely working for me.

You might want to test for spark list to see the results first. :wink:

Also, if you place your core in DFU mode, you can use spark flash --factory tinker to update the latest tinker firmware for factory reset purpose.

You might be facing some other issues and we have come to a conclusion that spark core remove is currently not available for the Local :cloud:.

Hi @kennethlimcp, seems , x times disconection is resolved, but the CLI or Local Server may have some problem , it is not stable, should be tested more. I just give the command β€˜Spark list’ , but it responsed the correct result now .dont known why…

and , the api document should be separated by Cloud and Local Cloud… it will be clear more, i think.

thx
Chris.

Hi all, I am fully aware this is an old thread but – I have the same exact problem trying to remove cores, using the latest Tinker firmware, deep update and local cloud server code from GIT.

I can successfully add cores, and list cores, but when I try to remove them using

spark core remove core_ID

the CLI interface hangs, and the local server log says

192.168.1.100 - - [Wed, 25 Feb 2015 20:03:49 GMT] "DELETE /v1/devices/48ff6a065067555024122387 HTTP/1.1" 404 9 "-" "-"

just as the OP encountered. May I take it then, that this remove core operation still has not made its way into the local cloud code?

Hi, msolters,

no need to use that command, you just remove the file from your local server directory is fine .

Yeah, it seems to suffer from the same bug as local server spark add – it requires a shutdown and restart to take effect.

As my experiences, the add command wihout bug, the only is remove. Add command will copy the pem file into the local cloud dynamic, no need to restart the server ,you can try again.