此设置已在运行并且工作正常。但是发生了什么:也许某些软件包已更新,某些文件已损坏或网络更改将其破坏。
命令bin/gerrit.sh start
返回Starting Gerrit Code Review: FAILED
。
日志/错误日志:
[2018-11-28 11:49:01,135] [main] WARN com.google.gerrit.sshd.SshDaemon : Disabling cipher aes192-ctr: Unable to initialize cipher BaseCipher[AES,16,24,AES/CTR/NoPadding]
[2018-11-28 11:49:01,135] [main] WARN com.google.gerrit.sshd.SshDaemon : Disabling cipher aes256-ctr: Unable to initialize cipher BaseCipher[AES,16,32,AES/CTR/NoPadding]
[2018-11-28 11:49:01,138] [main] WARN com.google.gerrit.sshd.SshDaemon : Disabling cipher arcfour256: Illegal key size or default parameters; try installing unlimited cryptography extension
[2018-11-28 11:49:01,145] [main] WARN com.google.gerrit.sshd.SshDaemon : Disabling cipher aes192-cbc: Unable to initialize cipher BaseCipher[AES,16,24,AES/CBC/NoPadding]
[2018-11-28 11:49:01,145] [main] WARN com.google.gerrit.sshd.SshDaemon : Disabling cipher aes256-cbc: Unable to initialize cipher BaseCipher[AES,16,32,AES/CBC/NoPadding]
[2018-11-28 11:49:01,214] [main] WARN com.google.gerrit.sshd.SshDaemon : Cannot format SSHD host key [EdDSA]: invalid key type
[2018-11-28 11:49:01,227] [main] WARN com.google.gerrit.server.config.GitwebCgiConfig : gitweb not installed (no /usr/lib/cgi-bin/gitweb.cgi found)
[2018-11-28 11:49:02,025] [main] INFO org.eclipse.jetty.util.log : Logging initialized @8689ms
[2018-11-28 11:49:02,102] [main] INFO com.google.gerrit.server.git.LocalDiskRepositoryManager : Defaulting core.streamFileThreshold to 332m
[2018-11-28 11:49:02,121] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_hooks_181128_1116_5514078957117773811.jar
[2018-11-28 11:49:02,121] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_events-log_181128_1116_8975419966674917654.jar
[2018-11-28 11:49:02,122] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_download-commands_181128_1116_7149912149640119287.jar
[2018-11-28 11:49:02,122] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_replication_181128_1116_3000551844744811569.jar
[2018-11-28 11:49:02,122] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_commit-message-length-validator_181128_1116_2800985912637941647.jar
[2018-11-28 11:49:02,122] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_reviewnotes_181128_1116_1435979824854811361.jar
[2018-11-28 11:49:02,122] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_singleusergroup_181128_1116_4944938881709642049.jar
[2018-11-28 11:49:02,122] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Loading plugins from /home/gerrit/gerrit_testsite/plugins
[2018-11-28 11:49:02,199] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Loaded plugin commit-message-length-validator, version v2.14.2
[2018-11-28 11:49:02,250] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Loaded plugin download-commands, version v2.14.2
[2018-11-28 11:49:02,484] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Loaded plugin events-log, version e271462
[2018-11-28 11:49:02,550] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Loaded plugin hooks, version v2.14.2
[2018-11-28 11:49:02,638] [main] WARN com.googlesource.gerrit.plugins.replication.ReplicationFileBasedConfig : Config file /home/gerrit/gerrit_testsite/etc/replication.config does not exist; not replicating
[2018-11-28 11:49:02,641] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Loaded plugin replication, version v2.14.2
[2018-11-28 11:49:02,697] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Loaded plugin reviewnotes, version v2.14.2
[2018-11-28 11:49:02,736] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Loaded plugin singleusergroup, version v2.14.2
[2018-11-28 11:49:02,975] [main] INFO com.google.gerrit.server.change.ChangeCleanupRunner : Ignoring missing changeCleanup schedule configuration
[2018-11-28 11:49:02,998] [main] INFO com.google.gerrit.sshd.SshDaemon : Started Gerrit SSHD-CORE-1.4.0 on *:29419
[2018-11-28 11:49:03,002] [main] INFO org.eclipse.jetty.server.Server : jetty-9.3.17.v20170317
[2018-11-28 11:49:03,787] [main] INFO org.eclipse.jetty.server.handler.ContextHandler : Started o.e.j.s.ServletContextHandler@384cd83a{/r,null,AVAILABLE}
[2018-11-28 11:49:43,834] [main] ERROR com.google.gerrit.pgm.Daemon : Unable to start daemon
java.lang.IllegalStateException: Cannot start HTTP daemon
at com.google.gerrit.pgm.http.jetty.JettyServer$Lifecycle.start(JettyServer.java:106)
at com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:92)
at com.google.gerrit.pgm.Daemon.start(Daemon.java:323)
at com.google.gerrit.pgm.Daemon.run(Daemon.java:232)
at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:204)
at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:108)
at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:63)
at Main.main(Main.java:24)
Caused by: java.net.SocketException: Unresolved address
at sun.nio.ch.Net.translateToSocketException(Net.java:131)
at sun.nio.ch.Net.translateException(Net.java:157)
at sun.nio.ch.Net.translateException(Net.java:163)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:76)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:317)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:235)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:401)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at com.google.gerrit.pgm.http.jetty.JettyServer$Lifecycle.start(JettyServer.java:92)
... 12 more
Caused by: java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Net.java:101)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:218)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
... 19 more
下面列出了配置文件,我们使用LDAP服务器进行身份验证:
[gerrit]
basePath = git
serverId = c3094920-33f3-4219-82cf-0181f4f0c7e7
canonicalWebUrl = http://oururl/r/
[database]
type = h2
database = /home/gerrit/gerrit_testsite/db/ReviewDB
[index]
type = LUCENE
[auth]
type = ldap
gitBasicAuthPolicy = LDAP
[ldap]
server = ldap://ldapserver
accountBase = OU=Usuários Rede,DC=company,DC=com,DC=br
groupBase = OU=Grupos,DC=company,DC=com,DC=br
referral = follow
accountPattern = (mailNickname=${username})
groupPattern = (memberOf=${cn})
accountFullName = cn
accountEmailAddress = mail
localUsernameToLowerCase = true
accountSshUserName = cn
username = ldapread@company.com.br
password = pass
[receive]
enableSignedPush = false
[sendemail]
smtpServer = mail.company.com.br
smtpServerPort = 587
smtpEncryption = tls
sslVerify = false
allowedDomain = company.com.br
smtpUser = gerrit@company.com.br
smtpPass = pass
[container]
user = gerrit
javaHome = /usr/lib/jvm/java-8-oracle/jre
[sshd]
listenAddress = *:29419
[httpd]
listenUrl = http://engenharia.company.com.br:8888/r/
[cache]
directory = cache
[download]
command = checkout
command = cherry_pick
command = format_patch
command = pull
scheme = ssh
[capability]
accessDatabase = group Administrators
[plugins]
allowRemoteAdmin = true
[plugin "events-log"]
storeUrl = jdbc:h2:/tmp/db
我该怎么做才能调试问题? (我尚未完成Gerrit的设置和安装。)
答案 0 :(得分:0)
与Gerrit无关。
禁用网络更改的Gerrit。更改Gerrit机器的DNS服务器和网关后,一切都会恢复正常。