blob: cf6560b344ce7ccb6e2d06f20ccb59d07261b274 [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]
13 [--console-log]
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +020014 [--replica]
Michael Ochmanna8434612016-07-08 10:58:27 +020015 [--headless]
16 [--init]
17 [-s]
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080018--
Brad Larsonaeb69182009-09-04 23:12:15 -050019
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080020== DESCRIPTION
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -080021Runs the Gerrit network daemon on the local system, configured as
Dave Borowitzd7a86c72018-12-18 13:12:38 -080022per the local copy of link:config-gerrit.html[gerrit.config] located under
23`<SITE_PATH>/etc`.
Brad Larsonaeb69182009-09-04 23:12:15 -050024
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080025== OPTIONS
Brad Larsonaeb69182009-09-04 23:12:15 -050026
Shawn O. Pearcec5e7a492009-11-12 21:03:43 -080027-d::
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080028--site-path::
Shawn O. Pearcec5e7a492009-11-12 21:03:43 -080029 Location of the gerrit.config file, and all other per-site
Edwin Kempinf1acbb82011-09-15 12:49:42 +020030 configuration data, supporting libraries and log files.
Shawn O. Pearcec5e7a492009-11-12 21:03:43 -080031
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080032--enable-httpd::
33--disable-httpd::
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -080034 Enable (or disable) the internal HTTP daemon, answering
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +020035 web requests. Enabled by default when --replica is not used.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -080036
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080037--enable-sshd::
38--disable-sshd::
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -080039 Enable (or disable) the internal SSH daemon, answering SSH
40 clients and remotely executed commands. Enabled by default.
41
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +020042--replica::
43 Run in replica mode, permitting only read operations
Brad Larsonaeb69182009-09-04 23:12:15 -050044 by clients. Commands which modify state such as
Edwin Kempinf1acbb82011-09-15 12:49:42 +020045 link:cmd-receive-pack.html[receive-pack] (creates new changes
Nasser Grainawib9a50372010-08-10 07:57:47 -060046 or updates existing ones) or link:cmd-review.html[review]
Brad Larsonaeb69182009-09-04 23:12:15 -050047 (sets approve marks) are disabled.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -080048+
Hugo Arès045d8a32014-09-12 09:57:11 -040049This option automatically implies '--enable-sshd'.
Brad Larsonaeb69182009-09-04 23:12:15 -050050
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080051--console-log::
Thomas Draebing773777e2020-07-27 12:44:10 +020052 Send log messages to the console. Log files will still be written to
53 the error log file, if log.textLogging and/or log.jsonLogging is set to
54 'true'.
Shawn O. Pearcea9d39fc2009-11-12 17:56:19 -080055
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080056--headless::
Sasa Zivkov8681d9f2013-01-31 13:34:47 +010057 Don't start the default Gerrit UI. May be useful when Gerrit is
58 run with an alternative UI.
59
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080060--init::
Sasa Zivkovebd04982013-05-10 11:15:53 +020061 Run init before starting the daemon. This will create a new site or
62 upgrade an existing site.
63
David Pursehouse28e52372013-12-10 17:57:46 +090064--s::
Marcin Cieślaked612fb2012-04-17 16:24:34 +000065 Start link:dev-inspector.html[Gerrit Inspector] on the console, a
66 built-in interactive inspection environment to assist debugging and
67 troubleshooting of Gerrit code.
68+
69This options requires 'jython.jar' from the http://www.jython.org[Jython distribution]
70to be present in '$site_path/lib' directory.
71
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080072== CONTEXT
Brad Larsonaeb69182009-09-04 23:12:15 -050073This command can only be run on a server which has direct
74connectivity to the metadata database, and local access to the
75managed Git repositories.
76
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080077== LOGGING
Shawn O. Pearcea9d39fc2009-11-12 17:56:19 -080078Error and warning messages from the server are automatically written
79to the log file under '$site_path/logs/error_log'. This log file
80is automatically rotated at 12:00 AM GMT each day, allowing an
81external log cleaning service to clean up the prior logs.
82
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080083== KNOWN ISSUES
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +020084Replica daemon caches can quickly become out of date when modifications
Matthias Sohnd8182ba2019-12-09 14:50:23 +010085are made on the primary node. The following configuration is suggested in
Han-Wen Nienhuys348a6032019-09-24 19:44:57 +020086a replica to reduce the maxAge for each cache entry, so that changes
Brad Larsonaeb69182009-09-04 23:12:15 -050087are recognized in a reasonable period of time:
88
89----
90[cache "accounts"]
91 maxAge = 5 min
Brad Larsonaeb69182009-09-04 23:12:15 -050092[cache "diff"]
93 maxAge = 5 min
94[cache "groups"]
95 maxAge = 5 min
96[cache "projects"]
97 maxAge = 5 min
98[cache "sshkeys"]
99 maxAge = 5 min
100----
101
102and if LDAP support was enabled, also include:
103----
104[cache "ldap_groups"]
105 maxAge = 5 min
106[cache "ldap_usernames"]
107 maxAge = 5 min
108----
109
Matthias Sohnd8182ba2019-12-09 14:50:23 +0100110Automatic cache coherency between primary and replica systems is
Brad Larsonaeb69182009-09-04 23:12:15 -0500111planned to be implemented in a future version.
112
113GERRIT
114------
115Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -0700116
117SEARCHBOX
118---------