Error: getaddrinfo ENOTFOUND (local cloud) [solved]

I get error when i try to do this using spark-cli:

spark keys doctor "my core id"

result:

running dfu-util -l
FOUND DFU DEVICE 1d50:607f
running openssl genrsa -out "my core id"_new.pem 1024
running openssl rsa -in "my core id"_new.pem -pubout -out "my core id"_new.pub.pem
running openssl rsa -in "my core id"_new.pem -outform DER -out "my core id"_new.der
New Key Created!
running dfu-util -l
FOUND DFU DEVICE 1d50:607f
running dfu-util -l
FOUND DFU DEVICE 1d50:607f
running dfu-util -d 1d50:607f -a 1 -s 0x00002000:1024 -U pre_"my core id"_new.der
running openssl rsa -in pre_"my core id"_new.der -inform DER -pubout
  -out pre_"my core id"_new.pub.pem
Saved!
checking file  "my core id"_new.der
spawning dfu-util -d 1d50:607f -a 1 -i 0 -s 0x00002000:leave -D "my core id"_new.der
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 1d50:607f
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #1 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "SPI Flash : SST25x"
Downloading to address = 0x00002000, size = 608
Download        [=========================] 100%          608 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state
Saved!
attempting to add a new public key for core "my core id"
submitPublicKey got error:  { [Error: getaddrinfo ENOTFOUND] code: 'ENOTFOUND',
errno: 'ENOTFOUND', syscall: 'getaddrinfo' }
Make sure your core is in DFU mode (blinking yellow), and that your computer is
online.
Error - Error: getaddrinfo ENOTFOUND

I get the same error “getaddrinfo ENOTFOUND” also when I flashing my core over USB using spark-cli

and when I try to use “spark list” command, it shows:

Checking with the cloud...
Retrieving cores... (this might take a few seconds)
listDevices got error:  { [Error: getaddrinfo ENOTFOUND] code: 'ENOTFOUND', errn
o: 'ENOTFOUND', syscall: 'getaddrinfo' }
Potentially unhandled rejection [2] Error: getaddrinfo ENOTFOUND
    at errnoException (dns.js:37:11)
    at Object.onanswer [as oncomplete] (dns.js:124:16)

Are you

1.) Using the Spark :cloud:?

2.) You need to replace "my_core_id" with the actual core id and not simply using the text…

Thanks for the fast reply!
1.) I am using Spark local cloud.
2.) I am using the actual core id, but replace it to “my_core_id” when I posting here.

I don’t think spark keys doctor works for local :cloud:

You may want to follow this tutorial: https://community.spark.io/t/tutorial-local-cloud-1st-time-instructions-17-jan-15/5589

I just downgrade my Node.js and it is working now.
Thanks for help!

1 Like