kar1
March 29, 2023, 6:35am
1
Hello @littleskunk @Alexey ,
I am currently doing storj-sim test network.
I reached quit far.
I followed your steps to create new storage node, but it requires node-id, api-secret and public-address.
I can get node-id but from where I could find --api-secret string API Secret of the storage node
?
Alexey
March 29, 2023, 7:49am
3
Since you use a binary, you may request it like this:
1 Like
kar1
March 29, 2023, 7:50am
4
Hello @Alexey
Then what would I get in output ?
Did I get api-secret ?
Alexey
March 29, 2023, 7:51am
5
You will get all needed info to register this node in the multinode dashboard.
1 Like
kar1
March 29, 2023, 7:52am
6
In web ui you mean to say?
@Alexey
Alexey
March 29, 2023, 7:54am
7
In CLI.
Then you can register this node in the multinode dashboard and open it on http://localhost:15002 by default.
However, you may register this node in web interface as well using the returned info.
1 Like
kar1
March 29, 2023, 7:56am
8
On which command I get api-secret in cli?
Alexey
March 29, 2023, 8:00am
9
Which I quoted above. There is no UI to request this information, only CLI.
kar1
March 29, 2023, 8:01am
10
Yes but I did not get required info in CLI
Alexey
March 29, 2023, 8:08am
11
Please provide the example output of this command.
You may also use the other one:
storagenode issue-apikey --config-dir <insert your storage node config dir here>
1 Like
kar1
March 29, 2023, 8:50am
12
I got this…
2023-03-29T14:18:37.706+0530 INFO process/tracing.go:73 Anonymized tracing enabled {"Process": "storagenode"} 2023-03-29T14:18:37.748+0530 INFO storagenode/main.go:337 Identity loaded. {"Process": "storagenode", "Node ID": "12XnFBX7y6HGHRff8N4owGzSNLuWqA8oN1RBPjgGRSfv3dm9yb4"} 2023-03-29T14:18:37.759+0530 INFO db storagenodedb/database.go:302 database does not exist {"Process": "storagenode", "database": "info"} 2023-03-29T14:18:37.759+0530 INFO db storagenodedb/database.go:302 database does not exist {"Process": "storagenode", "database": "bandwidth"} 2023-03-29T14:18:37.759+0530 INFO db storagenodedb/database.go:302 database does not exist {"Process": "storagenode", "database": "orders"} 2023-03-29T14:18:37.759+0530 INFO db storagenodedb/database.go:302 database does not exist {"Process": "storagenode", "database": "piece_expiration"} 2023-03-29T14:18:37.760+0530 INFO db storagenodedb/database.go:302 database does not exist {"Process": "storagenode", "database": "pieceinfo"} 2023-03-29T14:18:37.760+0530 INFO db storagenodedb/database.go:302 database does not exist {"Process": "storagenode", "database": "piece_spaced_used"} 2023-03-29T14:18:37.761+0530 INFO db storagenodedb/database.go:302 database does not exist {"Process": "storagenode", "database": "reputation"} 2023-03-29T14:18:37.761+0530 INFO db storagenodedb/database.go:302 database does not exist {"Process": "storagenode", "database": "storage_usage"} 2023-03-29T14:18:37.761+0530 INFO db storagenodedb/database.go:302 database does not exist {"Process": "storagenode", "database": "used_serial"} 2023-03-29T14:18:37.761+0530 INFO db storagenodedb/database.go:302 database does not exist {"Process": "storagenode", "database": "satellites"} 2023-03-29T14:18:37.762+0530 INFO db storagenodedb/database.go:302 database does not exist {"Process": "storagenode", "database": "notifications"} 2023-03-29T14:18:37.762+0530 INFO db storagenodedb/database.go:302 database does not exist {"Process": "storagenode", "database": "heldamount"} 2023-03-29T14:18:37.764+0530 INFO db storagenodedb/database.go:302 database does not exist {"Process": "storagenode", "database": "pricing"} 2023-03-29T14:18:37.764+0530 INFO db storagenodedb/database.go:302 database does not exist {"Process": "storagenode", "database": "secret"} panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x48 pc=0x140fa2cec] goroutine 1 [running]: github.com/spacemonkeygo/monkit/v3.newSpan.func1(0xc00008a130) C:/Users/Malay102/go/pkg/mod/github.com/spacemonkeygo/monkit/v3@v3.0.20-0.20230227152157-d00b379de191/ctx.go:155 +0x4a7 panic({0x1412ca740, 0x1411d2310}) C:/Program Files/Go/src/runtime/panic.go:890 +0x262 github.com/spacemonkeygo/monkit/v3.newSpan.func1(0xc0000652a0) C:/Users/Malay102/go/pkg/mod/github.com/spacemonkeygo/monkit/v3@v3.0.20-0.20230227152157-d00b379de191/ctx.go:155 +0x4a7 panic({0x1412ca740, 0x1411d2310}) C:/Program Files/Go/src/runtime/panic.go:890 +0x262 github.com/spacemonkeygo/monkit/v3.newSpan.func1(0xc0000652d0) C:/Users/Malay102/go/pkg/mod/github.com/spacemonkeygo/monkit/v3@v3.0.20-0.20230227152157-d00b379de191/ctx.go:155 +0x4a7 panic({0x1412ca740, 0x1411d2310}) C:/Program Files/Go/src/runtime/panic.go:890 +0x262 STORJ/storagenode/storagenodedb.(*apiKeysDB).Store(0xc000064f00, {0x14186aa60, 0xc0000b63c0}, {{0xdc, 0xd2, 0x40, 0xd8, 0x9d, 0x6a, 0xf3, ...}, ...}) D:/STORJ-DFS/STORJ/storagenode/storagenodedb/apikeys.go:40 +0x30c STORJ/storagenode/apikeys.(*Service).Issue(0xc0003e0bb0, {0x14186a520, 0xc00009a440}) D:/STORJ-DFS/STORJ/storagenode/apikeys/service.go:46 +0x54d main.cmdIssue(0x141fbbaf0?, {0xc000282990?, 0x1411df3e0?, 0x700598?}) D:/STORJ-DFS/STORJ/cmd/storagenode/main.go:350 +0x63e private/process.cleanup.func1.4({0x14186aa60?, 0xc0000b60a0}) D:/STORJ-DFS/private/process/exec_conf.go:377 +0x18c private/process.cleanup.func1(0x1411df3e0, {0xc0000980c0, 0x0, 0x2}) D:/STORJ-DFS/private/process/exec_conf.go:395 +0x2247 github.com/spf13/cobra.(*Command).execute(0x1411df3e0, {0xc0000980a0, 0x2, 0x2}) C:/Users/Malay102/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:852 +0xb16 github.com/spf13/cobra.(*Command).ExecuteC(0x1411de9e0) C:/Users/Malay102/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x5db github.com/spf13/cobra.(*Command).Execute(...) C:/Users/Malay102/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897 private/process.ExecWithCustomConfigAndLogger(0x1411de9e0, 0x1?, 0x14118bc80?, 0xc000058000?) D:/STORJ-DFS/private/process/exec_conf.go:92 +0x313 main.main()
On running
this
Alexey
March 29, 2023, 8:53am
13
You need to provide an absolute path to the config dir of this node.
What’s wrong with info
command?
It should output json information, include API key
Alexey
March 29, 2023, 8:56am
15
What? The absolute path?
Depending on OS.
In Linux it places everything in ~/.local/share/storj/local-network
, so for storagenodes it should be in storagenode
subfolder.
For Windows it should be in the %AppData%\Storj\local-network
directory.
1 Like
kar1
March 29, 2023, 8:59am
16
Allright I was passing
%AppData%\Storj\Storagenode
That’s why I didn’t get desired output…
Okay I got node id and api-secret but what should I input for public address??
Alexey
March 29, 2023, 9:02am
17
This is why it’s suggested to use info
instead.
1 Like
kar1
March 29, 2023, 9:03am
18
what should I input for public address??
@Alexey
kar1
March 29, 2023, 9:23am
19
@Alexey
I am getting this error
2023-03-29T14:52:08.060+0530 DEBUG process/exec_conf.go:408 Unrecoverable error {"error": "nodes: rpc: tcp connector failed: rpc: dial tcp <public-addresss>: connectex: No connection could be made because the target machine actively refused it.", "errorVerbose": "nodes: rpc: tcp connector failed: rpc: dial tcp <public-addresss>: connectex: No connection could be made because the target machine actively refused it.\n\tcommon/rpc.HybridConnector.DialContext.func1:190"}
I have inserted public address in place of <public-addresss>
Alexey
March 30, 2023, 3:19am
20
Inserted to where?
The storagenode’s address must include node’s port, not the dashboard port.
In storj-sim node’s ports are:
grep "^server.address:" ~/.local/share/storj/local-network/storagenode/**/config.yaml
/home/ubuntu/.local/share/storj/local-network/storagenode/0/config.yaml:server.address: 127.0.0.1:13000
/home/ubuntu/.local/share/storj/local-network/storagenode/1/config.yaml:server.address: 127.0.0.1:13010
/home/ubuntu/.local/share/storj/local-network/storagenode/2/config.yaml:server.address: 127.0.0.1:13020
/home/ubuntu/.local/share/storj/local-network/storagenode/3/config.yaml:server.address: 127.0.0.1:13030
/home/ubuntu/.local/share/storj/local-network/storagenode/4/config.yaml:server.address: 127.0.0.1:13040
/home/ubuntu/.local/share/storj/local-network/storagenode/5/config.yaml:server.address: 127.0.0.1:13050
/home/ubuntu/.local/share/storj/local-network/storagenode/6/config.yaml:server.address: 127.0.0.1:13060
/home/ubuntu/.local/share/storj/local-network/storagenode/7/config.yaml:server.address: 127.0.0.1:13070
/home/ubuntu/.local/share/storj/local-network/storagenode/8/config.yaml:server.address: 127.0.0.1:13080
/home/ubuntu/.local/share/storj/local-network/storagenode/9/config.yaml:server.address: 127.0.0.1:13090
for Windows PowerShell:
sls "^server.address:" $env:AppData\Storj\local-network\storagenode\**\config.yaml
1 Like