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