hyperledger-fabrichyperledger-fabric-ca

Meaning of option `fabric-ca-server -d`?


The fabric-samples test network setup for fabric-ca-server (found in fabric-samples/test-network/docker/docker-compose-ca.yaml) initializes the certificate server with

command: sh -c 'fabric-ca-server start -b admin:adminpw -d'

The option -b is clear in meaning - as shown in the output from --help and the online copy of that, it's a user/password for bootstrapping the config file. The -d flag, however, is completely undocumented. What does it do?


Solution

  • This is the flag to enable debug mode; see Deploy Guide, Start the TLS CA server:

    Optional flags:

    • -d - If you want to run the server in DEBUG mode which facilitates problem diagnosis, you can include the -d flag on the start command. However, in general it is not recommended to run a server with debug enabled as this will cause the server to perform slower.
    • -p - If you want the server to run on a port different than what is specified in the configuration .yaml file, you can override the existing port.

    The option is defined here as a tag, and parsed here. For unknown reasons, it is set to be hidden from fabric-ca-server --help.

    (h/t @david_k)