openfrontier / docker-gerrit

Build a Docker image with the Gerrit code review system
Apache License 2.0
197 stars 116 forks source link

start timeout, seems can't find /var/gerrit/logs/gerrit.run #81

Closed Honghe closed 7 years ago

Honghe commented 7 years ago

Docker image: gerritforge/gerrit-centos7

the output of .gerrit.sh start

+ test 1 -gt 0
+ ACTION=start
+ shift
+ test 0 -gt 0
+ test -z ''
+ NO_START=0
+ test -z ''
+ START_STOP_DAEMON=1
+ test -f /etc/default/gerritcodereview
+ . /etc/default/gerritcodereview
++ GERRIT_SITE=/var/gerrit
+ test -z ''
+ TMP=/tmp
+ TMPJ=/tmp/j14
+ GERRIT_INSTALL_TRACE_FILE=etc/gerrit.config
+ type git
+ : OK
+ test -z /var/gerrit
+ test -z /var/gerrit
++ pwd
+ INITIAL_DIR=/var/gerrit/bin
+ cd /var/gerrit
++ pwd
+ GERRIT_SITE=/var/gerrit
+ GERRIT_CONFIG=/var/gerrit/etc/gerrit.config
+ test -f /var/gerrit/etc/gerrit.config
+ test -r /var/gerrit/etc/gerrit.config
+ GERRIT_PID=/var/gerrit/logs/gerrit.pid
+ GERRIT_RUN=/var/gerrit/logs/gerrit.run
+ GERRIT_TMP=/var/gerrit/tmp
+ export GERRIT_TMP
+ JAVA_HOME_OLD=
++ get_config --get container.javaHome
++ test -f /var/gerrit/etc/gerrit.config
++ test x--get = x--int
++ git config --file /var/gerrit/etc/gerrit.config --get container.javaHome
+ JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1.b16.el7_3.x86_64/jre
+ test -z /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1.b16.el7_3.x86_64/jre
+ test -z /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1.b16.el7_3.x86_64/jre
+ test -z '' -a -n /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1.b16.el7_3.x86_64/jre -a -x /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1.b16.el7_3.x86_64/jre/bin/java -a '!' -d /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1.b16.el7_3.x86_64/jre/bin/java
+ JAVA=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1.b16.el7_3.x86_64/jre/bin/java
+ test -z /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1.b16.el7_3.x86_64/jre/bin/java
+ test -z ''
+ JSTACK=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1.b16.el7_3.x86_64/jre/bin/jstack
++ get_config --get-all container.javaOptions
++ test -f /var/gerrit/etc/gerrit.config
++ tr '\n' ' '
++ test x--get-all = x--int
++ git config --file /var/gerrit/etc/gerrit.config --get-all container.javaOptions
+ GERRIT_OPTIONS=
+ test -n ''
++ get_config --get container.heapLimit
++ test -f /var/gerrit/etc/gerrit.config
++ test x--get = x--int
++ git config --file /var/gerrit/etc/gerrit.config --get container.heapLimit
+ GERRIT_MEMORY=
+ test -n ''
++ get_config --int core.packedGitOpenFiles
++ test -f /var/gerrit/etc/gerrit.config
++ test x--int = x--int
+++ git config --file /var/gerrit/etc/gerrit.config --int core.packedGitOpenFiles
++ n=
++ test x0 = x
++ echo ''
+ GERRIT_FDS=
+ test -z ''
+ GERRIT_FDS=128
++ expr 128 + 128
+ GERRIT_FDS=256
+ test 256 -lt 1024
+ GERRIT_FDS=1024
++ get_config --get container.startupTimeout
++ test -f /var/gerrit/etc/gerrit.config
++ test x--get = x--int
++ git config --file /var/gerrit/etc/gerrit.config --get container.startupTimeout
+ GERRIT_STARTUP_TIMEOUT=
+ test -z ''
+ GERRIT_STARTUP_TIMEOUT=90
++ get_config --get container.user
++ test -f /var/gerrit/etc/gerrit.config
++ test x--get = x--int
++ git config --file /var/gerrit/etc/gerrit.config --get container.user
+ GERRIT_USER=gerrit
+ ulimit -c 0
+ ulimit -d unlimited
+ ulimit -f unlimited
+ ulimit -m
+ ulimit -m unlimited
+ ulimit -n 1024
+ ulimit -t unlimited
+ ulimit -v unlimited
+ ulimit -x
+ ulimit -x unlimited
+ test -z ''
++ get_config --get container.war
++ test -f /var/gerrit/etc/gerrit.config
++ test x--get = x--int
++ git config --file /var/gerrit/etc/gerrit.config --get container.war
+ GERRIT_WAR=
+ test -z ''
+ GERRIT_WAR=/var/gerrit/bin/gerrit.war
+ test -f /var/gerrit/bin/gerrit.war
+ test -z /var/gerrit/bin/gerrit.war -a -n gerrit
+ test -z /var/gerrit/bin/gerrit.war
+ test -z gerrit
+ RUN_ARGS='-jar /var/gerrit/bin/gerrit.war daemon -d /var/gerrit'
++ get_config --bool container.slave
++ test -f /var/gerrit/etc/gerrit.config
++ test x--bool = x--int
++ git config --file /var/gerrit/etc/gerrit.config --bool container.slave
+ test '' = true
++ get_config --get-all container.daemonOpt
++ test -f /var/gerrit/etc/gerrit.config
++ test x--get-all = x--int
++ git config --file /var/gerrit/etc/gerrit.config --get-all container.daemonOpt
+ DAEMON_OPTS=
+ test -n ''
+ test -n ''
+ test -x /usr/bin/perl
+ export JAVA
+ RUN_EXEC=/usr/bin/perl
+ RUN_Arg1=-e
+ RUN_Arg2='$x=$ENV{JAVA};exec $x @ARGV;die $!'
+ RUN_Arg3='-- GerritCodeReview'
+ case "$ACTION" in
+ printf %s 'Starting Gerrit Code Review: '
Starting Gerrit Code Review: + test 1 = 0
+ test -z 1000
++ date +%s
+ RUN_ID=1510296608.14
+ RUN_ARGS='-jar /var/gerrit/bin/gerrit.war daemon -d /var/gerrit --run-id=1510296608.14'
+ test 1 = 1
+ type start-stop-daemon
+ test -f /var/gerrit/logs/gerrit.pid
+ test 1000 = 0 -a -n gerrit
+ PID=40
+ type disown
+ disown
+ echo 40
+ /usr/bin/perl -e '$x=$ENV{JAVA};exec $x @ARGV;die $!' -- GerritCodeReview -jar /var/gerrit/bin/gerrit.war daemon -d /var/gerrit --run-id=1510296608.14
+ test 1000 = 0
+ TIMEOUT=90
+ sleep 1
+ running /var/gerrit/logs/gerrit.pid
+ test -f /var/gerrit/logs/gerrit.pid
++ cat /var/gerrit/logs/gerrit.pid
+ PID=40
+ ps -p 40
+ return 0
+ test 90 -gt 0
++ cat /var/gerrit/logs/gerrit.run
+ test x1510296608.14 = x
+ sleep 2
++ expr 90 - 2
+ TIMEOUT=88
+ running /var/gerrit/logs/gerrit.pid
+ test -f /var/gerrit/logs/gerrit.pid
++ cat /var/gerrit/logs/gerrit.pid
+ PID=40
+ ps -p 40
+ return 0
+ test 88 -gt 0
++ cat /var/gerrit/logs/gerrit.run
+ test x1510296608.14 = x
+ sleep 2
++ expr 88 - 2
+ TIMEOUT=86
+ running /var/gerrit/logs/gerrit.pid
+ test -f /var/gerrit/logs/gerrit.pid
++ cat /var/gerrit/logs/gerrit.pid
+ PID=40
+ ps -p 40
+ return 0
+ test 86 -gt 0
++ cat /var/gerrit/logs/gerrit.run
+ test x1510296608.14 = x
+ sleep 2
...
++ expr 2 - 2
+ TIMEOUT=0
+ running /var/gerrit/logs/gerrit.pid
+ test -f /var/gerrit/logs/gerrit.pid
++ cat /var/gerrit/logs/gerrit.pid
+ PID=1387
+ ps -p 1387
+ return 0
+ test 0 -gt 0
+ echo FAILED
FAILED
+ exit 1
+ exit 1

