Traccar on AWS EC2 instance Status=1/Failure issue

Slawek4 years ago

must be firewall, open port 8082

Nightwolve4 years ago

I let the syslog run for a moment and noticed that it restarted:

Feb  3 10:26:55 ip-172-31-0-242 systemd[1]: Started traccar.
Feb  3 10:31:57 ip-172-31-0-242 traccar[253684]: Exception in thread "main" java.lang.RuntimeException: liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by ip-172-31-0-242.eu-central-1.compute.internal (172.31.0.242) since 2/3/21, 10:26 AM
Feb  3 10:31:57 ip-172-31-0-242 traccar[253684]: #011at org.traccar.Main.run(Main.java:165)
Feb  3 10:31:57 ip-172-31-0-242 traccar[253684]: #011at org.traccar.Main.main(Main.java:110)
Feb  3 10:31:57 ip-172-31-0-242 traccar[253684]: Caused by: liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by ip-172-31-0-242.eu-central-1.compute.internal (172.31.0.242) since 2/3/21, 10:26 AM
Feb  3 10:31:57 ip-172-31-0-242 traccar[253684]: #011at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:236)
Feb  3 10:31:57 ip-172-31-0-242 traccar[253684]: #011at liquibase.Liquibase.clearCheckSums(Liquibase.java:1395)
Feb  3 10:31:57 ip-172-31-0-242 traccar[253684]: #011at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:310)
Feb  3 10:31:57 ip-172-31-0-242 traccar[253684]: #011at org.traccar.database.DataManager.<init>(DataManager.java:90)
Feb  3 10:31:57 ip-172-31-0-242 traccar[253684]: #011at org.traccar.Context.init(Context.java:299)
Feb  3 10:31:57 ip-172-31-0-242 traccar[253684]: #011at org.traccar.Main.run(Main.java:137)
Feb  3 10:31:57 ip-172-31-0-242 traccar[253684]: #011... 1 more
Feb  3 10:31:57 ip-172-31-0-242 systemd[1]: traccar.service: Main process exited, code=exited, status=1/FAILURE
Feb  3 10:31:57 ip-172-31-0-242 systemd[1]: traccar.service: Failed with result 'exit-code'.
Feb  3 10:32:07 ip-172-31-0-242 systemd[1]: traccar.service: Scheduled restart job, restart counter is at 1.
Feb  3 10:32:07 ip-172-31-0-242 systemd[1]: Stopped traccar.
Feb  3 10:32:07 ip-172-31-0-242 systemd[1]: Started traccar.
^C
root@ip-172-31-0-242:/opt/traccar/conf# tail -f /var/log/syslog
Feb  3 10:31:57 ip-172-31-0-242 traccar[253684]: #011at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:310)
Feb  3 10:31:57 ip-172-31-0-242 traccar[253684]: #011at org.traccar.database.DataManager.<init>(DataManager.java:90)
Feb  3 10:31:57 ip-172-31-0-242 traccar[253684]: #011at org.traccar.Context.init(Context.java:299)
Feb  3 10:31:57 ip-172-31-0-242 traccar[253684]: #011at org.traccar.Main.run(Main.java:137)
Feb  3 10:31:57 ip-172-31-0-242 traccar[253684]: #011... 1 more
Feb  3 10:31:57 ip-172-31-0-242 systemd[1]: traccar.service: Main process exited, code=exited, status=1/FAILURE
Feb  3 10:31:57 ip-172-31-0-242 systemd[1]: traccar.service: Failed with result 'exit-code'.
Feb  3 10:32:07 ip-172-31-0-242 systemd[1]: traccar.service: Scheduled restart job, restart counter is at 1.
Feb  3 10:32:07 ip-172-31-0-242 systemd[1]: Stopped traccar.
Feb  3 10:32:07 ip-172-31-0-242 systemd[1]: Started traccar.
Feb  3 10:32:43 ip-172-31-0-242 systemd[1]: Starting Refresh fwupd metadata and update motd...
Feb  3 10:32:43 ip-172-31-0-242 dbus-daemon[433]: [system] Activating via systemd: service name='org.freedesktop.fwupd' unit='fwupd.service' requested by ':1.90' (uid=62803 pid=253793 comm="/usr/bin/fwupdmgr refresh --no-metadata-check " label="unconfined")
Feb  3 10:32:43 ip-172-31-0-242 systemd[1]: Starting Firmware update daemon...
Feb  3 10:32:43 ip-172-31-0-242 dbus-daemon[433]: [system] Successfully activated service 'org.freedesktop.fwupd'
Feb  3 10:32:43 ip-172-31-0-242 systemd[1]: Started Firmware update daemon.
Feb  3 10:32:43 ip-172-31-0-242 systemd[1]: fwupd-refresh.service: Succeeded.
Feb  3 10:32:43 ip-172-31-0-242 systemd[1]: Finished Refresh fwupd metadata and update motd.
^C
root@ip-172-31-0-242:/opt/traccar/conf# tail -f /var/log/syslog
Feb  3 10:32:07 ip-172-31-0-242 systemd[1]: traccar.service: Scheduled restart job, restart counter is at 1.
Feb  3 10:32:07 ip-172-31-0-242 systemd[1]: Stopped traccar.
Feb  3 10:32:07 ip-172-31-0-242 systemd[1]: Started traccar.
Feb  3 10:32:43 ip-172-31-0-242 systemd[1]: Starting Refresh fwupd metadata and update motd...
Feb  3 10:32:43 ip-172-31-0-242 dbus-daemon[433]: [system] Activating via systemd: service name='org.freedesktop.fwupd' unit='fwupd.service' requested by ':1.90' (uid=62803 pid=253793 comm="/usr/bin/fwupdmgr refresh --no-metadata-check " label="unconfined")
Feb  3 10:32:43 ip-172-31-0-242 systemd[1]: Starting Firmware update daemon...
Feb  3 10:32:43 ip-172-31-0-242 dbus-daemon[433]: [system] Successfully activated service 'org.freedesktop.fwupd'
Feb  3 10:32:43 ip-172-31-0-242 systemd[1]: Started Firmware update daemon.
Feb  3 10:32:43 ip-172-31-0-242 systemd[1]: fwupd-refresh.service: Succeeded.
Feb  3 10:32:43 ip-172-31-0-242 systemd[1]: Finished Refresh fwupd metadata and update motd.

