RadOD Posted February 24, 2020 Share Posted February 24, 2020 After a fresh install of the traccar docker I get an error that the command failed. Unraid shows it created the docker, but attempting to start it fails. This is the error on install. I'm not sure how to interpret and further debug this error: root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='traccar' --net='bridge' -e TZ="America/Chicago" -e HOST_OS="Unraid" -p '8082:8082/tcp' -p '5000-5150:5000-5150/tcp' -p '5000-5150:5000-5150/udp' -v '/mnt/user/appdata/traccar/logs':'/opt/traccar/logs':'rw' -v '/mnt/user/appdata/traccar/traccar.xml':'/opt/traccar/conf/traccar.xml':'rw' --restart always --hostname traccar 'traccar/traccar' b6252155b590c414bb1d755c395e0daf5835b6bb4ade7d0496cb3caafe8f85e2 /usr/bin/docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:449: container init caused "rootfs_linux.go:58: mounting \"/mnt/user/appdata/traccar/traccar.xml\" to rootfs \"/var/lib/docker/btrfs/subvolumes/e250d9ea7f9fcb448c569c00daa8d9cba97937dddef0f0b9b608ee98fd5f6b86\" at \"/var/lib/docker/btrfs/subvolumes/e250d9ea7f9fcb448c569c00daa8d9cba97937dddef0f0b9b608ee98fd5f6b86/opt/traccar/conf/traccar.xml\" caused \"not a directory\""": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type. The command failed. I had it installed previously with no problems - but it used way more ports than I needed so I tried editing the container changing only the host port 1 and 2 from 5000-5150 to 5030-5035 which gave this error: root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='traccar' --net='bridge' -e TZ="America/Chicago" -e HOST_OS="Unraid" -p '8083:8082/tcp' -p '5030:5000-5150/tcp' -p '5030:5000-5150/udp' -v '/mnt/user/appdata/traccar/logs/':'/opt/traccar/logs':'rw' -v 'https://raw.githubusercontent.com/traccar/traccar/master/setup/traccar.xml':'/opt/traccar/conf/traccar.xml':'rw' --restart always --hostname traccar 'traccar/traccar' /usr/bin/docker: invalid publish opts format (should be name=value but got '8083:8082/tcp'). See '/usr/bin/docker run --help'. So I deleted the docker, under advanced I deleted to orphan image and I renamed the folder in appdata. If anyone can tell me in general what is going on, I don't really know what is going wrong or where to start with these errors. Quote Link to comment
Squid Posted February 24, 2020 Share Posted February 24, 2020 You're trying to assign a range of ports to a single port. Map each individually. And it's also complaining that you're attempting to map a file instead of a path (traccar.xml) 1 Quote Link to comment
RadOD Posted February 24, 2020 Author Share Posted February 24, 2020 But everything is default -- so I could not see how I could be doing that! Since I was merely adjusting editing the port range I did not pay much attention to "Link to traccar.xml: https://raw.githubusercontent.com/traccar/traccar/master/setup/traccar.xml Add it to your host path before starting the container." Turn out that even if you have created traccar.xml, docker installation modifies its files including deleting or moving the traccar.xml file. It looks as though you need to recreate traccar.xml each and every time you edit your docker. And since traccar.xml is a configuration file, my guess is editing and restarting the docker with a new file may well wipe out any configuration you had. Back-up! Quote Link to comment
Squid Posted February 24, 2020 Share Posted February 24, 2020 2 minutes ago, RadOD said: But everything is default No it's not. This is a snip from a completely default install of traccar -p '5000-5150:5000-5150/tcp' -p '5000-5150:5000-5150/udp' Your output is -p '5030:5000-5150/tcp' -p '5030:5000-5150/udp' Default maps 5000-5150 to 5000-5150 You're trying to map 5030 to 5000-5150 (a single port to a range of ports) You did this when you 6 hours ago, RadOD said: so I tried editing the container changing only the host port 1 and 2 from 5000-5150 to 5030-5035 which gave this error: If you only need the one port (5030), then you will also have to change the container mapping (which may require you to delete that mapping and add another one) to only reference a single port instead of the range. Quote Link to comment
RadOD Posted March 20, 2020 Author Share Posted March 20, 2020 On 2/24/2020 at 3:16 PM, Squid said: No it's not. This is a snip from a completely default install of traccar -p '5000-5150:5000-5150/tcp' -p '5000-5150:5000-5150/udp' I guess what I should have said was everything else was default. I did not realize that I could not edit the ports and just restart a container. In the end I was unable to even delete and rebuild with altered ports. I have not yet taken the time to learn how this docker works internally but I get what you are saying now. Thanks for all the time you take responding to those of us 'learning the hard way'. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.