How to setting web.address/port in traccar.xml for Docker

mike 3 months ago
docker run \
  --name traccar \
  --hostname traccar \
  --detach --restart unless-stopped \
  --publish 60003:8082 \
  --publish 5000-5150:5000-5150 \
  --publish 5000-5150:5000-5150/udp \
  --volume /opt/traccar/logs:/opt/traccar/logs:rw \
  --volume /opt/traccar/data:/opt/traccar/data:rw \
  --volume /opt/traccar/traccar.xml:/opt/traccar/conf/traccar.xml:ro \
  traccar/traccar:latest

setting traccar.xml as:

    <entry key='web.address'>aaa.pop.top</entry>
    <entry key='web.port'>60003</entry>

docker restart traccar

ERROR: Main method error - Address not available - BindException (... < WebServer:232 < Main:127 < *:111)
Track-trace 3 months ago

Doesnt it mean the address already is in use?

mike 3 months ago

if I remove two line below, docker restart traccar can boot up and work normal.

<entry key='web.address'>aaa.pop.top</entry>
<entry key='web.port'>60003</entry>

if I dont set web.address/web.port, the email notification with link url is 172.xx.xx.xx which is docker local network

Anton Tananaev 3 months ago

Instead of setting those two parameters, what you should set it "web.url".

mike 3 months ago

<entry key='web.url'>aaa.pop.top</entry> is work
but if set
<entry key='web.port'>60003</entry>
looks like not work, the website is waiting for long time result "Failed to fetch " before login

Anton Tananaev 3 months ago

That's an invalid URL.