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 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.