am I missing something perhaps? Seems that the server locks the application from running or am I mistaken? It also auto updated the daemon which could be the issue but after waiting several minutes it happened again with the same log messages:

Feb  3 10:32:43 ip-172-31-0-242 systemd[1]: Finished Refresh fwupd metadata and update motd.
Feb  3 10:37:10 ip-172-31-0-242 traccar[253750]: Exception in thread "main" java.lang.RuntimeException: liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by ip-172-31-0-242.eu-central-1.compute.internal (172.31.0.242) since 2/3/21, 10:26 AM
Feb  3 10:37:10 ip-172-31-0-242 traccar[253750]: #011at org.traccar.Main.run(Main.java:165)
Feb  3 10:37:10 ip-172-31-0-242 traccar[253750]: #011at org.traccar.Main.main(Main.java:110)
Feb  3 10:37:10 ip-172-31-0-242 traccar[253750]: Caused by: liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by ip-172-31-0-242.eu-central-1.compute.internal (172.31.0.242) since 2/3/21, 10:26 AM
Feb  3 10:37:10 ip-172-31-0-242 traccar[253750]: #011at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:236)
Feb  3 10:37:10 ip-172-31-0-242 traccar[253750]: #011at liquibase.Liquibase.clearCheckSums(Liquibase.java:1395)
Feb  3 10:37:10 ip-172-31-0-242 traccar[253750]: #011at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:310)
Feb  3 10:37:10 ip-172-31-0-242 traccar[253750]: #011at org.traccar.database.DataManager.<init>(DataManager.java:90)
Feb  3 10:37:10 ip-172-31-0-242 traccar[253750]: #011at org.traccar.Context.init(Context.java:299)
Feb  3 10:37:10 ip-172-31-0-242 traccar[253750]: #011at org.traccar.Main.run(Main.java:137)
Feb  3 10:37:10 ip-172-31-0-242 traccar[253750]: #011... 1 more
Feb  3 10:37:10 ip-172-31-0-242 systemd[1]: traccar.service: Main process exited, code=exited, status=1/FAILURE
Feb  3 10:37:10 ip-172-31-0-242 systemd[1]: traccar.service: Failed with result 'exit-code'.
Feb  3 10:37:20 ip-172-31-0-242 systemd[1]: traccar.service: Scheduled restart job, restart counter is at 2.
Feb  3 10:37:20 ip-172-31-0-242 systemd[1]: Stopped traccar.
Feb  3 10:37:20 ip-172-31-0-242 systemd[1]: Started traccar.

