2017-04-21 77 views
1

SonarQubeを含むドッカーコンテナを実行しようとしています。sonarqubeを使用したドッカーのメモリリーク

ビルドコンテナの後、私は以下のコマンドを実行してコンテナを実行しました。最初の数瞬間、それはうまく見えます(upのステータスはdocker ps -aです)、私は自動的に終了します。

自動シャットダウンの主な原因はmemory leakあるように私のようなコマンドを入力した...

docker run -d --name sonarqube 
    -p 9000:9000 -p 9092:9092 
    -e SONARQUBE_JDBC_USERNAME=sonar 
    -e SONARQUBE_JDBC_PASSWORD=sonar 
    -e SONARQUBE_JDBC_URL="jdbc:mysql://111.222.33.444:3306/sonar?characterEncoding=utf8&useUnicode=true&rewriteBatchedStatements=true" 
    sonarqube 

とフォローが障害ログには、すべての後

2017.04.21 06:39:37 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[Pip the Troll][[timer]]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: 
java.lang.Thread.sleep(Native Method) 
org.elasticsearch.threadpool.ThreadPool$EstimatedTimeThread.run(ThreadPool.java:747) 
2017.04.21 06:39:37 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[Pip the Troll][scheduler][T#1]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: 
sun.misc.Unsafe.park(Native Method) 
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) 
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093) 
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809) 
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
java.lang.Thread.run(Thread.java:745) 
2017.04.21 06:39:37 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[Pip the Troll][transport_client_worker][T#1]{New I/O worker #1}] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: 
sun.nio.ch.EPollArrayWrapper.epollWait(Native Method) 
sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269) 
sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93) 
sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) 
sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97) 
org.jboss.netty.channel.socket.nio.SelectorUtil.select(SelectorUtil.java:68) 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.select(AbstractNioSelector.java:434) 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:212) 
org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) 
org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) 
org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) 
org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
java.lang.Thread.run(Thread.java:745) 
2017.04.21 06:39:37 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[Pip the Troll][transport_client_worker][T#2]{New I/O worker #2}] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: 
sun.nio.ch.EPollArrayWrapper.epollWait(Native Method) 
sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269) 
sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93) 
sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) 
sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97) 
org.jboss.netty.channel.socket.nio.SelectorUtil.select(SelectorUtil.java:68) 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.select(AbstractNioSelector.java:434) 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:212) 
org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) 
org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) 
org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) 
org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
java.lang.Thread.run(Thread.java:745) 
2017.04.21 06:39:37 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[Pip the Troll][transport_client_worker][T#3]{New I/O worker #3}] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: 
sun.nio.ch.EPollArrayWrapper.epollWait(Native Method) 
sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269) 
sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93) 
sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) 
sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97) 
org.jboss.netty.channel.socket.nio.SelectorUtil.select(SelectorUtil.java:68) 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.select(AbstractNioSelector.java:434) 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:212) 
org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) 
org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) 
org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) 
org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
java.lang.Thread.run(Thread.java:745) 

あり、それはそうです。これをどうすれば解決できますか?

参考のため、JDBCの情報はありません。

================= EDIT ==================

たぶん私はより多くの情報を提供する必要がありますこれを修正する。私はdocker runを入力して、すぐにdocker logs sonarqubeとき 、ログは

[[email protected] ice]# docker logs sonarqube 
01:00:46.930 [main] WARN org.sonar.application.JdbcSettings - JDBC URL is recommended to have the property 'useConfigs=maxPerformance' 
2017.04.24 01:00:47 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp 
2017.04.24 01:00:47 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[es]: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonarqube/temp -javaagent:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /opt/sonarqube/temp/sq-process7897977644818879465properties 
2017.04.24 01:00:47 INFO es[][o.s.p.ProcessEntryPoint] Starting es 
2017.04.24 01:00:47 INFO es[][o.s.s.EsSettings] Elasticsearch listening on /127.0.0.1:9001 
2017.04.24 01:00:47 INFO es[][o.elasticsearch.node] [sonarqube] version[2.4.4], pid[45], build[fcbb46d/2017-01-03T11:33:16Z] 
2017.04.24 01:00:47 INFO es[][o.elasticsearch.node] [sonarqube] initializing ... 
2017.04.24 01:00:47 INFO es[][o.e.plugins] [sonarqube] modules [], plugins [], sites [] 
2017.04.24 01:00:47 INFO es[][o.elasticsearch.env] [sonarqube] using [1] data paths, mounts [[/opt/sonarqube/data (/dev/mapper/centos-root)]], net usable_space [7gb], net total_space [49.9gb], spins? [possibly], types [xfs] 
2017.04.24 01:00:47 INFO es[][o.elasticsearch.env] [sonarqube] heap size [989.8mb], compressed ordinary object pointers [true] 
2017.04.24 01:00:49 INFO es[][o.elasticsearch.node] [sonarqube] initialized 
2017.04.24 01:00:49 INFO es[][o.elasticsearch.node] [sonarqube] starting ... 
2017.04.24 01:00:49 INFO es[][o.e.transport] [sonarqube] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001} 
2017.04.24 01:00:49 INFO es[][o.e.discovery] [sonarqube] sonarqube/GPO7RRqHR8a8tfu1KfgVtw 

