Traccar server: cldrdata.jar (Слишком много открытых файлов)

Latenight8 years ago

Добрый вечер. Имею Traccar сервер на Centos 7 + MySQL 5.6.31. Наблюдается следующая картина: Спустя пару- тройку часов после старта cервиса traccar от многих трекеров "перестают" поступать координаты (в списке становятся красными). После рестарта traccar - все трекеры успешно коннектятся и отображаются (все зеленые).


STATUS | wrapper  | 2016/06/29 14:47:01 | --> Wrapper Started as Daemon
STATUS | wrapper  | 2016/06/29 14:47:01 | Java Service Wrapper Community Edition 64-bit 3.5.28
STATUS | wrapper  | 2016/06/29 14:47:01 |   Copyright (C) 1999-2016 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper  | 2016/06/29 14:47:01 |     http://wrapper.tanukisoftware.com
STATUS | wrapper  | 2016/06/29 14:47:01 | 
STATUS | wrapper  | 2016/06/29 14:47:01 | Launching a JVM...
INFO   | jvm 1    | 2016/06/29 14:47:02 | WrapperManager: Initializing...
INFO   | jvm 1    | 2016/06/29 14:47:02 | [MLog-Init-Reporter] INFO com.mchange.v2.log.MLog - MLog clients using slf4j logging.
INFO   | jvm 1    | 2016/06/29 14:47:02 | [WrapperSimpleAppMain] INFO com.mchange.v2.c3p0.C3P0Registry - Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]
INFO   | jvm 1    | 2016/06/29 14:47:02 | INFO 6/29/16 2:47 PM: liquibase: Clearing database change log checksums
INFO   | jvm 1    | 2016/06/29 14:47:02 | INFO 6/29/16 2:47 PM: liquibase: Successfully acquired change log lock
INFO   | jvm 1    | 2016/06/29 14:47:03 | INFO 6/29/16 2:47 PM: liquibase: Successfully released change log lock
INFO   | jvm 1    | 2016/06/29 14:47:03 | INFO 6/29/16 2:47 PM: liquibase: Successfully acquired change log lock
INFO   | jvm 1    | 2016/06/29 14:47:03 | INFO 6/29/16 2:47 PM: liquibase: Reading from traccar.DATABASECHANGELOG
INFO   | jvm 1    | 2016/06/29 14:47:03 | INFO 6/29/16 2:47 PM: liquibase: Reading from traccar.DATABASECHANGELOG
INFO   | jvm 1    | 2016/06/29 14:47:03 | INFO 6/29/16 2:47 PM: liquibase: Successfully released change log lock
INFO   | jvm 1    | 2016/06/29 14:47:03 | [WrapperSimpleAppMain] INFO com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> z8kflt9h17a2uc3kduqo3|f66b34e, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> z8kflt9h17a2uc3kduqo3|f66b34e, idleConnectionTestPeriod -> 600, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/traccar?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=ANSI_QUOTES, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> true, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
INFO   | jvm 1    | 2016/06/29 14:47:04 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.util.log - Logging initialized @2195ms
INFO   | jvm 1    | 2016/06/29 14:47:04 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.server.Server - jetty-9.2.15.v20160210
INFO   | jvm 1    | 2016/06/29 14:47:04 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@7d7cfd7{/api,null,AVAILABLE}
INFO   | jvm 1    | 2016/06/29 14:47:04 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@138dc14f{HTTP/1.1}{0.0.0.0:8082}
INFO   | jvm 1    | 2016/06/29 14:47:04 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.server.Server - Started @2867ms
INFO   | jvm 1    | 2016/06/29 17:22:35 | Exception in thread "pool-4-thread-1" java.lang.InternalError: java.io.FileNotFoundException: /usr/java/jre1.8.0_60/lib/ext/cldrdata.jar (Слишком много открытых файлов)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at sun.misc.URLClassPath.getResource(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.net.URLClassLoader$1.run(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.net.URLClassLoader$1.run(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.net.URLClassLoader.findClass(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.lang.ClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.lang.ClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.lang.ClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.ResourceBundle$RBClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.ResourceBundle$Control.newBundle(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.ResourceBundle.loadBundle(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.ResourceBundle.findBundle(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.ResourceBundle.getBundleImpl(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.ResourceBundle.getBundle(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.logging.Level.computeLocalizedLevelName(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.logging.Level.getLocalizedLevelName(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.logging.SimpleFormatter.format(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.logging.StreamHandler.publish(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.logging.ConsoleHandler.publish(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.logging.Logger.log(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.logging.Logger.doLog(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.logging.Logger.logp(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at org.jboss.netty.logging.JdkLogger.warn(JdkLogger.java:80)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:340)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.lang.Thread.run(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | Caused by: java.io.FileNotFoundException: /usr/java/jre1.8.0_60/lib/ext/cldrdata.jar (Слишком много открытых файлов)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.zip.ZipFile.open(Native Method)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.zip.ZipFile.<init>(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.zip.ZipFile.<init>(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.jar.JarFile.<init>(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.util.jar.JarFile.<init>(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at sun.misc.URLClassPath$JarLoader.access$700(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at sun.misc.URLClassPath$JarLoader.ensureOpen(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	... 32 more
INFO   | jvm 1    | 2016/06/29 17:22:35 | [qtp418652641-81-acceptor-0@29dcbf6a-ServerConnector@138dc14f{HTTP/1.1}{0.0.0.0:8082}] WARN org.eclipse.jetty.server.ServerConnector - 
INFO   | jvm 1    | 2016/06/29 17:22:35 | java.io.IOException: Слишком много открытых файлов
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at sun.nio.ch.ServerSocketChannelImpl.accept(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at sun.nio.ch.ServerSocketChannelImpl.accept(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at org.eclipse.jetty.server.ServerConnector.accept(ServerConnector.java:377)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at org.eclipse.jetty.server.AbstractConnector$Acceptor.run(AbstractConnector.java:500)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at java.lang.Thread.run(Unknown Source)

Насколько я понимаю проблема начинается вот тут: Что за файлы и почему их много открыто непонимаю

INFO   | jvm 1    | 2016/06/29 14:47:04 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.server.Server - Started @2867ms
INFO   | jvm 1    | 2016/06/29 17:22:35 | Exception in thread "pool-4-thread-1" java.lang.InternalError: java.io.FileNotFoundException: /usr/java/jre1.8.0_60/lib/ext/cldrdata.jar (Слишком много открытых файлов)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source)
INFO   | jvm 1    | 2016/06/29 17:22:35 | 	at sun.misc.URLClassPath.getResource(Unknown Source)

Подскажите пожалуйста как можно исправить? Спасибо.

Anton Tananaev8 years ago

В Linux у каждого процесса есть ограничение на количество открытых дескрипторов (файл, сетевые соединения и т.д.). В данном случае проблема скорее всего с сетевыми соединениями.

Вот тут можно найти информацию о том как это исправить:

https://github.com/tananaev/traccar/issues/1323

Эта проблема обсуждалась много раз, так что можно поискать по форуму или GitHub.

Latenight8 years ago

Спасибо. добавил в конфиг параметр : <entry key='tk103.resetDelay'>60</entry>


<!-- PROTOCOL CONFIG -->

    <entry key='tk103.port'>5002</entry>
     <entry key='tk103.resetDelay'>60</entry>
    <entry key='galileo.port'>5005</entry>
     <entry key='galileo.resetDelay'>60</entry>

</properties>