• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

Sinusbot is blocking a random port

MarvinKlar

New Member
Hello everyone,

since I also host other services on my server, I got an issue while starting a service.
The reason seems to be, that Sinusbot is blocking a random port.

The command "sudo lsof -i -P -n | grep LISTEN" showed the following:
sinusbot 16938 hosting 13u IPv6 284296 0t0 TCP *:8087 (LISTEN) sinusbot 16938 hosting 14u IPv4 285489 0t0 TCP 127.0.0.1:35114 (LISTEN)

Where does the port 35114 (in this case) come from? Or what is this port for?

When I restarted the Sinusbot I noticed, that the port changed:
sinusbot 27443 hosting 14u IPv4 393810 0t0 TCP 127.0.0.1:44921 (LISTEN)

So, my questins is: Why is this port listening?

And even more important: How can I configure this port?

Thanks for your help!

Marvin Klar
 

flyth

is reticulating splines
Staff member
Developer
Contributor
I got an issue while starting a service
What issue did you get? :)

Where does the port 35114 (in this case) come from? Or what is this port for?
It's a random port (the bot demands a random port, the OS decides on the port) listening on localhost for proxying authenticated http requests to remote audio stations, should you listen to them. Reason behind this is that the bundled ffmpeg libraries don't come with SSL support (and that can't be bundled without problems) but some stations / services might require https. It's also being used to increase compatibility of streams.

And even more important: How can I configure this port?
You can't. It's a random port in the upper port ranges given by the OS. The same happens with every outgoing connection you open. If you need dedicated ports, use the lower ranges, as those won't be handed out to processes as random ports by the OS.

tl;dr: the bot opens a local random port which it uses by itself to connect to https servers if you stream audio and which you cannot change.
 
Top