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

mikea month 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-tracea month ago

Doesnt it mean the address already is in use?

mikea month 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 Tananaeva month ago

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

mikea month 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 Tananaeva month ago

That's an invalid URL.