error_log

bash-4.2$ cat error_log 
[2017-08-24 06:05:31,197] [main] WARN  com.google.gerrit.sshd.SshDaemon : Cannot format SSHD host key [EdDSA]: invalid key type
[2017-08-24 06:05:31,218] [main] WARN  com.google.gerrit.server.config.GitwebCgiConfig : gitweb not installed (no /usr/lib/cgi-bin/gitweb.cgi found)
[2017-08-24 06:05:33,759] [main] INFO  org.eclipse.jetty.util.log : Logging initialized @28299ms
[2017-08-24 06:05:34,083] [main] INFO  com.google.gerrit.server.git.LocalDiskRepositoryManager : Defaulting core.streamFileThreshold to 633m
[2017-08-24 06:05:34,258] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loading plugins from /var/gerrit/plugins
[2017-08-24 06:05:34,884] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin avatars-gravatar, version ab2ff52
[2017-08-24 06:05:35,012] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin commit-message-length-validator, version v2.14.3
[2017-08-24 06:05:35,541] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin delete-project, version v2.13-19-g503e16b
[2017-08-24 06:05:35,703] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin download-commands, version v2.14.3
[2017-08-24 06:05:35,820] [main] INFO  com.google.gerrit.server.config.PluginConfigFactory : No /var/gerrit/etc/gitiles.config; assuming defaults
[2017-08-24 06:05:35,912] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin gitiles, version 9854f68
[2017-08-24 06:05:36,256] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin hooks, version v2.14.3
[2017-08-24 06:05:36,447] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin plugin-manager, version v2.14-2-g1a2fc03
[2017-08-24 06:05:36,455] [plugin-manager-preloader] INFO  com.googlesource.gerrit.plugins.manager.OnStartStop : Start-up: pre-loading list of plugins from registry
[2017-08-24 06:05:37,912] [main] WARN  com.googlesource.gerrit.plugins.replication.ReplicationFileBasedConfig : Config file /var/gerrit/etc/replication.config does not exist; not replicating
[2017-08-24 06:05:37,915] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin replication, version v2.14.3
[2017-08-24 06:05:38,098] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin reviewnotes, version v2.14.3
[2017-08-24 06:05:38,192] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin singleusergroup, version v2.14.3
[2017-08-24 06:05:39,295] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin uploadvalidator, version 5a674b7
[2017-08-24 06:05:41,763] [main] INFO  com.google.gerrit.server.change.ChangeCleanupRunner : Ignoring missing changeCleanup schedule configuration
[2017-08-24 06:05:41,874] [main] INFO  com.google.gerrit.sshd.SshDaemon : Started Gerrit SSHD-CORE-1.4.0 on *:29418
[2017-08-24 06:05:41,881] [main] INFO  org.eclipse.jetty.server.Server : jetty-9.3.17.v20170317
[2017-08-24 06:05:45,207] [main] INFO  com.googlesource.gerrit.plugins.gitiles.HttpModule : No /var/gerrit/etc/gitiles.config; assuming defaults
[2017-08-24 06:05:46,626] [main] INFO  org.eclipse.jetty.server.handler.ContextHandler : Started o.e.j.s.ServletContextHandler@66d6e50b{/,null,AVAILABLE}
[2017-08-24 06:05:46,695] [main] INFO  org.eclipse.jetty.server.AbstractConnector : Started ServerConnector@e88e14{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
[2017-08-24 06:05:46,696] [main] INFO  org.eclipse.jetty.server.Server : Started @41238ms
[2017-08-24 06:05:46,698] [main] INFO  com.google.gerrit.pgm.Daemon : Gerrit Code Review 2.14.3 ready

another error_log

[2017-11-10 08:55:02,033] [main] WARN  com.google.gerrit.sshd.SshDaemon : Cannot format SSHD host key [EdDSA]: invalid key type
[2017-11-10 08:55:02,050] [main] WARN  com.google.gerrit.server.config.GitwebCgiConfig : gitweb not installed (no /usr/lib/cgi-bin/gitweb.cgi found)
[2017-11-10 08:55:03,148] [main] INFO  org.eclipse.jetty.util.log : Logging initialized @171417ms
[2017-11-10 08:55:03,282] [main] INFO  com.google.gerrit.server.git.LocalDiskRepositoryManager : Defaulting core.streamFileThreshold to 426m
[2017-11-10 08:55:03,304] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_avatars-gravatar_170824_0605_2266093050102701493.jar
[2017-11-10 08:55:03,304] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_commit-message-length-validator_170824_0605_939743646832275683.jar
[2017-11-10 08:55:03,304] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_delete-project_170824_0605_8295814611435026434.jar
[2017-11-10 08:55:03,305] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_download-commands_170824_0605_5820818259630012786.jar
[2017-11-10 08:55:03,305] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_gitiles_170824_0605_3822531067208381504.jar
[2017-11-10 08:55:03,305] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_hooks_170824_0605_7544516862122494227.jar
[2017-11-10 08:55:03,305] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_plugin-manager_170824_0605_1006709771456578132.jar
[2017-11-10 08:55:03,305] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_replication_170824_0605_6386487025420801383.jar
[2017-11-10 08:55:03,305] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_reviewnotes_170824_0605_1179027679175833963.jar
[2017-11-10 08:55:03,305] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_singleusergroup_170824_0605_2513915462988414572.jar
[2017-11-10 08:55:03,306] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_uploadvalidator_170824_0605_3121779818680933941.jar
[2017-11-10 08:55:03,306] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loading plugins from /var/gerrit/plugins
[2017-11-10 08:55:03,394] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin avatars-gravatar, version ab2ff52
[2017-11-10 08:55:03,435] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin commit-message-length-validator, version v2.14.3
[2017-11-10 08:55:03,516] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin delete-project, version v2.13-19-g503e16b
[2017-11-10 08:55:03,570] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin download-commands, version v2.14.3
[2017-11-10 08:55:03,608] [main] INFO  com.google.gerrit.server.config.PluginConfigFactory : No /var/gerrit/etc/gitiles.config; assuming defaults
[2017-11-10 08:55:03,636] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin gitiles, version 9854f68
[2017-11-10 08:55:03,707] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin hooks, version v2.14.3
[2017-11-10 08:55:03,783] [plugin-manager-preloader] INFO  com.googlesource.gerrit.plugins.manager.OnStartStop : Start-up: pre-loading list of plugins from registry
[2017-11-10 08:55:03,783] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin plugin-manager, version v2.14-2-g1a2fc03
[2017-11-10 08:55:03,881] [main] WARN  com.googlesource.gerrit.plugins.replication.ReplicationFileBasedConfig : Config file /var/gerrit/etc/replication.config does not exist; not replicating
[2017-11-10 08:55:03,898] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin replication, version v2.14.3
[2017-11-10 08:55:03,996] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin reviewnotes, version v2.14.3
[2017-11-10 08:55:04,028] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin singleusergroup, version v2.14.3
[2017-11-10 08:55:04,145] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin uploadvalidator, version 5a674b7
[2017-11-10 08:55:06,696] [main] INFO  com.google.gerrit.server.change.ChangeCleanupRunner : Ignoring missing changeCleanup schedule configuration
[2017-11-10 08:55:06,734] [main] INFO  com.google.gerrit.sshd.SshDaemon : Started Gerrit SSHD-CORE-1.4.0 on *:29418
[2017-11-10 08:55:06,737] [main] INFO  org.eclipse.jetty.server.Server : jetty-9.3.17.v20170317
[2017-11-10 08:55:07,094] [main] INFO  com.googlesource.gerrit.plugins.gitiles.HttpModule : No /var/gerrit/etc/gitiles.config; assuming defaults
[2017-11-10 08:55:07,395] [main] INFO  org.eclipse.jetty.server.handler.ContextHandler : Started o.e.j.s.ServletContextHandler@7d2be319{/,null,AVAILABLE}
[2017-11-10 08:55:07,404] [main] INFO  org.eclipse.jetty.server.AbstractConnector : Started ServerConnector@4edde05c{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
[2017-11-10 08:55:07,405] [main] INFO  org.eclipse.jetty.server.Server : Started @175675ms
[2017-11-10 08:55:07,412] [main] INFO  com.google.gerrit.pgm.Daemon : Gerrit Code Review 2.14.3 ready
[2017-11-10 08:56:04,732] [plugin-manager-preloader] INFO  com.googlesource.gerrit.plugins.manager.OnStartStop : 60 plugins successfully pre-loaded
[2017-11-10 08:56:23,396] [ShutdownCallback] INFO  com.google.gerrit.pgm.Daemon : caught shutdown, cleaning up
[2017-11-10 08:56:23,426] [ShutdownCallback] INFO  org.eclipse.jetty.server.AbstractConnector : Stopped ServerConnector@4edde05c{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
[2017-11-10 08:56:23,435] [ShutdownCallback] INFO  org.eclipse.jetty.server.handler.ContextHandler : Stopped o.e.j.s.ServletContextHandler@7d2be319{/,null,UNAVAILABLE}
[2017-11-10 08:56:23,476] [ShutdownCallback] INFO  com.google.gerrit.sshd.SshDaemon : Stopped Gerrit SSHD
thinkernel commented 7 years ago

It seems you submit the issue into the wrong project. This project has nothing to do with the gerritforge/gerrit-centos7 image.

thinkernel commented 7 years ago

The image related to this project is located on https://hub.docker.com/r/openfrontier/gerrit/

Honghe commented 7 years ago

Sorry :D