Power outage wiped my node config, then more woes came

Hey all, Windows GUI node operator on NoIP ddns here with some recent issues I can’t seem to wrap my head around.

A power outage recently knocked out my desktop and the node along with it. When I first powered the computer back on and tried to get the node dashboard to pull up, I received the message “localhost refused to connect.” Trying to start the node from elevated PowerShell did nothing and did not return any error messages.

After doing some digging, I was able to figure out that while the config.yaml file in C:\Storj\ was fine and had my right info, a second copy of it in C:\Users(My account)\AppData\Roaming\Storj\StorageNode was completely wiped. I replaced the config file inside the AppData folder and my Storj node got back up and running, temporarily. Strangely, I had to use Command Prompt instead of PowerShell to get it running.

Fast forward to today, and I came in to see that my node dashboard was on a continuous looping load. I checked in Task Manager and the node was eating all of my memory, as in 96%. I went to check my external hard drive I used for Storj and it appeared as though the hard drive malfunctioned and its data couldn’t be accessed. Windows Explorer froze when I tried to click into it.

I had to perform a hard reset on the desktop, and when I got things running again, the “localhost refused to connect” message returned. My hard drive is now accessible again though, and even stranger is that my config.yaml files are identical in both locations now.

I was looking for a time to try and expand the amount of storage my node was using, and changed both config files to 3.00 TB instead of 2.50 TB. Changing the storage in config back to 2.50 TB did nothing and localhost still refuses to connect.

Nothing appears to get this node back online. I tried restarting from elevated PowerShell, nothing happened. I tried running storagenode.exe commands in admin Command Prompt, and config, dashboard, run and setup do nothing. Diag does give results from 6 satellites.

What should I do at this point?

I Would check your logs to see if it will give you any info of what is going on. Espically knowing your using an external usb drive a power outage can and will corrupts data, And or change the Drive letter.

The standard path to the config.yaml for the Windows GUI node is "C:\Program Files\Storj\Storage Node\config.yaml", but if you installed the node to the manually changed path, it should place config.yaml to the installation dir (C:\Storj I suppose).

However, if you run setup from the command line, the default path for the config.yaml is %APPDATA%\Storj\Storagenode\config.yaml (seems you did that), and it doesn’t exist if you used a GUI installer.

Please, make sure that the drive letter is updated to the current one. As @deathlessdd said, Windows could change the drive letter when something is goes wrong with disk (as in your case).
Please, show result of the command (PowerShell):

(Get-WmiObject Win32_Service -Filter "name = 'storagenode'").PathName

And

Get-PSDrive

Then

$path = (Get-WmiObject Win32_Service -Filter "name = 'storagenode'" | Select-Object PathName | sls '--config-dir "(.*)\\').Matches.Groups[1].Value;
sls "storage.path" ${path}config.yaml;
sls "identity" ${path}config.yaml;

Then

$logFile = (sls "log.output: winfile:///(.*)" ${path}config.yaml).Matches.Groups[1].Value

and finally

Get-Content -Tail 20 $logFile

Please, place the returned text between two new lines with three backticks in the answer, like this:

```
put text here
```

@Alexey and @deathlessdd - Thank you both for the assistance. I did a little more tinkering and somehow got the node back up and running, though I’m not really sure how. The dashboard pulls up now and I’m showing all of my previous satellites online.

I think when I installed the node, it was via the GUI method for Windows. I believe I changed the install directory away from Program FIles to avoid administrative access issues to just C:\Storj. I’m not really sure how the APPDATA directory came to exist, but I’m wondering if my using the setup command while trying to get the node back up and running in Command Prompt created it.

I’m going to follow up when I get home and go through the steps Alexey provided to confirm the drive letter is correct, and will post the results afterwards. Again, thank you both for replying to help!

(P.S. I have my computer and the external hard drive’s power connected to a UPS, does that help protect against external drive data corruption from outages?)

1 Like

Yes, it is, if you did not specify the --config-dir with storagenode setup, see storagenode setup --help | findstr /c:"--config-dir"

Only if it’s managed (has the cable connected to the PC and you have an application to shutdown the PC in case of power outage). Non-managed UPS is useful too, if the power outage is not longer than a few minutes (maybe longer depends on UPS capacity).