4.10 Traccar service restarting

Abel4 years ago

Hi there,

I upgraded to 4.10 version a few days ago, and since then, the server is restarting all the time, sometimes it last 5 min, other 10 min, and I can't find the reason.

I though it could be the server specs, but I just upgraded to a 2GB RAM just in case, but it constantly reboots and everything seems normal in server.log.

2020-08-01 19:09:47  INFO: [b77844fe: osmand > 127.0.0.1] HEX: 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2020-08-01 19:09:47  INFO: [b77844fe] id: 11223344, time: 2020-08-01 19:09:45, lat: 28.48494, lon: -16.41102, speed: 0.0, course: 220.4, accuracy: 20.9
2020-08-01 19:10:02  INFO: HikariPool-1 - Starting...
2020-08-01 19:10:03  INFO: HikariPool-1 - Start completed.
2020-08-01 19:10:05  INFO: Clearing database change log checksums
2020-08-01 19:10:06  INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-08-01 19:10:06  INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-08-01 19:10:06  INFO: SELECT `LOCKED` FROM traccar.DATABASECHANGELOGLOCK WHERE ID=1
2020-08-01 19:10:06  INFO: Successfully acquired change log lock
2020-08-01 19:10:06  INFO: SELECT MD5SUM FROM traccar.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1
2020-08-01 19:10:06  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = NULL
2020-08-01 19:10:06  INFO: Successfully released change log lock
2020-08-01 19:10:06  INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-08-01 19:10:06  INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
2020-08-01 19:10:06  INFO: SELECT `LOCKED` FROM traccar.DATABASECHANGELOGLOCK WHERE ID=1
2020-08-01 19:10:06  INFO: Successfully acquired change log lock
2020-08-01 19:10:06  INFO: Can not use class liquibase.parser.core.json.JsonChangeLogParser as a Liquibase service because org.yaml.snakeyaml.constructor.BaseConstructor is not in the classpath
2020-08-01 19:10:06  INFO: Can not use class liquibase.parser.core.yaml.YamlChangeLogParser as a Liquibase service because org.yaml.snakeyaml.constructor.BaseConstructor is not in the classpath
2020-08-01 19:10:09  INFO: SELECT MD5SUM FROM traccar.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1
2020-08-01 19:10:09  INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOG
2020-08-01 19:10:09  INFO: Reading from traccar.DATABASECHANGELOG
2020-08-01 19:10:09  INFO: SELECT * FROM traccar.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:ea6f202534dc7845fd1a49e1d8384d9c' WHERE ID = 'changelog-3.3' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.3'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:194e3ae7ec6d201917136e04a26e237b' WHERE ID = 'changelog-3.5' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.5'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:1ec7941b03749f24e365bc6126b07e1a' WHERE ID = 'changelog-3.6' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.6'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:2e444e379f31d0b8e09273ec7ffe87a0' WHERE ID = 'changelog-3.7' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.7'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:974c33d2fb399ef6477c3897450fb078' WHERE ID = 'changelog-3.7-notmssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.7'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:74d68027951f8d2ae6bb2e24df8365bc' WHERE ID = 'changelog-3.8' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.8'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:34822842d65deb843a7d16f857d52ecc' WHERE ID = 'changelog-3.9' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.9'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:e1ddbe83e1ecf856a912755fc118f82e' WHERE ID = 'changelog-3.10' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:191c21d8f0f921845cf93bbc9d0639b9' WHERE ID = 'changelog-3.10-notmssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:ad1f63566e8d08812fbf0b93a118ef6e' WHERE ID = 'changelog-3.10-mssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:127b36b9d32a9d236df51d19b18c3766' WHERE ID = 'changelog-3.7-mssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.10'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:7800f890b9706a480bd5a79b591b6ca7' WHERE ID = 'changelog-3.11' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.11'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:5ce520811d626ad325a014b9fcbb1a13' WHERE ID = 'changelog-3.12' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.12'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:a3bf7fabcde29e106fe2f89829a76a84' WHERE ID = 'changelog-3.12-notmssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.12'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:cfc881bd2dadb561aa9c1a467bc8cc1c' WHERE ID = 'changelog-3.12-pgsql' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.12'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:1be7e6c0520f8be53ef1b099d96afba5' WHERE ID = 'changelog-3.14' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.14'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:ac8ccec176027e98bbf45dc6c15d9b05' WHERE ID = 'changelog-3.15' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.15'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:d59fa93049c031a8bcfbc02958c1942c' WHERE ID = 'changelog-4.0-clean' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0-clean'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:1adabae3238e02ccc97cc422359a58a0' WHERE ID = 'changelog-4.0-clean-common' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0-clean'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:b59407d70bfe9bf57bc9968adfbbdf1c' WHERE ID = 'changelog-3.16' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.16'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:3f14c3b08068eb7628d0d3e2941eb2d3' WHERE ID = 'changelog-3.3-admin' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.17'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:8aa3e56afe6ba86cd004fa801507bc28' WHERE ID = 'changelog-3.17' AND AUTHOR = 'author' AND FILENAME = 'changelog-3.17'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:3974bfe5a2e962c0cd663433c832c16a' WHERE ID = 'changelog-4.0-pre' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:65fb49c5be37693183708351c507dd50' WHERE ID = 'changelog-4.0-common' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:9831511507d8ae1d6759c8ccf506a27a' WHERE ID = 'changelog-4.0-pg' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:ac63c4153f5b2ee5c7a07056da269571' WHERE ID = 'changelog-4.0' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:90aedfa378aa717f8d8ae541f97b87b2' WHERE ID = 'changelog-4.0-renaming' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.0'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:b148f52efe9c6a3e74a56e33e257a3e2' WHERE ID = 'changelog-4.1-mssql' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.1'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:a23040cfc84d4b8021f40ee214a9d78b' WHERE ID = 'changelog-4.7' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.7'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:805ef202791dcc246373ca16f7c19c4f' WHERE ID = 'changelog-4.9' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.9'
2020-08-01 19:10:09  INFO: UPDATE traccar.DATABASECHANGELOG SET MD5SUM = '8:64f89f4092585f8f768d0dee54dc30c8' WHERE ID = 'changelog-4.10' AND AUTHOR = 'author' AND FILENAME = 'changelog-4.10'
2020-08-01 19:10:09  INFO: SELECT COUNT(*) FROM traccar.DATABASECHANGELOG
2020-08-01 19:10:09  INFO: Reading from traccar.DATABASECHANGELOG
2020-08-01 19:10:09  INFO: SELECT * FROM traccar.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2020-08-01 19:10:09  INFO: Successfully released change log lock
2020-08-01 19:10:10  INFO: Logging initialized @10145ms to org.eclipse.jetty.util.log.Slf4jLog
2020-08-01 19:10:11  INFO: Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.
2020-08-01 19:10:13  INFO: Operating system name: Linux version: 4.4.0-186-generic architecture: amd64
2020-08-01 19:10:13  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Oracle Corporation version: 11.0.5+10-LTS
2020-08-01 19:10:13  INFO: Memory limit heap: 471mb non-heap: 0mb
2020-08-01 19:10:13  INFO: Character encoding: UTF-8 charset: UTF-8
2020-08-01 19:10:13  INFO: Version: 4.10
2020-08-01 19:10:13  INFO: Starting server...
2020-08-01 19:10:13  INFO: jetty-9.4.30.v20200611; built: 2020-06-11T12:34:51.929Z; git: 271836e4c1f4612f12b7bb13ef5a92a927634b0d; jvm 11.0.5+10-LTS
2020-08-01 19:10:13  INFO: Started o.t.w.@1c2096c6{/,null,AVAILABLE}
2020-08-01 19:10:13  INFO: DefaultSessionIdManager workerName=node0
2020-08-01 19:10:13  INFO: No SessionScavenger set, using defaults
2020-08-01 19:10:13  INFO: node0 Scavenging every 660000ms
2020-08-01 19:10:16  INFO: Started o.e.j.s.ServletContextHandler@64a8d575{/,null,AVAILABLE}
2020-08-01 19:10:16  INFO: Started ServerConnector@58a2d9f9{HTTP/1.1, (http/1.1)}{0.0.0.0:8082}
2020-08-01 19:10:16  INFO: Started @16206ms
2020-08-01 19:10:16  INFO: Clearing history earlier than 2020-02-03 18:10:16

