+- 300 ports open

Alema year ago

Hello,

for reasons I do not know, traccar (v 6.2, raspberry pi 4, DB: postgresql) opens +- 300 ports (tcp/udp) despite having configured only 2 ports.
(5005 an 5055). In my case it is a new behavior. The versions before opened only the 2 ports.
I am using only traccar.xml, no default.xml in the conf folder.
Do I miss something?
How can I limit the ports to be used?

Great program!

Anton Tananaeva year ago

Probably you're using the wrong configuration.

Alema year ago

What do you mean with wrong configuration?
Are there more ways to open (or not) the ports?

...
    <entry key='t55.port'>5005</entry>
    <entry key='osmand.port'>5055</entry>
</properties>
Alema year ago

Sorry, did not send the service parameters.

...
ExecStart=/opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml
...
Anton Tananaeva year ago

The right thing is to use protocols.enable.

Alema year ago

Thanks, Anton. But where do I find this setting?
I did not find anything close to "protocols.enable".

In this post (https://www.traccar.org/forums/topic/how-can-i-disable-a-protocol/) you said to remove the lines of protocols not needed. So I did. Both, default.xml and traccar.xml have the same two ports I need (see above).

Anton Tananaeva year ago

Read the official documentation.

Alema year ago

Thanks. I have found it.
"List of protocols to enable. If not specified, Traccar enabled all protocols that have port numbers listed. The value..."

Still do not understand. I have only 2 protocols listed, I deleted all other protocols. There should be only 2 protocols enabled, as stated in the documentation ("...that have port number listed."). Why should I need the protocol.enable?

But yes, it worked. I added the value

<entry key='protocols.enable'>t55,osmand</entry>

to the traccar.xml and all other protocols were disabled.

But I would like to understand why all other ports where enabled despite of having eliminated all other protocol lines, as stated in the documentation.

Alema year ago

And it worked before.

Anton Tananaeva year ago

Default configuration is now hardcoded. You cannot mess with it.

Alema year ago

Thank you, Anton.
Again, it's a great program!