addon-traccar icon indicating copy to clipboard operation
addon-traccar copied to clipboard

Can we update to latest version 6.5

Open Rowleys opened this issue 1 year ago • 63 comments

Hi. Is there anyway that we can update manually to the lastest version of traccar.

Thanks

Rowleys avatar Nov 25 '24 19:11 Rowleys

You can do a fork and edit the dockerfile like this: https://github.com/hassio-addons/addon-traccar/pull/283/files

LarsNorgaard avatar Nov 25 '24 21:11 LarsNorgaard

So if I edit the file . traccar/Dockerfile ARG TRACCAR_VERSION="v6.5"

will I need to do an new install or will it update ?

Rowleys avatar Nov 25 '24 22:11 Rowleys

Ohh I thought it would be as simple as that. I see the docker file already has v6.5 in it, but the server build says it's version 5.12?

LarsNorgaard avatar Nov 25 '24 23:11 LarsNorgaard

I dont know then. Will the owner not make a update ?

Rowleys avatar Nov 26 '24 17:11 Rowleys

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

github-actions[bot] avatar Dec 27 '24 08:12 github-actions[bot]

@frenck is this add-on still supported? Can we expect update or should we fork it? The coming google timeline EoL makes the topic quite relevant ;)

ivdimitro avatar Jan 03 '25 00:01 ivdimitro

i would also love to see this happen. I know that the Traccar author has an official Docker image (just not specifically for home assistant) here: https://www.traccar.org/docker/

If i understood how all this works i would do it, but it's currently beyond my ken.

petep0p avatar Jan 04 '25 04:01 petep0p

latest version is now 6.6

https://www.traccar.org/blog/traccar-6-6/

Notable changes in this release include: Managers can now send announcements Fixes for multiline SMS notifications Early and late computed attributes Improvements to user session security Support for custom navigation links Enhanced speed color scheme Collapsible settings and reports drawer Improved device card UI Event report filtering by alarm type Chart report enhancements There are no new protocol ports, but we have added support for some new device models and improved support for existing devices.

martinhoess avatar Jan 12 '25 20:01 martinhoess

it looks like there is a pull request in the queue that is asking to update from 6.5 to 6.6...

petep0p avatar Jan 16 '25 00:01 petep0p

Ohh I thought it would be as simple as that. I see the docker file already has v6.5 in it, but the server build says it's version 5.12?

Other than v6.6 just being released a few days ago. It needs a new release built. ie https://github.com/hassio-addons/addon-traccar/releases only shows v0.25.0 done back Feb 2024.

@frenck, the renovate bot appears to correctly updating the docker file to get the later version of traccar v6.6. however the last action i see ran is this for v.6.5, and it only updated the Edge repo - https://github.com/hassio-addons/addon-traccar/actions/runs/11793092549/job/32847993533

Tried the Edge repo version of v6.5, and it crashes, fails to start. I assume this is why it hasnt proceeded from edge

DanielNagy avatar Jan 16 '25 23:01 DanielNagy

Fyi - this is the addon logs i get from the Edge Traccar, not very helpful debug log.

-----------------------------------------------------------
 Add-on: Traccar
 Modern GPS Tracking Platform
-----------------------------------------------------------
 Add-on version: ff8297e
 You are running the latest version of this add-on.
 System: Home Assistant OS 14.1  (amd64 / qemux86-64)
 Home Assistant Core: 2025.1.2
 Home Assistant Supervisor: 2024.12.3
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
Log level is set to DEBUG
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/mysql.sh
[11:15:34] DEBUG: Requested API resource: http://supervisor/services/mysql
[11:15:34] DEBUG: Request method: GET
[11:15:34] DEBUG: Request data: {}
[11:15:34] DEBUG: API HTTP Response code: 200
[11:15:34] DEBUG: API Response: {"result":"ok","data":{"host":"core-mariadb","port":3306,"username":"service","password":"xxx","addon":"core_mariadb"}}
cont-init: info: /etc/cont-init.d/mysql.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
cont-init: info: running /etc/cont-init.d/traccar.sh
cont-init: info: /etc/cont-init.d/traccar.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun traccar (no readiness notification)
[11:15:34] INFO: Starting Traccar server...
s6-rc: info: service legacy-services successfully started
[11:15:36] WARNING: Traccar crashed, halting add-on
[11:15:36] INFO: Traccar stopped, restarting...
s6-rc: info: service legacy-services: stopping
[11:15:36] INFO: NGINX stopped, restarting...
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

DanielNagy avatar Jan 17 '25 00:01 DanielNagy

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

github-actions[bot] avatar Feb 16 '25 08:02 github-actions[bot]

not stale

martinhoess avatar Feb 16 '25 11:02 martinhoess