As you can see, everything works fine at 19:09:47 and at 19:10:02 it shows INFO: HikariPool-1 - Starting... and starts the whole process again.

Everything works fine during the time it's alive, but it happens suddenly.

Any ideas?

Thanks in advance, I could find any info related to this throughout the forum.

Anton Tananaev4 years ago

Most likely you don't have correct configuration. Have you changed defualt.xml file?

Abel4 years ago

The only thing I did was to disable the ports I'm not using. Anything else.

    <!--

    DO NOT MODIFY THIS FILE. Use traccar.xml instead.

    -->

    <entry key='web.enable'>true</entry>
    <entry key='web.port'>8082</entry>
    <entry key='web.path'>./web</entry>
    <entry key='web.cacheControl'>max-age=3600,public</entry>

    <entry key='geocoder.enable'>false</entry>
    <entry key='geocoder.type'>google</entry>

    <entry key='logger.enable'>true</entry>
    <entry key='logger.level'>info</entry>
    <entry key='logger.file'>./logs/tracker-server.log</entry>
    <entry key='logger.rotate'>true</entry>

    <entry key='filter.enable'>true</entry>
    <entry key='filter.future'>86400</entry>

    <entry key='event.enable'>true</entry>
    <entry key='event.ignoreDuplicateAlerts'>true</entry>
    <entry key='processing.computedAttributes.enable'>true</entry>
    <entry key='processing.engineHours.enable'>true</entry>

    <entry key='media.path'>./media</entry>

    <entry key='notificator.types'>web,mail</entry>
   

    <entry key='server.statistics'>https://www.traccar.org/analytics/</entry>

    <entry key='commands.queueing'>true</entry>

    <entry key='database.ignoreUnknown'>true</entry>
    <entry key='database.generateQueries'>true</entry>
    <entry key='database.changelog'>./schema/changelog-master.xml</entry>
 
    <entry key='database.loginUser'>
        SELECT * FROM tc_users
        WHERE email = :email OR login = :email
    </entry>

    <entry key='database.selectPositions'>
        SELECT * FROM tc_positions WHERE deviceId = :deviceId AND fixTime BETWEEN :from AND :to ORDER BY fixTime
    </entry>

    <entry key='database.selectLatestPositions'>
        SELECT tc_positions.* FROM tc_positions INNER JOIN tc_devices ON tc_positions.id = tc_devices.positionid;
    </entry>

    <entry key='database.updateLatestPosition'>
        UPDATE tc_devices SET positionId = :id WHERE id = :deviceId
    </entry>

    <entry key='database.selectEvents'>
        SELECT * FROM tc_events WHERE deviceId = :deviceId AND serverTime BETWEEN :from AND :to ORDER BY serverTime
    </entry>

    <entry key='database.deletePositions'>
        DELETE FROM tc_positions WHERE serverTime &lt; :serverTime AND id NOT IN (SELECT positionId FROM tc_devices WHERE positionId IS NOT NULL)
    </entry>

    <entry key='database.deleteEvents'>
        DELETE FROM tc_events WHERE serverTime &lt; :serverTime
    </entry>

    <entry key='database.selectStatistics'>
        SELECT * FROM tc_statistics WHERE captureTime BETWEEN :from AND :to ORDER BY captureTime
    </entry>

   <!--Allowed ports-->

  <entry key='h02.port'>5013</entry> 
  <entry key='osmand.port'>5055</entry>

<!--  <entry key='gps103.port'>5001</entry>
...
    <entry key='satsol.port'>5184</entry>

 -->

</properties>
Abel4 years ago

On traccar.xml, about the database:

<entry key='config.default'>./conf/default.xml</entry>
<!-- DATABASE -->
<entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://localhost:3306/traccar?serverTimezone=UTC&amp;useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
<entry key='database.historyDays'>180</entry> 

And of course, user and passwd.

Anton Tananaev4 years ago

I don't see this line in your default.xml config:

https://github.com/traccar/traccar/blob/master/setup/default.xml#L17

Abel4 years ago

I added that line, I guess I accidently replaced 4.10 default.xml with the old one.
Seems it's working fine now, I'll have a look at it during the week.
Thanks again, Anton.