Constellation-Labs / constellation

:milky_way::satellite: Decentralized Application Integration Platform
Apache License 2.0
153 stars 40 forks source link

When alias is wrong in dag reset CLI, no error given, NullPointerException in logs #1583

Closed ncoronges closed 3 years ago

ncoronges commented 3 years ago

When we got our node up and running we were initially using the wrong alias . The dag reset process completed and the only error we got was "port 9002 unresponsive". In app.log it shows NullPointerException in KeyStorageUtils:209. Had to do some digging to figure out what was wrong. Be nice to throw an exception and describe error in dag reset CLI.

o.c.ConstellationNode$ - An error occurred during startup process. 
java.lang.NullPointerException: null
    at org.constellation.keytool.KeyStoreUtils$.$anonfun$unlockKeyPair$1(KeyStoreUtils.scala:209)
marcinwadon commented 3 years ago

Hey @ncoronges. To unlock your keystore, you have to provide the same alias you used for creating the private key (and better keep it private) :)

For the node alias (aka nickname) you can use whatever name you want but it's stored in the whitelisting file right now, so it can be changed only by the CL team.