apologies for the long message

Slawek4 years ago

try

update DATABASECHANGELOGLOCK set locked = 0;

then restart service

Nightwolve4 years ago

Slawek,

You want me to run this in the MySQL service or the .xml from trackar? since you put a ; after the command it confused me for a moment, sorry.

Slawek4 years ago

login to mysql and run this command

Nightwolve4 years ago

application seems to be running smoothly for a while now, thanks!

Feb  3 11:09:03 ip-172-31-0-242 systemd[1]: Finished Clean php session files.
Feb  3 11:13:35 ip-172-31-0-242 traccar[254316]: WARNING: An illegal reflective access operation has occurred
Feb  3 11:13:35 ip-172-31-0-242 traccar[254316]: WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/opt/traccar/lib/guice-4.2.3.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
Feb  3 11:13:35 ip-172-31-0-242 traccar[254316]: WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
Feb  3 11:13:35 ip-172-31-0-242 traccar[254316]: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
Feb  3 11:13:35 ip-172-31-0-242 traccar[254316]: WARNING: All illegal access operations will be denied in a future release
Feb  3 11:14:13 ip-172-31-0-242 systemd[1]: Stopping traccar...
Feb  3 11:14:14 ip-172-31-0-242 systemd[1]: traccar.service: Succeeded.
Feb  3 11:14:14 ip-172-31-0-242 systemd[1]: Stopped traccar.
Feb  3 11:14:14 ip-172-31-0-242 systemd[1]: Started traccar.
Feb  3 11:14:20 ip-172-31-0-242 traccar[254537]: WARNING: An illegal reflective access operation has occurred
Feb  3 11:14:20 ip-172-31-0-242 traccar[254537]: WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/opt/traccar/lib/guice-4.2.3.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
Feb  3 11:14:20 ip-172-31-0-242 traccar[254537]: WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
Feb  3 11:14:20 ip-172-31-0-242 traccar[254537]: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
Feb  3 11:14:20 ip-172-31-0-242 traccar[254537]: WARNING: All illegal access operations will be denied in a future release
Feb  3 11:17:01 ip-172-31-0-242 CRON[254623]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb  3 11:39:01 ip-172-31-0-242 CRON[254655]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Feb  3 11:39:31 ip-172-31-0-242 systemd[1]: Starting Clean php session files...
Feb  3 11:39:31 ip-172-31-0-242 systemd[1]: phpsessionclean.service: Succeeded.
Feb  3 11:39:31 ip-172-31-0-242 systemd[1]: Finished Clean php session files.
Slawek4 years ago

can you web login ?

Nightwolve4 years ago

for the moment I can't web login through the public IP. I'm not at the server location so i cannot use the private network to access. perhaps the issue lies here? I'm also communicating with my server administrator about port 8082 if it is in fact really open to public also so i can try to access. I don't think this issue lies with Traccar for the moment?

Slawek4 years ago

if you have linux machine, try

nmap -v -Pn your_server_ip

then you will see open ports

Nightwolve4 years ago

Thank you Slawek,

I can access web interface now. My server administrator didn't give the access yet to public, apologies.
I set up my device (TK418 tracker) to the ip of Traccar and port 5064(the one corresponding to the protocol) but i'm not receiving any data. Device has GPS and cellphone connection so is sending data. perhaps i'm using wrong port? Do is need to configure something in the web interface perhaps that I missed? I did add the IMEI identifier

Slawek4 years ago

port 5064 is open ?

Nightwolve4 years ago

Port 5064 is open

Slawek4 years ago

what is in log file ?

