daemon - Gerrit network server
java -jar gerrit.war daemon -d <SITE_PATH> [--enable-httpd | --disable-httpd] [--enable-sshd | --disable-sshd] [--debug] [--debug-port] [--debug_address] [--suspend] [--console-log] [--replica] [--headless] [--init] [-s]
Runs the Gerrit network daemon on the local system, configured as
per the local copy of gerrit.config located under
Location of the gerrit.config file, and all other per-site configuration data, supporting libraries and log files.
Enable (or disable) the internal HTTP daemon, answering web requests. Enabled by default when --replica is not used.
Enable (or disable) the internal SSH daemon, answering SSH clients and remotely executed commands. Enabled by default.
Start JVM in debug mode.
--debug_address: Specify which JVM debug port/address to use. The default debug address is 8000.
Start JVM debug in suspended mode. The JVM will await for a debugger to attach before proceeding with the start.
Run in replica mode, permitting only read operations by clients. Commands which modify state such as receive-pack (creates new changes or updates existing ones) or review (sets approve marks) are disabled.
This option automatically implies '--enable-sshd'.
Send log messages to the console. Log files will still be written to the error log file, if log.textLogging and/or log.jsonLogging is set to 'true'.
Don’t start the default Gerrit UI. May be useful when Gerrit is run with an alternative UI.
Run init before starting the daemon. This will create a new site or upgrade an existing site.
Start Gerrit Inspector on the console, a built-in interactive inspection environment to assist debugging and troubleshooting of Gerrit code.
This options requires 'jython.jar' from the Jython distribution to be present in '$site_path/lib' directory.
This command can only be run on a server which has direct connectivity to the metadata database, and local access to the managed Git repositories.
Error and warning messages from the server are automatically written to the log file under '$site_path/logs/error_log'. This log file is automatically rotated at 12:00 AM GMT each day, allowing an external log cleaning service to clean up the prior logs.
Replica daemon caches can quickly become out of date when modifications are made on the primary node. The following configuration is suggested in a replica to reduce the maxAge for each cache entry, so that changes are recognized in a reasonable period of time:
[cache "accounts"] maxAge = 5 min [cache "diff"] maxAge = 5 min [cache "groups"] maxAge = 5 min [cache "projects"] maxAge = 5 min [cache "sshkeys"] maxAge = 5 min
and if LDAP support was enabled, also include:
[cache "ldap_groups"] maxAge = 5 min [cache "ldap_usernames"] maxAge = 5 min
Automatic cache coherency between primary and replica systems is planned to be implemented in a future version.
Part of Gerrit Code Review