+- 300 ports open

Alem 2 years 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 Tananaev 2 years ago

Probably you're using the wrong configuration.

Alem 2 years 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>
Alem 2 years ago

Sorry, did not send the service parameters.

...
ExecStart=/opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml
...
Anton Tananaev 2 years ago

The right thing is to use protocols.enable.

Alem 2 years 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 Tananaev 2 years ago

Read the official documentation.

Alem 2 years 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.

Alem 2 years ago

And it worked before.

Anton Tananaev 2 years ago

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

Alem 2 years ago

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