Guide to debug my storage node, uplink, s3 gateway, satellite

As the debug port changes on every start it would be a great addition, the port could be shown in the log.
So in case it was not set in config or run command but the node needs debugging without stopping it, it would be great if I would be able to check in the logs an find a line something like this:
INFO Debug port set to: 5430

Is your debug port changing even after following the 2 steps mentioned in first post ?

I think my suggestion would be a good idea for those nodes that need debugging without stopping them first and where the debug port had not been set in the config file or run command.

You can find used ports with the command inside the container:

netstat -tunlp

(you likely will need to install net-tools package and curl)
In my case it was 7777

Yes I know, but it would be easier and more convenient if it would be shown in the logs.

It looks like I have to install curl and net-tools after every full restart.
But as it is not present first of all I have to do a apt-get update, then I have to install curl and net-tools. Then I can use the debug urls.

How can I have this already pre-installed so i don’t have to do these steps every times? Do you know a way to achieve that?

Only to make your custom image.
Perhaps it would be simpler to configure a static debug port and add it to the port mapping in your docker run command, so you may use tools from your host or even just a browser.
But please, do not expose it to the internet, you may use How to remote access the web dashboard - Storj Node Operator Docs to access this port remotely too.

Okay. But with mapping it to 127.0.0.1 I should be fine, right?

yes. In this case it will be available only locally or with ssh port-forwarding like in the guide above.

Does that mean that Storj would have to include it and could be the only one to include curl and net-tools into the official image?

I’m prefer to have as less system tools in the image as possible. Not everyone need a specific system tools. If they want to they always can fork the image and add them.

By the way, the default image includes wget, however it doesn’t include the net-tools package.

The best would be to have this on the node dashboard to see what processes are currently running.

1 Like

hello,

what is the equivalent of

in Windows GUI?
Because no docker is used.

i added only debug.addr: 127.0.0.1:5999 to config.yaml
but seems localhost:5999/mon/funcs dont show me all the process,
example i don’t see any filewalker or lazyfilewalker or usedspace process, but storagenode.log informs me that it has started and is ongoing, yet i cant see it anywhere in that debug monitoring tool, in web browser im looking (no any curl), i see many processes there but in filewalker im interested only, and it doesn’t show that to me

nerdatwork told me:
“That’s the correct way to add to config but I did that too and it didnt show the necessary information. It started showing me the debug info after adding it to the docker run command. You should reply to the thread mentioning this that you added debug.addr: 127.0.0.1:5999 to GUI’s config.yaml.”

but i cant do point 2. coz dont use any docker hmmm, anything more to do under windows GUI?

Edit: after port change from 5999 to 5998
localhost:5998/mon/funcs do show me some more process now, but still nothing about filewalker, or lazy filewalker… i will investigate this with other nodes.

The problem is that the storage node updater reads the same config so they fight for the port. You have to tell them to use different ports.

gr8 anyone know how to do it? what to change in config.yaml for the updater then?

Maybe use 6000 as port in config; I believe the updater will remain on 5999. But maybe I’m wrong. Other variant would be to use the same parameter in updater run command too, with a different port, if you use docker. In windows, I don’t know.

Yes, try to use a different port.