mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
When a CA starts, it creates its signing cert and then starts listening on its listening port. The fix is to wait for the server to start listening on the port rather than waiting for the signing cert file to be created. See the waitPort function in env.sh, and places where this is called. I also had to increase the max time we wait before failing. WARNING: This change set is dependent upon the following fabric-ca change set and should not be merged until it has been merged: https://gerrit.hyperledger.org/r/#/c/15089/ Change-Id: I781e3653bf6846e22f401fe64855fa155ffeb7cb Signed-off-by: Keith Smith <bksmith@us.ibm.com>
23 lines
550 B
Bash
Executable file
23 lines
550 B
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# Copyright IBM Corp. All Rights Reserved.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
source $(dirname "$0")/env.sh
|
|
initOrgVars $ORG
|
|
|
|
set -e
|
|
|
|
# Wait for the root CA to start
|
|
waitPort "root CA to start" 60 $ROOT_CA_LOGFILE $ROOT_CA_HOST 7054
|
|
|
|
# Initialize the intermediate CA
|
|
fabric-ca-server init -b $BOOTSTRAP_USER_PASS -u $PARENT_URL
|
|
|
|
# Copy the intermediate CA's certificate chain to the data directory to be used by others
|
|
cp $FABRIC_CA_SERVER_HOME/ca-chain.pem $TARGET_CHAINFILE
|
|
|
|
# Start the intermediate CA
|
|
fabric-ca-server start
|