blob: bcf2b1b72284cbde020ad633a22d78d2c0a93ca5 [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
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08007--
Shawn O. Pearcec5e7a492009-11-12 21:03:43 -08008'java' -jar gerrit.war 'daemon'
9 -d <SITE_PATH>
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080010 [--enable-httpd | --disable-httpd]
11 [--enable-sshd | --disable-sshd]
12 [--console-log]
13 [--slave]
14 [--headless]
15 [--init]
Marcin Cieślaked612fb2012-04-17 16:24:34 +000016 [-s]
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080017--
Brad Larsonaeb69182009-09-04 23:12:15 -050018
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080019== DESCRIPTION
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -080020Runs the Gerrit network daemon on the local system, configured as
21per the local copy of link:config-gerrit.html[gerrit.config].
Brad Larsonaeb69182009-09-04 23:12:15 -050022
23The path to gerrit.config is read from the metadata database,
24which requires that all slaves (and master) reading from the same
25database must place gerrit.config at the same location on the local
26filesystem. However, any option within gerrit.config, including
27link:config-gerrit.html#gerrit.basePath[gerrit.basePath] may be set
28to different values.
29
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080030== OPTIONS
Brad Larsonaeb69182009-09-04 23:12:15 -050031
Shawn O. Pearcec5e7a492009-11-12 21:03:43 -080032-d::
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080033--site-path::
Shawn O. Pearcec5e7a492009-11-12 21:03:43 -080034 Location of the gerrit.config file, and all other per-site
Edwin Kempinf1acbb82011-09-15 12:49:42 +020035 configuration data, supporting libraries and log files.
Shawn O. Pearcec5e7a492009-11-12 21:03:43 -080036
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080037--enable-httpd::
38--disable-httpd::
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -080039 Enable (or disable) the internal HTTP daemon, answering
Hugo Arès045d8a32014-09-12 09:57:11 -040040 web requests. Enabled by default when --slave is not used.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -080041
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080042--enable-sshd::
43--disable-sshd::
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -080044 Enable (or disable) the internal SSH daemon, answering SSH
45 clients and remotely executed commands. Enabled by default.
46
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080047--slave::
Brad Larsonaeb69182009-09-04 23:12:15 -050048 Run in slave mode, permitting only read operations
49 by clients. Commands which modify state such as
Edwin Kempinf1acbb82011-09-15 12:49:42 +020050 link:cmd-receive-pack.html[receive-pack] (creates new changes
Nasser Grainawib9a50372010-08-10 07:57:47 -060051 or updates existing ones) or link:cmd-review.html[review]
Brad Larsonaeb69182009-09-04 23:12:15 -050052 (sets approve marks) are disabled.
Shawn O. Pearcefa2486a2009-11-11 14:51:30 -080053+
Hugo Arès045d8a32014-09-12 09:57:11 -040054This option automatically implies '--enable-sshd'.
Brad Larsonaeb69182009-09-04 23:12:15 -050055
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080056--console-log::
Shawn O. Pearcea9d39fc2009-11-12 17:56:19 -080057 Send log messages to the console, instead of to the standard
58 log file '$site_path/logs/error_log'.
59
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080060--headless::
Sasa Zivkov8681d9f2013-01-31 13:34:47 +010061 Don't start the default Gerrit UI. May be useful when Gerrit is
62 run with an alternative UI.
63
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080064--init::
Sasa Zivkovebd04982013-05-10 11:15:53 +020065 Run init before starting the daemon. This will create a new site or
66 upgrade an existing site.
67
David Pursehouse28e52372013-12-10 17:57:46 +090068--s::
Marcin Cieślaked612fb2012-04-17 16:24:34 +000069 Start link:dev-inspector.html[Gerrit Inspector] on the console, a
70 built-in interactive inspection environment to assist debugging and
71 troubleshooting of Gerrit code.
72+
73This options requires 'jython.jar' from the http://www.jython.org[Jython distribution]
74to be present in '$site_path/lib' directory.
75
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080076== CONTEXT
Brad Larsonaeb69182009-09-04 23:12:15 -050077This command can only be run on a server which has direct
78connectivity to the metadata database, and local access to the
79managed Git repositories.
80
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080081== LOGGING
Shawn O. Pearcea9d39fc2009-11-12 17:56:19 -080082Error and warning messages from the server are automatically written
83to the log file under '$site_path/logs/error_log'. This log file
84is automatically rotated at 12:00 AM GMT each day, allowing an
85external log cleaning service to clean up the prior logs.
86
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080087== KNOWN ISSUES
Brad Larsonaeb69182009-09-04 23:12:15 -050088Slave daemon caches can quickly become out of date when modifications
89are made on the master. The following configuration is suggested in
90a slave to reduce the maxAge for each cache entry, so that changes
91are recognized in a reasonable period of time:
92
93----
94[cache "accounts"]
95 maxAge = 5 min
96[cache "accounts_byemail"]
97 maxAge = 5 min
98[cache "diff"]
99 maxAge = 5 min
100[cache "groups"]
101 maxAge = 5 min
102[cache "projects"]
103 maxAge = 5 min
104[cache "sshkeys"]
105 maxAge = 5 min
106----
107
108and if LDAP support was enabled, also include:
109----
110[cache "ldap_groups"]
111 maxAge = 5 min
112[cache "ldap_usernames"]
113 maxAge = 5 min
114----
115
116Automatic cache coherency between master and slave systems is
117planned to be implemented in a future version.
118
119GERRIT
120------
121Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -0700122
123SEARCHBOX
124---------