yes, i am also still anxiously awaiting the help of someone much smarter than me....

petep0p avatar Mar 06 '25 19:03 petep0p

Signing up for the v6.6 bump!

jrb80 avatar Apr 05 '25 18:04 jrb80

hey guys, have tried to generate my own image based on dockerfile but was not able to get it running as a addon ... starting the image on HA manualy with portainer failes ... would be great if @frenck can have a look into this ... thanks

BreitiDE avatar Apr 16 '25 10:04 BreitiDE

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

github-actions[bot] avatar May 17 '25 08:05 github-actions[bot]

not stale

martinhoess avatar May 17 '25 08:05 martinhoess

It is easy to update traccar jar inside the container without building a new add-on for HA.

Download zip file from Traccar home page: https://www.traccar.org/manual-installation/

Copy the file to your HA installation (I have Samba add-on, so I copied the file to \\<samba ip>\addon_configs\a0d7b954_traccar

Sign into a SSH session of your HA and then (make sure traccar add-on is running)

docker container exec -ti addon_a0d7b954_traccar bash
apk add openjdk17-jre-headless
cd /opt/traccar
unzip -o /config/traccar-other-6.7.1.zip
exit
docker ps -a

Get the docker container id for traccar add-on

docker commit <container-id> ghcr.io/hassio-addons/traccar/amd64
docker rmi ghcr.io/hassio-addons/traccar/amd64:0.25.0 -f
docker image tag ghcr.io/hassio-addons/traccar/amd64 ghcr.io/hassio-addons/traccar/amd64:0.25.0

Restart add-on in HA

sheckandar avatar May 30 '25 01:05 sheckandar

@sheckandar i was excited to see this and gave it a try - however, i hit a snag. the only thing i changed was "amd64" to "aarch64" to match all the docker containers on my home assistant green, but the traccar server just continually crashes on start-up (without saying why) after doing all this. would the architecture flag change be causing the crash, do you think? if i entered it all as you wrote it would it work on a home assistant green?

petep0p avatar Jun 03 '25 07:06 petep0p

@sheckandar i was excited to see this and gave it a try - however, i hit a snag. the only thing i changed was "amd64" to "aarch64" to match all the docker containers on my home assistant green, but the traccar server just continually crashes on start-up (without saying why) after doing all this. would the architecture flag change be causing the crash, do you think? if i entered it all as you wrote it would it work on a home assistant green?

  1. Did all the steps complete without errors ?
  2. What's in the traccar add-on log after it crashes ? Please post it, if possible.

If you execute docker image list, it will tell you the proper image name. If the image name ends with aarch64 then that's fine.

Edit: Another possibility is that you made a commit with a wrong container id.

sheckandar avatar Jun 03 '25 07:06 sheckandar

  1. Did all the steps complete without errors ?

yes, everything succeeded. no errors.

  1. What's in the traccar add-on log after it crashes ? Please post it, if possible.>

it really wasn't very informative:

Image

If you execute docker image list, it will tell you the proper image name. If the image name ends with aarch64 then that's fine.

i triple checked with that command as well, and, yes, everything on my system ends in aarch64

Edit: Another possibility is that you made a commit with a wrong container id.

i am positive i used the correct ID, and the traccar add-on was the only one that showed any changes.

i did use the newest version, which was 6.7.2...

petep0p avatar Jun 03 '25 08:06 petep0p

@sheckandar can I ask, just to make sure I understand the steps you posted? you basically are doing:

  1. (unzip -o) clobbering everything in /opt/traccar/ within the add-on docker container with the contents of the zip downloaded from the traccar website.
  2. (docker commit) create a new docker image from the now modified container
  3. (docker rmi a.k.a. docker image rm) removing the old traccar image
  4. (docker image tag) tagging the newly created image with the version number tag from the old traccar image, so that HA doesn't think there's a mismatch with what's available on the add-on store.

is that the gist of what's happening?

one question: is it necessary to update the openjdk to v17, or would it work the same leaving it at v11 as it is in the current add-on? Traccar calls out the minimum Java as v11, so it should work with what's there already.... Not sure, just trying to figure out what might be causing my issue.

petep0p avatar Jun 03 '25 22:06 petep0p

(unzip -o) clobbering everything in /opt/traccar/ within the add-on docker container with the contents of the zip downloaded from the traccar website.
(docker commit) create a new docker image from the now modified container
(docker rmi a.k.a. docker image rm) removing the old traccar image
(docker image tag) tagging the newly created image with the version number tag from the old traccar image, so that HA doesn't think there's a mismatch with what's available on the add-on store.

That is correct

one question: is it necessary to update the openjdk to v17, or would it work the same leaving it at v11 as it is in the current add-on? Traccar calls out the minimum Java as v11, so it should work with what's there already.... Not sure, just trying to figure out what might be causing my issue.

It was necessary on my system. Even though Traccar is supposed to work with version 11, I got an error about a class version mismatch

Error: LinkageError occurred while loading main class org.traccar.Main
        java.lang.UnsupportedClassVersionError: org/traccar/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

I tested with version 6.7.2 and it worked fine on my system I think it's best to revert all the changes on your system and start over

  1. Save all configs for your traccar add-on
  2. Backup traccar database
  3. Uninstall the add-on (leave the data for the add-on)
  4. Then run docker image list
  5. If there are images for the traccar add-on with a tag <none>, delete those by running docker image rm <image-id>. Be carefull to select the right id
  6. Install the add-on again and start it (It should start now. If it doesn't, something else is wrong)
docker container exec -ti addon_a0d7b954_traccar bash
apk add openjdk17-jre-headless
apk add unzip
cd /opt/traccar
unzip -o /config/traccar-other-6.7.2.zip 
  1. Do not exit from the container yet. Now run java -jar tracker-server.jar /etc/traccar/hassio.xml
  2. Post the output of the last command
  3. If the traccar server starts the exit from the container and commit new changes.

sheckandar avatar Jun 03 '25 23:06 sheckandar

ok, it failed again, but this time the output was more informative:

root@a0d7b954-traccar:/opt/traccar$ java -jar tracker-server.jar /etc/traccar/hassio.xml 
2025-06-03 17:16:50  INFO: Operating system name: Linux version: 6.12.23-haos architecture: aarch64
2025-06-03 17:16:50  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Alpine version: 17.0.14+7-alpine-r0
2025-06-03 17:16:50  INFO: Memory limit heap: 982mb non-heap: 0mb
2025-06-03 17:16:50  INFO: Character encoding: UTF-8
2025-06-03 17:16:50  INFO: Version: 6.7.2
2025-06-03 17:16:50  INFO: Starting server...
2025-06-03 17:16:52  INFO: HikariPool-1 - Starting...
2025-06-03 17:16:54  INFO: HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@b273a59
2025-06-03 17:16:54  INFO: HikariPool-1 - Start completed.
2025-06-03 17:16:55  INFO: Clearing database change log checksums
2025-06-03 17:16:56  INFO: Successfully acquired change log lock
2025-06-03 17:16:56  INFO: Successfully released change log lock
2025-06-03 17:17:14  INFO: Reading from traccar.DATABASECHANGELOG
2025-06-03 17:17:17  INFO: Reading from traccar.DATABASECHANGELOG
2025-06-03 17:17:18  INFO: Successfully acquired change log lock
2025-06-03 17:17:18  INFO: Using deploymentId: 8996238581
2025-06-03 17:17:18  INFO: Reading from traccar.DATABASECHANGELOG
Running Changeset: changelog-6.2::changelog-6.2::author
2025-06-03 17:17:19  INFO: Column tc_servers.twelvehourformat dropped
2025-06-03 17:17:19  INFO: Column tc_users.twelvehourformat dropped
2025-06-03 17:17:19  INFO: Columns priority(INT) added to tc_attributes
2025-06-03 17:17:19  INFO: ChangeSet changelog-6.2::changelog-6.2::author ran successfully in 165ms
Running Changeset: changelog-6.3::changelog-6.3-old::author
2025-06-03 17:17:19  INFO: Marking ChangeSet: "changelog-6.3::changelog-6.3-old::author" as ran despite precondition failure due to onFail='MARK_RAN': 
          schema/changelog-master.xml : Foreign Key fk_event_deviceid does not exist

Running Changeset: changelog-6.3::changelog-6.3-new::author
2025-06-03 17:17:21  INFO: Foreign key fk_events_deviceid dropped
2025-06-03 17:17:21  INFO: Foreign key fk_positions_deviceid dropped
2025-06-03 17:17:21  INFO: ChangeSet changelog-6.3::changelog-6.3-new::author ran successfully in 1597ms
Running Changeset: changelog-6.6::changelog-6.6::author
2025-06-03 17:17:21  INFO: Columns description(VARCHAR(4000)) added to tc_notifications
2025-06-03 17:17:21  INFO: ChangeSet changelog-6.6::changelog-6.6::author ran successfully in 49ms
Running Changeset: changelog-6.7.0::changelog-6.7.0::author
2025-06-03 17:17:21  WARN: Name 'PK_TC_ACTIONS' ignored for PRIMARY key.
2025-06-03 17:17:21  INFO: Table tc_actions created
2025-06-03 17:17:21  INFO: ChangeSet changelog-6.7.0::changelog-6.7.0::author ran successfully in 335ms
2025-06-03 17:17:21  INFO: UPDATE SUMMARY
2025-06-03 17:17:21  INFO: Run:                          5
2025-06-03 17:17:21  INFO: Previously run:              46
2025-06-03 17:17:21  INFO: Filtered out:                 0
2025-06-03 17:17:21  INFO: -------------------------------
2025-06-03 17:17:21  INFO: Total change sets:           51


UPDATE SUMMARY
Run:                          5
Previously run:              46
Filtered out:                 0
-------------------------------
Total change sets:           51

2025-06-03 17:17:21  INFO: Update summary generated
2025-06-03 17:17:21  INFO: Update command completed successfully.
Liquibase: Update has been successful. Rows affected: 5
2025-06-03 17:17:21  INFO: Successfully released change log lock
2025-06-03 17:17:21  INFO: Command execution complete
2025-06-03 17:17:22  WARN: No systemd support - Unable to load library 'systemd':
Error loading shared library libsystemd.so: No such file or directory
Error loading shared library libsystemd.so: No such file or directory
Native library (linux-aarch64/libsystemd.so) not found in resource path (tracker-server.jar) - UnsatisfiedLinkError (... < TaskHealthCheck:59 < <gener:-1 < *:-1 < ... < ScheduleManager:55 < ... < *:54 < Main:127 < ...)
2025-06-03 17:17:28  WARN: Port disabled due to conflict - Address in use - BindException (...)
2025-06-03 17:17:28  WARN: Port disabled due to conflict - Address in use - BindException (...)
2025-06-03 17:17:28  WARN: Port disabled due to conflict - Address in use - BindException (... < WrapperOutboundHandler:38 < ...)
2025-06-03 17:17:29  INFO: jetty-11.0.25; built: 2025-03-13T00:15:57.301Z; git: a2e9fae3ad8320f2a713d4fa29bba356a99d1295; jvm 17.0.14+7-alpine-r0
2025-06-03 17:17:30 ERROR: Main method error - Address in use - BindException (... < WebServer:226 < Main:127 < *:111)

~~if i'm reading that right, it's missing aarch64 support. but there is a build on traccar for that architecture, but i don't really get how it's set up. It's not a whole filesystem like this zip that was downloaded.~~ nvm, it says that in the working version as well. i don't really understand that error.

petep0p avatar Jun 04 '25 00:06 petep0p

Those errors are fine. The failure error is

Address in use - BindException (...)

Which is also fine since the old version of Traccar was still running. I don't see anything concerning in the log.

Try committing the changes and then restart the add-on. See what happens.

sheckandar avatar Jun 04 '25 00:06 sheckandar

Yeah, it seems like it would start manually if the old instance were down, but i haven't confirmed. However, committing the change to a new image and then restarting the add-on results in the same behavior. Looking back in this thread, it seems like it's the same behavior as trying to run the edge build of the add-on. So the new version of Traccar works, but there's something about the way the add-on is built that it doesn't play well with.


s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: Traccar
 Modern GPS Tracking Platform
-----------------------------------------------------------
 Add-on version: 0.25.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 15.2  (aarch64 / green)
 Home Assistant Core: 2025.5.3
 Home Assistant Supervisor: 2025.05.3
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/mysql.sh
cont-init: info: /etc/cont-init.d/mysql.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
cont-init: info: running /etc/cont-init.d/traccar.sh
cont-init: info: /etc/cont-init.d/traccar.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun traccar (no readiness notification)
s6-rc: info: service legacy-services successfully started
[18:51:30] INFO: Starting Traccar server...
[18:51:36] WARNING: Traccar crashed, halting add-on
[18:51:36] INFO: Traccar stopped, restarting...
s6-rc: info: service legacy-services: stopping
[18:51:36] INFO: NGINX stopped, restarting...
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

@sheckandar what hardware are you running?

petep0p avatar Jun 04 '25 05:06 petep0p

anyone else succeed with this method on a home assistant green?

petep0p avatar Jun 05 '25 06:06 petep0p

also, i just looked at the dockerfile here in the main branch and notice that it's adding a lot more packages. maybe that's what's missing from this overwriting method:

Image

once I get a minute to do this I'll give it a try

petep0p avatar Jun 05 '25 06:06 petep0p

@sheckandar what hardware are you running?

It's just an old PC with an AMD CPU. Nothing special. HA is running inside a VM.

Do you have any custom settings that you set in Traccar ? Are there any xml files in the /config directory inside the container ?Sometimes a setting is removed in a newer version and can causes issues. If there is one, just rename it to .old temporarily and restart the add-on. If not, another option is nuking all your Traccar data and starting over completely.

But the thing is that without an actual error, all we have are guesses.

sheckandar avatar Jun 05 '25 20:06 sheckandar