Nightwolve4 years ago
root@ip-172-31-0-242:/opt/traccar/logs# nl tracker-server.log
     1  2021-02-04 14:50:47  INFO: user: 2, action: login
     2  2021-02-04 15:05:31  INFO: [07dd1886] connected
     3  2021-02-04 15:05:35  INFO: [07dd1886: eelink < 188.188.127.92] HEX: 67670100180005086528404293472301040210121000010446005d968d
     4  2021-02-04 15:05:35  INFO: [07dd1886: eelink > 188.188.127.92] HEX: 67670100080005601c0d3f0100
     5  2021-02-04 15:05:35  WARN: Unknown device - 865284042934723 (188.188.127.92)
     6  2021-02-04 15:06:37  INFO: [07dd1886: eelink < 188.188.127.92] HEX: 67671200430006601c0d7b0305779c23009cae540022000001430500ce001404ed00006b482a066b108401f0000000000000029d028e000000000000000000000000000000000000
     7  2021-02-04 15:06:37  INFO: [07dd1886: eelink > 188.188.127.92] HEX: 67671200020006
     8  2021-02-04 15:07:37  INFO: [07dd1886: eelink < 188.188.127.92] HEX: 67671200430007601c0db70305779c44009cadab002b000001210300ce001404ed00006b4824066b109401f0000000000000029e028f000000000000000000000000000000000000
     9  2021-02-04 15:07:37  INFO: [07dd1886: eelink > 188.188.127.92] HEX: 67671200020007
    10  2021-02-04 15:09:50  INFO: user: 2, action: create, object: device, id: 1
    11  2021-02-04 15:09:50  INFO: user: 2, action: link, owner: user, id: 2, property: device, id: 1
    12  2021-02-04 15:10:39  INFO: [07dd1886: eelink < 188.188.127.92] HEX: 67670300040008046b
    13  2021-02-04 15:10:39  INFO: [07dd1886: eelink > 188.188.127.92] HEX: 67670300020008
    14  2021-02-04 15:11:36  INFO: user: 2, action: edit, object: device, id: 1
    15  2021-02-04 15:13:40  INFO: [07dd1886: eelink < 188.188.127.92] HEX: 67670300040009046b
    16  2021-02-04 15:13:40  INFO: [07dd1886: eelink > 188.188.127.92] HEX: 67670300020009
    17  2021-02-04 15:15:54  INFO: [07dd1886: eelink < 188.188.127.92] HEX: 6767140024000a601c0fa90305779c44009cadab002b0000002a0500ce001404ed00006b482485066b
    18  2021-02-04 15:15:54  INFO: [07dd1886: eelink > 188.188.127.92] HEX: 6767140002000a
    19  2021-02-04 15:15:59  INFO: [07dd1886: eelink < 188.188.127.92] HEX: 6767120043000b601c0fa90305779c44009cadab002b0000002a0500ce001404ed00006b4824066b10aa01f000000000000002a60297000000000000000000000000000000000000
    20  2021-02-04 15:15:59  INFO: [07dd1886: eelink > 188.188.127.92] HEX: 6767120002000b
    21  2021-02-04 15:16:55  INFO: [07dd1886: eelink < 188.188.127.92] HEX: 6767120043000c601c0fe50305779c7d009cae06002d0000002a0500ce001404ed000065942e066b10ab01f000000000000002a70298000000000000000000000000000000000000
    22  2021-02-04 15:16:55  INFO: [07dd1886: eelink > 188.188.127.92] HEX: 6767120002000c
    23  2021-02-04 15:19:57  INFO: [07dd1886: eelink < 188.188.127.92] HEX: 6767030004000d046b
    24  2021-02-04 15:19:57  INFO: [07dd1886: eelink > 188.188.127.92] HEX: 6767030002000d
    25  2021-02-04 15:22:59  INFO: [07dd1886: eelink < 188.188.127.92] HEX: 6767030004000e046b
    26  2021-02-04 15:22:59  INFO: [07dd1886: eelink > 188.188.127.92] HEX: 6767030002000e
root@ip-172-31-0-242:/opt/traccar/logs#
Slawek4 years ago

WARN: Unknown device - 865284042934723

is your device imei ?