From 78a758364ec72a4ce18e1812b4a9dec80caf9217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wawrzyniec=20Niewodnicza=C5=84ski?= Date: Tue, 8 Jan 2019 15:20:17 +0000 Subject: [PATCH] Move commandline to own chapter - move commandline section to separate file - remove old way of passing Java options --- docs/source/corda-nodes-index.rst | 1 + docs/source/node-commandline.rst | 49 ++++++++++++++++++++++++++ docs/source/running-a-node.rst | 57 ------------------------------- 3 files changed, 50 insertions(+), 57 deletions(-) create mode 100644 docs/source/node-commandline.rst diff --git a/docs/source/corda-nodes-index.rst b/docs/source/corda-nodes-index.rst index 670f99aa23..fd7fe167d7 100644 --- a/docs/source/corda-nodes-index.rst +++ b/docs/source/corda-nodes-index.rst @@ -9,6 +9,7 @@ Nodes corda-configuration-file node-administration deploying-a-node + node-commandline docker-image node-database node-database-access-h2 diff --git a/docs/source/node-commandline.rst b/docs/source/node-commandline.rst new file mode 100644 index 0000000000..c390db6489 --- /dev/null +++ b/docs/source/node-commandline.rst @@ -0,0 +1,49 @@ +Node Command-line options +==================== + +The node can optionally be started with the following command-line options: + +* ``--base-directory``, ``-b``: The node working directory where all the files are kept (default: ``.``). +* ``--config-file``, ``-f``: The path to the config file. Defaults to ``node.conf``. +* ``--dev-mode``, ``-d``: Runs the node in development mode. Unsafe in production. Defaults to true on MacOS and desktop versions of Windows. False otherwise. +* ``--no-local-shell``, ``-n``: Do not start the embedded shell locally. +* ``--on-unknown-config-keys <[FAIL,INFO]>``: How to behave on unknown node configuration. Defaults to FAIL. +* ``--sshd``: Enables SSH server for node administration. +* ``--sshd-port``: Sets the port for the SSH server. If not supplied and SSH server is enabled, the port defaults to 2222. +* ``--verbose``, ``--log-to-console``, ``-v``: If set, prints logging to the console as well as to a file. +* ``--logging-level=``: Enable logging at this level and higher. Possible values: ERROR, WARN, INFO, DEBUG, TRACE. Default: INFO. +* ``--help``, ``-h``: Show this help message and exit. +* ``--version``, ``-V``: Print version information and exit. + +Sub-commands +------------ + +``clear-network-cache``: Clears local copy of network map, on node startup it will be restored from server or file system. + +``initial-registration``: Starts initial node registration with the compatibility zone to obtain a certificate from the Doorman. + +Parameters: + +* ``--network-root-truststore``, ``-t`` **required**: Network root trust store obtained from network operator. +* ``--network-root-truststore-password``, ``-p``: Network root trust store password obtained from network operator. + +``generate-node-info``: Performs the node start-up tasks necessary to generate the nodeInfo file, saves it to disk, then exits. + +``generate-rpc-ssl-settings``: Generates the SSL keystore and truststore for a secure RPC connection. + +``install-shell-extensions``: Install ``corda`` alias and auto completion for bash and zsh. See :doc:`cli-application-shell-extensions` for more info. + + +``validate-configuration``: Validates the actual configuration without starting the node. + +.. _enabling-remote-debugging: + +Enabling remote debugging +------------------------- +To enable remote debugging of the node, run the node with the following JVM arguments: + +``java -Dcapsule.jvm.args="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" -jar corda.jar`` + +This will allow you to attach a debugger to your node on port 5005. + + diff --git a/docs/source/running-a-node.rst b/docs/source/running-a-node.rst index 2e30354bd5..67695d5fc7 100644 --- a/docs/source/running-a-node.rst +++ b/docs/source/running-a-node.rst @@ -26,15 +26,6 @@ By default, the node will look for a configuration file called ``node.conf`` and in the current working directory. You can override the configuration file and workspace paths on the command line (e.g. ``./corda.jar --config-file=test.conf --base-directory=/opt/corda/nodes/test``). -You can increase the amount of Java heap memory available to the node using the ``-Xmx`` command line argument. For -example, the following would run the node with a heap size of 2048MB: - -.. code-block:: shell - - java -Xmx2048m -jar corda.jar - -You should do this if you receive an ``OutOfMemoryError`` exception when interacting with the node. - Optionally run the node's webserver as well by opening a terminal window in the node's folder and running: .. code-block:: shell @@ -77,54 +68,6 @@ anything set earlier. :Command line flag: You can set JVM args on the command line that apply to the launcher process and the node process as in the example above. This will override any value for the same flag set any other way, but will leave any other JVM arguments alone. - -Command-line options -~~~~~~~~~~~~~~~~~~~~ -The node can optionally be started with the following command-line options: - -* ``--base-directory``, ``-b``: The node working directory where all the files are kept (default: ``.``). -* ``--config-file``, ``-f``: The path to the config file. Defaults to ``node.conf``. -* ``--dev-mode``, ``-d``: Runs the node in development mode. Unsafe in production. Defaults to true on MacOS and desktop versions of Windows. False otherwise. -* ``--no-local-shell``, ``-n``: Do not start the embedded shell locally. -* ``--on-unknown-config-keys <[FAIL,INFO]>``: How to behave on unknown node configuration. Defaults to FAIL. -* ``--sshd``: Enables SSH server for node administration. -* ``--sshd-port``: Sets the port for the SSH server. If not supplied and SSH server is enabled, the port defaults to 2222. -* ``--verbose``, ``--log-to-console``, ``-v``: If set, prints logging to the console as well as to a file. -* ``--logging-level=``: Enable logging at this level and higher. Possible values: ERROR, WARN, INFO, DEBUG, TRACE. Default: INFO. -* ``--help``, ``-h``: Show this help message and exit. -* ``--version``, ``-V``: Print version information and exit. - -Sub-commands -^^^^^^^^^^^^ - -``clear-network-cache``: Clears local copy of network map, on node startup it will be restored from server or file system. - -``initial-registration``: Starts initial node registration with the compatibility zone to obtain a certificate from the Doorman. - -Parameters: - -* ``--network-root-truststore``, ``-t`` **required**: Network root trust store obtained from network operator. -* ``--network-root-truststore-password``, ``-p``: Network root trust store password obtained from network operator. - -``generate-node-info``: Performs the node start-up tasks necessary to generate the nodeInfo file, saves it to disk, then exits. - -``generate-rpc-ssl-settings``: Generates the SSL keystore and truststore for a secure RPC connection. - -``install-shell-extensions``: Install ``corda`` alias and auto completion for bash and zsh. See :doc:`cli-application-shell-extensions` for more info. - - -``validate-configuration``: Validates the actual configuration without starting the node. - -.. _enabling-remote-debugging: - -Enabling remote debugging -~~~~~~~~~~~~~~~~~~~~~~~~~ -To enable remote debugging of the node, run the node with the following JVM arguments: - -``java -Dcapsule.jvm.args="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" -jar corda.jar`` - -This will allow you to attach a debugger to your node on port 5005. - Starting all nodes at once on a local machine from the command line -------------------------------------------------------------------