...のように見えるが、数秒後に、エラーが発生し、終了します。最初のエラーはElasticSearchに関連するものです。

2017.04.24 01:00:52 INFO es[][o.elasticsearch.node] [sonarqube] started 
2017.04.24 01:00:52 INFO es[][o.e.gateway] [sonarqube] recovered [0] indices into cluster_state 
2017.04.24 01:00:52 INFO app[][o.s.p.m.Monitor] Process[es] is up 
2017.04.24 01:00:52 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[web]: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom -Djava.io.tmpdir=/opt/sonarqube/temp -javaagent:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/server/*:/opt/sonarqube/lib/jdbc/mysql/mysql-connector-java-5.1.39.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process8670082336569494309properties 
2017.04.24 01:00:53 INFO web[][o.s.p.ProcessEntryPoint] Starting web 
2017.04.24 01:00:53 INFO web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read 
2017.04.24 01:00:54 INFO web[][o.e.plugins] [Immortus] modules [], plugins [], sites [] 
2017.04.24 01:00:54 INFO web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [127.0.0.1:9001] 
2017.04.24 01:00:54 INFO web[][o.s.s.p.LogServerVersion] SonarQube Server/6.3.0.19869/43ea4f4c43aa89d4c435017f86d0da254e115e6b 
2017.04.24 01:00:54 INFO web[][o.sonar.db.Database] Create JDBC data source for jdbc:mysql://125.131.88.156:3306/sonar?characterEncoding=utf8&useUnicode=true&rewriteBatchedStatements=true 
2017.04.24 01:00:55 ERROR web[][o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.web.PlatformServletContextListener 
org.sonar.api.utils.MessageException: Unsupported mysql version: 5.5. Minimal supported version is 5.6. 
2017.04.24 01:00:55 ERROR web[][o.a.c.c.StandardContext] One or more listeners failed to start. Full details will be found in the appropriate container log file 
2017.04.24 01:00:55 ERROR web[][o.a.c.c.StandardContext] Context [] startup failed due to previous errors 
2017.04.24 01:00:55 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[Immortus][[timer]]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: 
java.lang.Thread.sleep(Native Method) 
org.elasticsearch.threadpool.ThreadPool$EstimatedTimeThread.run(ThreadPool.java:747) 
2017.04.24 01:00:55 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[Immortus][scheduler][T#1]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: 
sun.misc.Unsafe.park(Native Method) 
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) 
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093) 
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809) 
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
java.lang.Thread.run(Thread.java:745) 
2017.04.24 01:00:55 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[Immortus][transport_client_worker][T#1]{New I/O worker #1}] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: 
sun.nio.ch.EPollArrayWrapper.epollWait(Native Method) 
sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269) 
sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93) 
sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) 
sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97) 
org.jboss.netty.channel.socket.nio.SelectorUtil.select(SelectorUtil.java:68) 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.select(AbstractNioSelector.java:434) 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:212) 
org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) 
org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) 
org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) 
org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
java.lang.Thread.run(Thread.java:745) 

私はJDBCのURLがうまく見えると思います。私はsqlliteでデータベースにアクセスできます。

ありがとうございました。

+0

これらのエラーは、起動時に組み込みのTomcatでSonarQubeのWebアプリケーションが早期にクラッシュしたために発生します。ログの早い段階でクラッシュの原因を調べます(おそらくjdbc設定が間違っている可能性があります) –

+0

Thanks @ Seb-SonarSourceTeam。以前のログをチェックします。あなたが気にしないなら、私はさらにもう1つの質問をすることができますか? jdbcオプション 'characterEncoding'、' useUnicode'、 'rewriteBatchStatements'は常に必要ですか? –

+0

@ Seb-SonarSourceTeamいくつかの追加情報を追加します。あなたは私のためにそれをチェックしますか?感謝! –

答えて

0

データベースシステムフォームMariaDB ver.10.1.22からMySQL ver.5.7に変更しました。この問題についていくつかの記事がありますが、まだ解決されていないようです。今のところSonarqubeはMariaDBの一部のバージョンでは使用できません。

0

おそらくデータベース接続の問題です。あなたの住所にタイプミスがないかチェックし、あなたの資格が有効であることを確認してください。

関連する問題