blob: 560fb925ff6c8e542ade8b6f078ad3ab3b61a795 [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= daemon
Brad Larsonaeb69182009-09-04 23:12:15 -05002
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003== NAME
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -08004daemon - Gerrit network server
Brad Larsonaeb69182009-09-04 23:12:15 -05005
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08006== SYNOPSIS
Michael Ochmanna8434612016-07-08 10:58:27 +02007[verse]
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08008--
Michael Ochmanna8434612016-07-08 10:58:27 +02009_java_ -jar gerrit.war _daemon_
10 -d <SITE_PATH>
11 [--enable-httpd | --disable-httpd]
12 [--enable-sshd | --disable-sshd]
Saša Živkovaebe7fe2022-04-29 12:14:10 +020013 [--debug]
14 [--debug-port]
15 [--debug_address]
16 [--suspend]
Michael Ochmanna8434612016-07-08 10:58:27 +020017 [--console-log]
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +020018 [--replica]
Michael Ochmanna8434612016-07-08 10:58:27 +020019 [--headless]
20 [--init]
21 [-s]
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080022--
Brad Larsonaeb69182009-09-04 23:12:15 -050023
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080024== DESCRIPTION
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -080025Runs the Gerrit network daemon on the local system, configured as
Dave Borowitzd7a86c72018-12-18 13:12:38 -080026per the local copy of link:config-gerrit.html[gerrit.config] located under
27`<SITE_PATH>/etc`.
Brad Larsonaeb69182009-09-04 23:12:15 -050028
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080029== OPTIONS
Brad Larsonaeb69182009-09-04 23:12:15 -050030
Shawn O. Pearcec5e7a492009-11-12 21:03:43 -080031-d::
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080032--site-path::
Shawn O. Pearcec5e7a492009-11-12 21:03:43 -080033 Location of the gerrit.config file, and all other per-site
Edwin Kempinf1acbb82011-09-15 12:49:42 +020034 configuration data, supporting libraries and log files.
Shawn O. Pearcec5e7a492009-11-12 21:03:43 -080035
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080036--enable-httpd::
37--disable-httpd::
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -080038 Enable (or disable) the internal HTTP daemon, answering
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +020039 web requests. Enabled by default when --replica is not used.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -080040
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080041--enable-sshd::
42--disable-sshd::
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -080043 Enable (or disable) the internal SSH daemon, answering SSH
44 clients and remotely executed commands. Enabled by default.
45
Saša Živkovaebe7fe2022-04-29 12:14:10 +020046--debug::
47 Start JVM in debug mode.
48
49--debug-port::
50--debug_address:
51 Specify which JVM debug port/address to use. The default debug address is 8000.
52
53--suspend::
54 Start JVM debug in suspended mode. The JVM will await for a debugger
55 to attach before proceeding with the start.
56
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +020057--replica::
58 Run in replica mode, permitting only read operations
Brad Larsonaeb69182009-09-04 23:12:15 -050059 by clients. Commands which modify state such as
Edwin Kempinf1acbb82011-09-15 12:49:42 +020060 link:cmd-receive-pack.html[receive-pack] (creates new changes
Nasser Grainawib9a50372010-08-10 07:57:47 -060061 or updates existing ones) or link:cmd-review.html[review]
Brad Larsonaeb69182009-09-04 23:12:15 -050062 (sets approve marks) are disabled.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -080063+
Hugo Arès045d8a32014-09-12 09:57:11 -040064This option automatically implies '--enable-sshd'.
Brad Larsonaeb69182009-09-04 23:12:15 -050065
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080066--console-log::
Thomas Draebing773777e2020-07-27 12:44:10 +020067 Send log messages to the console. Log files will still be written to
68 the error log file, if log.textLogging and/or log.jsonLogging is set to
69 'true'.
Shawn O. Pearcea9d39fc2009-11-12 17:56:19 -080070
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080071--headless::
Sasa Zivkov8681d9f2013-01-31 13:34:47 +010072 Don't start the default Gerrit UI. May be useful when Gerrit is
73 run with an alternative UI.
74
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080075--init::
Sasa Zivkovebd04982013-05-10 11:15:53 +020076 Run init before starting the daemon. This will create a new site or
77 upgrade an existing site.
78
Kenyon Ralphee62dc72021-10-27 17:44:45 -070079-s::
Marcin Cieślaked612fb2012-04-17 16:24:34 +000080 Start link:dev-inspector.html[Gerrit Inspector] on the console, a
81 built-in interactive inspection environment to assist debugging and
82 troubleshooting of Gerrit code.
83+
84This options requires 'jython.jar' from the http://www.jython.org[Jython distribution]
85to be present in '$site_path/lib' directory.
86
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080087== CONTEXT
Brad Larsonaeb69182009-09-04 23:12:15 -050088This command can only be run on a server which has direct
89connectivity to the metadata database, and local access to the
90managed Git repositories.
91
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080092== LOGGING
Shawn O. Pearcea9d39fc2009-11-12 17:56:19 -080093Error and warning messages from the server are automatically written
94to the log file under '$site_path/logs/error_log'. This log file
95is automatically rotated at 12:00 AM GMT each day, allowing an
96external log cleaning service to clean up the prior logs.
97
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080098== KNOWN ISSUES
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +020099Replica daemon caches can quickly become out of date when modifications
Matthias Sohnd8182ba2019-12-09 14:50:23 +0100100are made on the primary node. The following configuration is suggested in
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +0200101a replica to reduce the maxAge for each cache entry, so that changes
Brad Larsonaeb69182009-09-04 23:12:15 -0500102are recognized in a reasonable period of time:
103
104----
105[cache "accounts"]
106 maxAge = 5 min
Brad Larsonaeb69182009-09-04 23:12:15 -0500107[cache "diff"]
108 maxAge = 5 min
109[cache "groups"]
110 maxAge = 5 min
111[cache "projects"]
112 maxAge = 5 min
113[cache "sshkeys"]
114 maxAge = 5 min
115----
116
117and if LDAP support was enabled, also include:
118----
119[cache "ldap_groups"]
120 maxAge = 5 min
121[cache "ldap_usernames"]
122 maxAge = 5 min
123----
124
Matthias Sohnd8182ba2019-12-09 14:50:23 +0100125Automatic cache coherency between primary and replica systems is
Brad Larsonaeb69182009-09-04 23:12:15 -0500126planned to be implemented in a future version.
127
128GERRIT
129------
130Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -0700131
132SEARCHBOX
133---------