[SOLVED] Traccar is not starting - port conflict

Você deve verificar dois arquivos para encontrar os erros:

Este dois arquivo estão na pasta: C:\Program Files\Traccar\logs
Arquivos: "tracker-server.log" e "wrapper.log.xxxxx" (mais atualizado).

Ao abrir os dois arquivos você encontrará o erro.
Na maioria dos casos o problema é a porta que você estará utilizando.
Caso seja esse o problema, no arquivo ""wrapper.log.xxxxx" você encontrará o seguinte erro: "Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: 0.0.0.0/0.0.0.0:5005", ou seja, erro ao tentar usar a porta 5005.
O que é está porta? O que ela faz?
No windows você pode verificar isto através do programa "executar" e digitar "cmd" (para abrir o prompt de comandos), você deve executar o prompt como administrador.
Usando o comando: "netstat -a -b" , você conseguirá verificar os software que estão usando as portas do seu windows, assim, no meu caso procurei a porta em questão 5005.

Encontrei o seguinte serviço usando esta porta "[wmpnetwk.exe], UDP [::]:5005 :".

Após verificar este problemas podemos usar duas ações para resolver o problema:

  1. "Matar" o aplicativo que está usando a porta: Você pode desinstalar o software.
  2. Fazer o traccar não usar está porta (opção mais complicada).

Como um bom engenheiro, usarei a opção mais complicada e consequentimente a mais inteligente.
Para descobrir qual porta vou utilizar, tenho que saber qual rastreador tenho nos meus carros.
RASTREADOR: TK103B.

Para descobrir qual porta este rastreador utiliza, você deve abrir o arquivo: C:\Program Files\Traccar\conf\default.xml (DEVE ABRIR COMO ADMINISTRADOR, PARA QUE POSSA ALTERA-LA).

ATENÇÃO: QUALQUER MODIFICAÇÃO INDEVIDA NESTE ARQUIVO, SEU SERVIDOR NÃO IRÁ MAIS FUNCIONAR.

Após abrir o arquivo default.xml, linha: 71, verifico que meu rastreador usa a porta 5001, pois o nome do protocolo de comunicação é o mesmo do meu aparelho <entry key='gps103.port'>5001</entry>.

Assim, como não uso nenhum outro rastreador diferente, manterei apenas esta porta aberta, as outra irei usar o comando de comentário para desativar a utilização das outras portas.

<!-- PROTOCOL CONFIG -->

    <entry key='gps103.port'>5001</entry>
    <!-- 
    <entry key='tk103.port'>5002</entry>
    <entry key='gl100.port'>5003</entry>
    ... outros protocolos ...
    <entry key='sigfox.port'>5154</entry>
    <entry key='t57.port'>5155</entry>
    -->

</properties>

Assim, apenas a porta do protocolo de comunicação do meu rastreador ficará ativa, fazendo com que a porta 5005 (PORTA QUE APARECEU O PROBLEMA) fique liberada para utilização.

Após realizar esta alteração e salvar, entrei em "executar" > "serviços", localizei o serviço "traccar" e iniciei ele e o problema foi resolvido.

English

You hvcheck two files to find the errors:

This two files are in the folder: C: \ Program Files \ Traccar \ logs
Files: "tracker-server.log" and "wrapper.log.xxxxx" (most updated).

When you open the two files you will find the error.
Many cases the problem is the port u are using.
So, if u open "wrapper.log.xxxxx " you ar see the following error:" Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: 0.0.0.0/0.0.0.0:5005 ", that is, error when trying to use port 5005.

What is this door? What does do?

On windows you can check this through the "run" program and type "cmd" (to open the command prompt), you must run the prompt as administrator.

Using the command: "netstat -a -b", you will be able to verify the software that is using the ports of your windows, so in my case I looked for the port in question 5005.

I found the following service using this port "[wmpnetwk.exe], UDP [::]: 5005 *: *".

After verifying this problem we can use two choices to solve the problem:

  1. "Kill" the application that is using the port: You can uninstall the software.
  2. Traccar Do not use this door (more complicated option), so u can disable that.

As a engineer lol, I am use the most complicated and consequently the most intelligent option.

To find out which port I hv to use, I have to know which tracker device I hv in my cars.

---> TRACKER: TK103B.

To find out which port this device uses, you should open the file: C: \ Program Files \ Traccar \ conf \ default.xml (MUST OPEN AS ADMINISTRATOR, U HV CHANGED IT).

ATTENTION: ANY WRONG MODIFICATION IN THIS FILE, YOUR SERVER WILL NOT WORK.

After opening the default.xml file, line: 71, I check that my protocol device on port 5001, because the name of the communication protocol is the same as my device <entry key='gps103.port'>5001</entry>.

So, if i do not use any other different tracker, I will keep only this port open, the other I will use the comment command to disable the use of the other ports. COMANDO:

<!-- PROTOCOL CONFIG -->

    <entry key='gps103.port'>5001</entry>
    <!--
    <entry key='tk103.port'>5002</entry>
    <entry key='gl100.port'>5003</entry>
... other protocols ...
    <entry key='sigfox.port'>5154</entry>
    <entry key='t57.port'>5155</entry>
    -->

</properties>

So, only the communication protocol port of my tracker will be active, causing port 5005 (PORT THAT APPEARS THE PROBLEM) to be released for use of others softwares.

After change and save that, I went into "run"> "services", search the "traccar" service and started it and the problem was solved.

Anton Tananaev6 years ago

Appreciate the effort of sharing this information, but please next time use Markdown for proper formatting:

https://www.traccar.org/markdown/