Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1 | = daemon |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 2 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3 | == NAME |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 4 | daemon - Gerrit network server |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 5 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6 | == SYNOPSIS |
Michael Ochmann | a843461 | 2016-07-08 10:58:27 +0200 | [diff] [blame] | 7 | [verse] |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 8 | -- |
Michael Ochmann | a843461 | 2016-07-08 10:58:27 +0200 | [diff] [blame] | 9 | _java_ -jar gerrit.war _daemon_ |
| 10 | -d <SITE_PATH> |
| 11 | [--enable-httpd | --disable-httpd] |
| 12 | [--enable-sshd | --disable-sshd] |
| 13 | [--console-log] |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 14 | [--replica] |
Michael Ochmann | a843461 | 2016-07-08 10:58:27 +0200 | [diff] [blame] | 15 | [--headless] |
| 16 | [--init] |
| 17 | [-s] |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 18 | -- |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 19 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 20 | == DESCRIPTION |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 21 | Runs the Gerrit network daemon on the local system, configured as |
Dave Borowitz | d7a86c7 | 2018-12-18 13:12:38 -0800 | [diff] [blame] | 22 | per the local copy of link:config-gerrit.html[gerrit.config] located under |
| 23 | `<SITE_PATH>/etc`. |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 24 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 25 | == OPTIONS |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 26 | |
Shawn O. Pearce | c5e7a49 | 2009-11-12 21:03:43 -0800 | [diff] [blame] | 27 | -d:: |
Yuxuan 'fishy' Wang | 77e1508 | 2013-12-09 15:43:25 -0800 | [diff] [blame] | 28 | --site-path:: |
Shawn O. Pearce | c5e7a49 | 2009-11-12 21:03:43 -0800 | [diff] [blame] | 29 | Location of the gerrit.config file, and all other per-site |
Edwin Kempin | f1acbb8 | 2011-09-15 12:49:42 +0200 | [diff] [blame] | 30 | configuration data, supporting libraries and log files. |
Shawn O. Pearce | c5e7a49 | 2009-11-12 21:03:43 -0800 | [diff] [blame] | 31 | |
Yuxuan 'fishy' Wang | 77e1508 | 2013-12-09 15:43:25 -0800 | [diff] [blame] | 32 | --enable-httpd:: |
| 33 | --disable-httpd:: |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 34 | Enable (or disable) the internal HTTP daemon, answering |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 35 | web requests. Enabled by default when --replica is not used. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 36 | |
Yuxuan 'fishy' Wang | 77e1508 | 2013-12-09 15:43:25 -0800 | [diff] [blame] | 37 | --enable-sshd:: |
| 38 | --disable-sshd:: |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 39 | Enable (or disable) the internal SSH daemon, answering SSH |
| 40 | clients and remotely executed commands. Enabled by default. |
| 41 | |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 42 | --replica:: |
| 43 | Run in replica mode, permitting only read operations |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 44 | by clients. Commands which modify state such as |
Edwin Kempin | f1acbb8 | 2011-09-15 12:49:42 +0200 | [diff] [blame] | 45 | link:cmd-receive-pack.html[receive-pack] (creates new changes |
Nasser Grainawi | b9a5037 | 2010-08-10 07:57:47 -0600 | [diff] [blame] | 46 | or updates existing ones) or link:cmd-review.html[review] |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 47 | (sets approve marks) are disabled. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 48 | + |
Hugo Arès | 045d8a3 | 2014-09-12 09:57:11 -0400 | [diff] [blame] | 49 | This option automatically implies '--enable-sshd'. |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 50 | |
Yuxuan 'fishy' Wang | 77e1508 | 2013-12-09 15:43:25 -0800 | [diff] [blame] | 51 | --console-log:: |
Thomas Draebing | 773777e | 2020-07-27 12:44:10 +0200 | [diff] [blame] | 52 | 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. Pearce | a9d39fc | 2009-11-12 17:56:19 -0800 | [diff] [blame] | 55 | |
Yuxuan 'fishy' Wang | 77e1508 | 2013-12-09 15:43:25 -0800 | [diff] [blame] | 56 | --headless:: |
Sasa Zivkov | 8681d9f | 2013-01-31 13:34:47 +0100 | [diff] [blame] | 57 | Don't start the default Gerrit UI. May be useful when Gerrit is |
| 58 | run with an alternative UI. |
| 59 | |
Yuxuan 'fishy' Wang | 77e1508 | 2013-12-09 15:43:25 -0800 | [diff] [blame] | 60 | --init:: |
Sasa Zivkov | ebd0498 | 2013-05-10 11:15:53 +0200 | [diff] [blame] | 61 | Run init before starting the daemon. This will create a new site or |
| 62 | upgrade an existing site. |
| 63 | |
David Pursehouse | 28e5237 | 2013-12-10 17:57:46 +0900 | [diff] [blame] | 64 | --s:: |
Marcin Cieślak | ed612fb | 2012-04-17 16:24:34 +0000 | [diff] [blame] | 65 | 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 | + |
| 69 | This options requires 'jython.jar' from the http://www.jython.org[Jython distribution] |
| 70 | to be present in '$site_path/lib' directory. |
| 71 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 72 | == CONTEXT |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 73 | This command can only be run on a server which has direct |
| 74 | connectivity to the metadata database, and local access to the |
| 75 | managed Git repositories. |
| 76 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 77 | == LOGGING |
Shawn O. Pearce | a9d39fc | 2009-11-12 17:56:19 -0800 | [diff] [blame] | 78 | Error and warning messages from the server are automatically written |
| 79 | to the log file under '$site_path/logs/error_log'. This log file |
| 80 | is automatically rotated at 12:00 AM GMT each day, allowing an |
| 81 | external log cleaning service to clean up the prior logs. |
| 82 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 83 | == KNOWN ISSUES |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 84 | Replica daemon caches can quickly become out of date when modifications |
Matthias Sohn | d8182ba | 2019-12-09 14:50:23 +0100 | [diff] [blame] | 85 | are made on the primary node. The following configuration is suggested in |
Han-Wen Nienhuys | 348a603 | 2019-09-24 19:44:57 +0200 | [diff] [blame] | 86 | a replica to reduce the maxAge for each cache entry, so that changes |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 87 | are recognized in a reasonable period of time: |
| 88 | |
| 89 | ---- |
| 90 | [cache "accounts"] |
| 91 | maxAge = 5 min |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 92 | [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 | |
| 102 | and 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 Sohn | d8182ba | 2019-12-09 14:50:23 +0100 | [diff] [blame] | 110 | Automatic cache coherency between primary and replica systems is |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 111 | planned to be implemented in a future version. |
| 112 | |
| 113 | GERRIT |
| 114 | ------ |
| 115 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 116 | |
| 117 | SEARCHBOX |
| 118 | --------- |