[Tech Preview] Multinode Dashboard Binaries

No, I mean the format of the array file. Wouldn’t it look like this:

[
    {
        "api_secret": "api_secret_1",
        "id": "node_id_1",
        "name": "name_1",
        "public_address": "ip_1:port_1"
    },
	{
        "api_secret": "api_secret_2",
        "id": "node_id_2",
        "name": "name_2",
        "public_address": "ip_2:port_2"

    },
	{...}
]

Yes, some kind of. Seems I just do not understand your question. Almost all data can be represented as a json, so the meaning of comparison with tables eludes me.
The actual format for info --json is

  {
    "id": "xxx",
    "apiSecret": "yyy",
    "publicAddress": "zzz:28967",
    "name": ""
  }

So the array of such objects will looks like

[
  {
    "id": "xxx",
    "apiSecret": "yyy",
    "publicAddress": "zzz:28967",
    "name": ""
  },
  {
    "id": "xxx2",
    "apiSecret": "yyy2",
    "publicAddress": "zzz2:28968",
    "name": ""
  }
]

The question was about this description:

containing array of nodes data

It was not clear to me how this array should look like in the file.

It’s a usual json array, I hope now you have an idea how it looks like.

1 Like

Is there any future roadmap including the storing of the data in a local DB so it can avoid querying all the data live when you refresh? Or at least an in-memory cache or similar.

The roadmap is here: Storj Network Roadmap · GitHub
But I do not see something regarding multinode dashboard.
However, the Community contribution is welcome as well!

I wish I can. I have programming skills but not in Golang :sweat_smile:

I wish there was some priority on this. A tool like this is so essential if you run several nodes.

1 Like

When I add a node via a json file, I get an error message each time on the first try:

Error: node is not reachable: rpc: tcp connector failed: rpc: dial tcp IP:28967: i/o timeout

A second try, immediately after that, adds the node at once.

How your Online score is looks like for this node?
Also, if your multinode dashboard in the same network, this check requires that you router should have a hairpin NAT (be able to process requests to its external address from the local network).

A new node.

The multinode and everything does work. What I am saying is that only the first attempt to add a node fails. On the retry, the node successfully gets added.

Adding nodes is failing with invalid JSON format. I just piped the storagenode info json into a file. The json in the file looks fine.

PS E:\Management\Storj> .\storagenode.exe info --json --config-dir "C:\Program Files\Storj\Storage Node" > node1.json

PS E:\Management\Storj> .\multinode.exe add .\node1.json
2022-06-28T15:18:10.978+0100    INFO    Configuration loaded    {"Location": "C:\\Users\\Administrator\\AppData\\Roaming\\Storj\\Multinode\\config.yaml"}
Error: invalid JSON format


PS E:\Management\Storj> .\storagenode.exe version
Release build
Version: v1.56.4
Build timestamp: 02 Jun 22 10:15 BST
Git commit: 81d116de12cdcb914612b196d80f4670a59842ff


PS E:\Management\Storj> .\multinode.exe version
2022-06-28T15:21:07.258+0100    INFO    Configuration loaded    {"Location": "C:\\Users\\Administrator\\AppData\\Roaming\\Storj\\Multinode\\config.yaml"}
Release build
Version: v1.57.2
Build timestamp: 17 Jun 22 07:57 BST
Git commit: 3ede8719cc2235774117db150e07f1f51620ee7f

edit, just tried with 1.57.2 storagenode as well and also doesn’t work.
edit2:
Seems to be happening on the webui as well, but only when the base64 contains some special characters, e.g. / or +

illegal base64 data at input byte 20
wqDWJY09Y8Hs1qiEvx9l/BH3pDeXgrX26DkTCH8QvfI=

Could you post a hex dump of the first few characters of your node1.json file?

00000000: 7b22 6964 223a                           {"id":

The code expects the file to start with a ‘[’ or ‘{’ character. It prints the invalid JSON format error if it doesn’t.

I filed a ticket for the illegal base64 data at input byte 20 error. storagenode info --json incompatibie with multinode add · Issue #4949 · storj/storj · GitHub As a workaround I think the output from storagenode info (without --json) or storagenode issue-apikey should work.

image
Yeah that would be the issue then!

I just ran storagenode info until I got an output that had no special characters and put it into the webui. Which was a bit tedious for 12 nodes, but did work.

Thanks for the bug reports! I created a second issue to ignore the byte order mark multinode add fails on byte order mark · Issue #4950 · storj/storj · GitHub

1 Like

I messed around a bit.

I did a fresh install of Windows 11 and it came with Powershell 5.1. Powershell 5.1 or earlier defaults to UTF-16. You can output UTF-8 in two ways. Either set this default:

$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'

Or alternatively replace > with | out-file foo.txt -encoding utf8

But in that case you still get the byte order mark, which in that case is 0xEF 0xBB 0xBF (which is 0xFF 0xFE encoded in UTF-8). The command still fails. @clement made a change to remove this here https://review.dev.storj.io/c/storj/storj/+/8252

Powershell 7 can be installed manually and defaults to UTF-8 without BOM so there this is no longer necessary and it “just works”.

2 Likes

I am trying to add nodes to my MND, I have successfully added the windows nodes that I have.

I have other nodes on RPi’s using DOCKER. when I trying to run storagenode info --config dir /mnt/storj/storagenode I get bash: storagenode: command not found.

I don’t know where to run this command from with this setup, does anyone know?

docker exec -it <yourSNcontainername> /app/storagenode issue-apikey --config-dir config --identity-dir identity --log.output stdout
2 Likes

Awesome thanks!! That would have taken me ages :slight_smile:

Still no proper guide in Docs for Multinode Dashboard? I have to read 99 replays to understand how to set it up…

1 Like