Don’t I need to run the installer or smthing to configure storagenode first ?
Indeed you should run storagenode with the setup command with the appropriate args for your install. Without arguments the default is to create the config at $HOME/.local/share/storj/storagenode/config.yaml
,
look for the identity information in $HOME/.local/share/storj/identity/storagenode/
and store files at $HOME/.local/share/storj/storagenode/storage/
I personally keep the default locations for the config and identity and customize the storage.path in the config file once it has been created (as well as other settings). I also use a dedicated storj user and group to run the storagenode.
These are the config options I use:
# ensures console is accessible from your network on port 14002
console.address: 0.0.0.0:14002
# address and port to find your server
contact.external-address: "node.wibble.com:28967"
# ensure the log directory is owned by the user running the storagenode
log.output: "/var/log/storj/node.log"
# the email address used by storj to contact you with updates etc.
operator.email: "user@wibble.com"
#only if you opt in to zksync
operator.wallet-features: ["zksync"]
operator.wallet: "<wallet string starting 0x>"
# the port used for storage access, you should forward traffic on both UDP and TCP from contact.external-address to this port
server.address: :28967
storage.path: /mnt/storj/storagenode/storage
storage.allocated-disk-space: 750 GB
To avoid a warning about not being able to increase UDP buffer size I also the the following tunable in TrueNAS itself:
kern.ipc.maxsockbuf 30146560 SYSCTL
./storagenode help
StorageNode
Usage:
storagenode [command]
Available Commands:
config Edit config files
dashboard Display a dashboard
diag Diagnostic Tool support
exit-satellite Initiate graceful exit
exit-status Display graceful exit status
help Help about any command
issue-apikey Issue apikey for mnd
run Run the storagenode
setup Create config files
version output the version's build information, if any
Flags:
--color use color in user interface
--config-dir string main directory for storagenode configuration (default "/home/pi/.local/share/storj/storagenode")
--db.conn_max_lifetime duration Maximum Database Connection Lifetime, -1ns means the stdlib default (default 30m0s)
--db.max_idle_conns int Maximum Amount of Idle Database connections, -1 means the stdlib default (default 1)
--db.max_open_conns int Maximum Amount of Open Database connections, -1 means the stdlib default (default 5)
--debug.addr string address to listen on for debug endpoints (default "127.0.0.1:0")
--debug.trace-out string If set, a path to write a process trace SVG to
--defaults string determines which set of configuration defaults to use. can either be 'dev' or 'release' (default "release")
-h, --help help for storagenode
--identity-dir string main directory for storagenode identity credentials (default "/home/pi/.local/share/storj/identity/storagenode")
--log.caller if true, log function filename and line number
--log.development if true, set logging to development mode
--log.encoding string configures log encoding. can either be 'console', 'json', or 'pretty'.
--log.level Level the minimum log level to log (default info)
--log.output string can be stdout, stderr, or a filename (default "stderr")
--log.stack if true, log stack traces
--metrics.addr string address(es) to send telemetry to (comma-separated) (default "collectora.storj.io:9000")
--metrics.app string application name for telemetry identification (default "storagenode")
--metrics.app-suffix string application suffix (default "-release")
--metrics.instance-prefix string instance id prefix
--metrics.interval duration how frequently to send up telemetry (default 1m0s)
--tracing.agent-addr string address for jaeger agent (default "agent.tracing.datasci.storj.io:5775")
--tracing.app string application name for tracing identification (default "storagenode")
--tracing.app-suffix string application suffix (default "-release")
--tracing.buffer-size int buffer size for collector batch packet size
--tracing.enabled whether tracing collector is enabled
--tracing.interval duration how frequently to flush traces to tracing agent (default 0s)
--tracing.queue-size int buffer size for collector queue size
--tracing.sample float how frequent to sample traces
Hi @hobitsbat -
Something that you may find useful is some work that was done around FreeNAS integration: GitHub - storj-thirdparty/freenas-storagenode-app: FreeNAS application providing packaging to Storj storagenode tools
Best of luck!
-K
Thank you for all the replies, I did see the github work that was done, but it does not work with V3 any more
Just got back from travels. Will try to use binaries directly.
I will post the outcome of this later Today.
Okey Getting somewhere.
My node is up and running, happy times.
Looking at logs now And I was getting a lot of this:
2021-06-05T11:54:37.207+0100 ERROR contact:service ping satellite failed {“Satellite ID”: “12rfG3sh9NCWiX3ivPjq2HtdLmbqCrvHVEzJubnzFzosMuawymB”, “attempts”: 1
Should I be worried ?
P.S. The Node seems to be up and running.
Yes, you should. Your node is not reachable from outside, i.e. it’s offline.
Please, use this check-list to troubleshoot:
An interesting thing is that I just install pm2 to auto launch the app and after full reboot the errors are gone. I won’t cycle the logs, not yet at least just to make sure everything is up and running, but this far everything
I used my Freenas system as well, didn’t know there were plugins/packages for it though. I just set up an ubuntu server VM and did the normal storj install within that, nothing special needed. Would be great if there was an official plugin to do it all though!
Still making my update scripts production ready. Will have them ready over the next week - you won’t get blocked before then…
Just about completed my update script that downloads updates when they are ready after a re-thought on how it should work (it has all the intelligence now). Now need to update my restart script that can now be stupid - it will only need to check if a file is different.
If you’re using PM2 then you’ll need to re-implement the more stupid restart script I’m working on…
We have the updater binary for FreeBSD as well. Would you like to give it a try? You would be the first guinea pig. There is a good chance that the updater will not work and if so I don’t think we are going to fix that any time soon. However, if we are lucky it might work just fine. So we should at least try it.
Then we can move it to a separate thread and make it a manual.
I haven’t seen any feedback on the updater binary. If nobody tested it i m willing to try and report on it.
thanks !
I have uploaded a test binary here: Release v1.43.0-rc · storj/storj · GitHub
v1.43.0-rc
is identical with v1.43.1
. The rollout hasn’t finished yet. If you run the updater it might print out that an update is ongoing but your node needs to stay on the old version for a bit more time.
The updater might fail with updating itself because in the new release the updater binary for your OS is missing. If that happens just let me know and I can upload the binary to the new release as well. Before I do that I would like to know if you even get that far.
Thanks for the answer and the binary.
It seems promising, as predicted it seems the stop as the v1.43.1 doesn’t have the updater available.
[storj@StorjJail ~]$ ./storagenode-updater run --identity-dir /mnt/Storj/identity/storagenode --binary-location /opt/storagenode/bin/storagenode --service-name storagenode
2021-11-28T05:59:32.793-0800 INFO Invalid configuration file value for key {"Key": "log.encoding"}
2021-11-28T05:59:32.793-0800 INFO Running on version {"Service": "storagenode-updater", "Version": "v1.43.0-rc"}
2021-11-28T05:59:32.793-0800 INFO Downloading versions. {"Server Address": "https://version.storj.io"}
2021-11-28T05:59:33.023-0800 INFO Current binary version {"Service": "storagenode", "Version": "v1.43.1"}
2021-11-28T05:59:33.023-0800 INFO Version is up to date {"Service": "storagenode"}
2021-11-28T05:59:33.035-0800 INFO Current binary version {"Service": "storagenode-updater", "Version": "v1.43.0-rc"}
2021-11-28T05:59:33.035-0800 INFO New version is being rolled out but hasn't made it to this node yet {"Service": "storagenode-updater"}
^C2021-11-28T05:59:56.842-0800 INFO Got a signal from the OS: "interrupt"
Awesome. That is basically the best we could hope for because that way you also tested that the updater is following the rollout cursor. 100% cursor is now pushed. Within 15 minutes the updater should retry. Next message I expect to see is an complain around the missing updater binary in the new release. If that happens just let me know and I will upload it.
Spot on the complain arrived, if you can upload the 1.43.1 will see how it goes.
[storj@StorjJail ~]$ ./storagenode-updater run --identity-dir /mnt/Storj/identity/storagenode --binary-location /opt/storagenode/bin/storagenode --service-name storagenode --log.development --log.level debug
2021-11-28T07:46:31.814-0800 DEBUG Anonymized tracing disabled
2021-11-28T07:46:31.814-0800 DEBUG debug server listening on 127.0.0.1:18166
2021-11-28T07:46:31.815-0800 INFO Running on version {"Service": "storagenode-updater", "Version": "v1.43.0-rc"}
2021-11-28T07:46:31.815-0800 INFO Downloading versions. {"Server Address": "https://version.storj.io"}
2021-11-28T07:46:32.015-0800 INFO Current binary version {"Service": "storagenode", "Version": "v1.43.1"}
2021-11-28T07:46:32.015-0800 INFO Version is up to date {"Service": "storagenode"}
2021-11-28T07:46:32.032-0800 INFO Current binary version {"Service": "storagenode-updater", "Version": "v1.43.0-rc"}
2021-11-28T07:46:32.032-0800 INFO Download started. {"From": "https://github.com/storj/storj/releases/download/v1.43.1/storagenode-updater_freebsd_amd64.zip", "To": "/tmp/storagenode-updater_freebsd_amd64.3998979328.zip"}
2021-11-28T07:46:32.181-0800 ERROR Error updating service. {"Service": "storagenode-updater", "error": "bad status: 404 Not Found", "errorVerbose": "bad status: 404 Not Found\n\tmain.downloadArchive:78\n\tmain.downloadBinary:58\n\tmain.update:39\n\tmain.loopFunc:31\n\tstorj.io/common/sync2.(*Cycle).Run:92\n\tmain.cmdRun:128\n\tstorj.io/private/process.cleanup.func1.4:363\n\tstorj.io/private/process.cleanup.func1:381\n\tgithub.com/spf13/cobra.(*Command).execute:852\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:960\n\tgithub.com/spf13/cobra.(*Command).Execute:897\n\tstorj.io/private/process.ExecWithCustomConfig:88\n\tstorj.io/private/process.Exec:65\n\tmain.main:11\n\truntime.main:255"}
I have uploaded the binary.
it seems it is working as expected !
2021-11-28T08:01:31.821-0800 INFO Downloading versions. {"Server Address": "https://version.storj.io"}
2021-11-28T08:01:32.003-0800 INFO Current binary version {"Service": "storagenode", "Version": "v1.43.1"}
2021-11-28T08:01:32.003-0800 INFO Version is up to date {"Service": "storagenode"}
2021-11-28T08:01:32.014-0800 INFO Current binary version {"Service": "storagenode-updater", "Version": "v1.43.0-rc"}
2021-11-28T08:01:32.015-0800 INFO Download started. {"From": "https://github.com/storj/storj/releases/download/v1.43.1/storagenode-updater_freebsd_amd64.zip", "To": "/tmp/storagenode-updater_freebsd_amd64.3294963290.zip"}
2021-11-28T08:01:33.836-0800 INFO Download finished. {"From": "https://github.com/storj/storj/releases/download/v1.43.1/storagenode-updater_freebsd_amd64.zip", "To": "/tmp/storagenode-updater_freebsd_amd64.3294963290.zip"}
2021-11-28T08:01:33.860-0800 INFO Restarting service. {"Service": "storagenode-updater"}
2021-11-28T08:01:33.861-0800 INFO Service restarted successfully. {"Service": "storagenode-updater"}
2021-11-28T08:16:31.832-0800 INFO Downloading versions. {"Server Address": "https://version.storj.io"}
2021-11-28T08:16:32.014-0800 INFO Current binary version {"Service": "storagenode", "Version": "v1.43.1"}
2021-11-28T08:16:32.014-0800 INFO Version is up to date {"Service": "storagenode"}
2021-11-28T08:16:32.026-0800 INFO Current binary version {"Service": "storagenode-updater", "Version": "v1.43.1"}
2021-11-28T08:16:32.026-0800 INFO Version is up to date {"Service": "storagenode-updater"}
2021-11-28T08:31:31.825-0800 INFO Downloading versions. {"Server Address": "https://version.storj.io"}
2021-11-28T08:31:32.011-0800 INFO Current binary version {"Service": "storagenode", "Version": "v1.43.1"}
2021-11-28T08:31:32.011-0800 INFO Version is up to date {"Service": "storagenode"}
2021-11-28T08:31:32.026-0800 INFO Current binary version {"Service": "storagenode-updater", "Version": "v1.43.1"}
2021-11-28T08:31:32.026-0800 INFO Version is up to date {"Service": "storagenode-updater"}
2021-11-28T08:46:31.838-0800 INFO Downloading versions. {"Server Address": "https://version.storj.io"}
2021-11-28T08:46:32.042-0800 INFO Current binary version {"Service": "storagenode", "Version": "v1.43.1"}
2021-11-28T08:46:32.042-0800 INFO Version is up to date {"Service": "storagenode"}
2021-11-28T08:46:32.057-0800 INFO Current binary version {"Service": "storagenode-updater", "Version": "v1.43.1"}
2021-11-28T08:46:32.057-0800 INFO Version is up to date {"Service": "storagenode-updater"}