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 |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 7 | -- |
Shawn O. Pearce | c5e7a49 | 2009-11-12 21:03:43 -0800 | [diff] [blame] | 8 | 'java' -jar gerrit.war 'daemon' |
| 9 | -d <SITE_PATH> |
Yuxuan 'fishy' Wang | 77e1508 | 2013-12-09 15:43:25 -0800 | [diff] [blame] | 10 | [--enable-httpd | --disable-httpd] |
| 11 | [--enable-sshd | --disable-sshd] |
| 12 | [--console-log] |
| 13 | [--slave] |
| 14 | [--headless] |
| 15 | [--init] |
Marcin Cieślak | ed612fb | 2012-04-17 16:24:34 +0000 | [diff] [blame] | 16 | [-s] |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 17 | -- |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 18 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 19 | == DESCRIPTION |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 20 | Runs the Gerrit network daemon on the local system, configured as |
| 21 | per the local copy of link:config-gerrit.html[gerrit.config]. |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 22 | |
| 23 | The path to gerrit.config is read from the metadata database, |
| 24 | which requires that all slaves (and master) reading from the same |
| 25 | database must place gerrit.config at the same location on the local |
| 26 | filesystem. However, any option within gerrit.config, including |
| 27 | link:config-gerrit.html#gerrit.basePath[gerrit.basePath] may be set |
| 28 | to different values. |
| 29 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 30 | == OPTIONS |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 31 | |
Shawn O. Pearce | c5e7a49 | 2009-11-12 21:03:43 -0800 | [diff] [blame] | 32 | -d:: |
Yuxuan 'fishy' Wang | 77e1508 | 2013-12-09 15:43:25 -0800 | [diff] [blame] | 33 | --site-path:: |
Shawn O. Pearce | c5e7a49 | 2009-11-12 21:03:43 -0800 | [diff] [blame] | 34 | Location of the gerrit.config file, and all other per-site |
Edwin Kempin | f1acbb8 | 2011-09-15 12:49:42 +0200 | [diff] [blame] | 35 | configuration data, supporting libraries and log files. |
Shawn O. Pearce | c5e7a49 | 2009-11-12 21:03:43 -0800 | [diff] [blame] | 36 | |
Yuxuan 'fishy' Wang | 77e1508 | 2013-12-09 15:43:25 -0800 | [diff] [blame] | 37 | --enable-httpd:: |
| 38 | --disable-httpd:: |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 39 | Enable (or disable) the internal HTTP daemon, answering |
Hugo Arès | 045d8a3 | 2014-09-12 09:57:11 -0400 | [diff] [blame] | 40 | web requests. Enabled by default when --slave is not used. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 41 | |
Yuxuan 'fishy' Wang | 77e1508 | 2013-12-09 15:43:25 -0800 | [diff] [blame] | 42 | --enable-sshd:: |
| 43 | --disable-sshd:: |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 44 | Enable (or disable) the internal SSH daemon, answering SSH |
| 45 | clients and remotely executed commands. Enabled by default. |
| 46 | |
Yuxuan 'fishy' Wang | 77e1508 | 2013-12-09 15:43:25 -0800 | [diff] [blame] | 47 | --slave:: |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 48 | Run in slave mode, permitting only read operations |
| 49 | by clients. Commands which modify state such as |
Edwin Kempin | f1acbb8 | 2011-09-15 12:49:42 +0200 | [diff] [blame] | 50 | link:cmd-receive-pack.html[receive-pack] (creates new changes |
Nasser Grainawi | b9a5037 | 2010-08-10 07:57:47 -0600 | [diff] [blame] | 51 | or updates existing ones) or link:cmd-review.html[review] |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 52 | (sets approve marks) are disabled. |
Shawn O. Pearce | fa2486a | 2009-11-11 14:51:30 -0800 | [diff] [blame] | 53 | + |
Hugo Arès | 045d8a3 | 2014-09-12 09:57:11 -0400 | [diff] [blame] | 54 | This option automatically implies '--enable-sshd'. |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 55 | |
Yuxuan 'fishy' Wang | 77e1508 | 2013-12-09 15:43:25 -0800 | [diff] [blame] | 56 | --console-log:: |
Shawn O. Pearce | a9d39fc | 2009-11-12 17:56:19 -0800 | [diff] [blame] | 57 | Send log messages to the console, instead of to the standard |
| 58 | log file '$site_path/logs/error_log'. |
| 59 | |
Yuxuan 'fishy' Wang | 77e1508 | 2013-12-09 15:43:25 -0800 | [diff] [blame] | 60 | --headless:: |
Sasa Zivkov | 8681d9f | 2013-01-31 13:34:47 +0100 | [diff] [blame] | 61 | Don't start the default Gerrit UI. May be useful when Gerrit is |
| 62 | run with an alternative UI. |
| 63 | |
Yuxuan 'fishy' Wang | 77e1508 | 2013-12-09 15:43:25 -0800 | [diff] [blame] | 64 | --init:: |
Sasa Zivkov | ebd0498 | 2013-05-10 11:15:53 +0200 | [diff] [blame] | 65 | Run init before starting the daemon. This will create a new site or |
| 66 | upgrade an existing site. |
| 67 | |
David Pursehouse | 28e5237 | 2013-12-10 17:57:46 +0900 | [diff] [blame] | 68 | --s:: |
Marcin Cieślak | ed612fb | 2012-04-17 16:24:34 +0000 | [diff] [blame] | 69 | 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 | + |
| 73 | This options requires 'jython.jar' from the http://www.jython.org[Jython distribution] |
| 74 | to be present in '$site_path/lib' directory. |
| 75 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 76 | == CONTEXT |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 77 | This command can only be run on a server which has direct |
| 78 | connectivity to the metadata database, and local access to the |
| 79 | managed Git repositories. |
| 80 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 81 | == LOGGING |
Shawn O. Pearce | a9d39fc | 2009-11-12 17:56:19 -0800 | [diff] [blame] | 82 | Error and warning messages from the server are automatically written |
| 83 | to the log file under '$site_path/logs/error_log'. This log file |
| 84 | is automatically rotated at 12:00 AM GMT each day, allowing an |
| 85 | external log cleaning service to clean up the prior logs. |
| 86 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 87 | == KNOWN ISSUES |
Brad Larson | aeb6918 | 2009-09-04 23:12:15 -0500 | [diff] [blame] | 88 | Slave daemon caches can quickly become out of date when modifications |
| 89 | are made on the master. The following configuration is suggested in |
| 90 | a slave to reduce the maxAge for each cache entry, so that changes |
| 91 | are 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 | |
| 108 | and 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 | |
| 116 | Automatic cache coherency between master and slave systems is |
| 117 | planned to be implemented in a future version. |
| 118 | |
| 119 | GERRIT |
| 120 | ------ |
| 121 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 122 | |
| 123 | SEARCHBOX |
| 124 | --------- |