This is bug in the Intel XDK IoT Edition, and it will be fixed in the next XDK release. Below is the workaround:
"ECONNREFUSED" message when trying to connect to an iot device from Intel XDK IoT Edition (release 0128) to a device running XDK daemon 0.0.26 or greater.
Workaround (2 methods):
1: Select "Add Manual Connection" from the device drop down
2: Select/check the "Use secure connection" checkbox. Then click 'Connect' (clicking 'Connect' will save the 'secure connection' preference, and allow normal connections on future attempts)Note: The connection may fail if the wrong ip was entered, this is ok. The 'Use secure connection' option will now be the default (and subsequent connections that are initiated by selecting a device from the device list will succeed!)
1: Exit the XDK, then open the Intel XDK IoT Edition 'global-settings' file. The “global-settings” file located in the following path:
2: In the "iot-tab" section of the file
change the "secureConnection" setting/line from 'false' to 'true'
Ex: change from: to:
3: Restart the Intel XDK IoT Edition
I was able to solve the ECONNREFUSED issue by changing the password using "configure_edison --password" command in putty. Looks like the "Use secure connection" checkbox has been removed from Add Manual Connection window, but after changing the password, I'm able to connect by selecting the device IP address from "IoT Device" dropdown and entering the credentials (root as username and new password).