Skip to content

Commit 0f9f723

Browse files
committedAug 10, 2017
FAB-5708 clarify how to add add'l channels
also clean up some formatting issues in Troubleshooting section. Change-Id: Ibd08dbfe1c5fdbd358cf6df32c5142781630997b Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
1 parent 240d552 commit 0f9f723

File tree

2 files changed

+64
-45
lines changed

2 files changed

+64
-45
lines changed
 

‎docs/source/build_network.rst

+61-42
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,11 @@ in this sample network.
393393
2017-06-12 21:01:37.562 EDT [msp] getMspConfig -> INFO 003 crls folder not found at [/Users/xxx/dev/byfn/crypto-config/ordererOrganizations/example.com/msp/intermediatecerts]. Skipping.: [stat /Users/xxx/dev/byfn/crypto-config/ordererOrganizations/example.com/msp/crls: no such file or directory]
394394
2017-06-12 21:01:37.562 EDT [msp] getMspConfig -> INFO 004 MSP configuration file not found at [/Users/xxx/dev/byfn/crypto-config/ordererOrganizations/example.com/msp/config.yaml]: [stat /Users/xxx/dev/byfn/crypto-config/ordererOrganizations/example.com/msp/config.yaml: no such file or directory]
395395
396+
.. _createchanneltx:
397+
398+
Create a Channel Configuration Transaction
399+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
400+
396401
Next, we need to create the channel transaction artifact. Be sure to replace $CHANNEL_NAME or
397402
set CHANNEL_NAME as an environment variable that can be used throughout these instructions:
398403

@@ -451,6 +456,8 @@ Start your network:
451456
If you want to see the realtime logs for your network, then do not supply the ``-d`` flag.
452457
If you let the logs stream, then you will need to open a second terminal to execute the CLI calls.
453458

459+
.. _peerenvvars::
460+
454461
Environment variables
455462
^^^^^^^^^^^^^^^^^^^^^
456463

@@ -476,6 +483,13 @@ paths:
476483
Create & Join Channel
477484
^^^^^^^^^^^^^^^^^^^^^
478485

486+
Recall that we created the channel configuration transaction using the
487+
``configtxgen`` tool in the :ref:`createchanneltx` section, above. You can
488+
repeat that process to create additional channel configuration transactions,
489+
using the same or different profiles in the ``configtx.yaml`` that you pass
490+
to the ``configtxgen`` tool. Then you can repeat the process defined in this
491+
section to establish those other channels in your network.
492+
479493
We will enter the CLI container using the ``docker exec`` command:
480494

481495
.. code:: bash
@@ -488,13 +502,9 @@ If successful you should see the following:
488502
489503
root@0d78bb69300d:/opt/gopath/src/github.com/hyperledger/fabric/peer#
490504
491-
Recall that we used the configtxgen tool to generate a channel configuration
492-
artifact - ``channel.tx``. We are going to pass in this artifact to the orderer
493-
as part of the create channel request.
494-
495-
.. note:: Notice the ``-- cafile`` that we pass as part of this command. It is
496-
the local path to the orderer's root cert, allowing us to verify the
497-
TLS handshake.
505+
Next, we are going to pass in the generated channel configuration transaction
506+
artifact that we created in the :ref:`createchanneltx` section (we called
507+
it ``channel.tx``) to the orderer as part of the create channel request.
498508

499509
We specify our channel name with the ``-c`` flag and our channel configuration
500510
transaction with the ``-f`` flag. In this case it is ``channel.tx``, however
@@ -511,6 +521,10 @@ you can mount your own configuration transaction with a different name.
511521
512522
peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
513523
524+
.. note:: Notice the ``-- cafile`` that we pass as part of this command. It is
525+
the local path to the orderer's root cert, allowing us to verify the
526+
TLS handshake.
527+
514528
This command returns a genesis block - ``<channel-ID.block>`` - which we will use to join the channel.
515529
It contains the configuration information specified in ``channel.tx``.
516530

@@ -529,7 +543,8 @@ Now let's join ``peer0.org1.example.com`` to the channel.
529543
peer channel join -b <channel-ID.block>
530544
531545
You can make other peers join the channel as necessary by making appropriate
532-
changes in the four environment variables.
546+
changes in the four environment variables we used in the :ref:`peerenvvars`
547+
section, above.
533548

534549
Install & Instantiate Chaincode
535550
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -924,21 +939,22 @@ Troubleshooting
924939
- Always start your network fresh. Use the following command
925940
to remove artifacts, crypto, containers and chaincode images:
926941

927-
.. code:: bash
942+
.. code:: bash
928943
929944
./byfn.sh -m down
930945
931-
- **YOU WILL SEE ERRORS IF YOU DO NOT REMOVE CONTAINERS AND IMAGES**
946+
.. note:: You **will** see errors if you do not remove old containers
947+
and images.
932948

933949
- If you see Docker errors, first check your docker version (:doc:`prereqs`),
934950
and then try restarting your Docker process. Problems with Docker are
935951
oftentimes not immediately recognizable. For example, you may see errors
936952
resulting from an inability to access crypto material mounted within a
937953
container.
938954

939-
- If they persist remove your images and start from scratch:
955+
If they persist remove your images and start from scratch:
940956

941-
.. code:: bash
957+
.. code:: bash
942958
943959
docker rm -f $(docker ps -aq)
944960
docker rmi -f $(docker images -q)
@@ -947,67 +963,70 @@ Troubleshooting
947963
sure you have properly updated the channel name and chaincode name. There
948964
are placeholder values in the supplied sample commands.
949965

966+
950967
- If you see the below error:
951968

952-
.. code:: bash
969+
.. code:: bash
953970
954971
Error: Error endorsing chaincode: rpc error: code = 2 desc = Error installing chaincode code mycc:1.0(chaincode /var/hyperledger/production/chaincodes/mycc.1.0 exits)
955972
956-
You likely have chaincode images (e.g. ``dev-peer1.org2.example.com-mycc-1.0`` or
957-
``dev-peer0.org1.example.com-mycc-1.0``) from prior runs. Remove them and try
958-
again.
973+
You likely have chaincode images (e.g. ``dev-peer1.org2.example.com-mycc-1.0`` or
974+
``dev-peer0.org1.example.com-mycc-1.0``) from prior runs. Remove them and try
975+
again.
959976

960-
.. code:: bash
977+
.. code:: bash
961978
962-
docker rmi -f $(docker images | grep peer[0-9]-peer[0-9] | awk '{print $3}')
979+
docker rmi -f $(docker images | grep peer[0-9]-peer[0-9] | awk '{print $3}')
963980
964-
- If you see something similar to the following:
981+
- If you see something similar to the following:
965982

966-
.. code:: bash
983+
.. code:: bash
967984
968985
Error connecting: rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure
969986
Error: rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure
970987
971-
Make sure you are running your network against the "1.0.0" images that have
972-
been retagged as "latest".
988+
Make sure you are running your network against the "1.0.0" images that have
989+
been retagged as "latest".
973990

974-
If you see the below error:
991+
- If you see the below error:
975992

976-
.. code:: bash
993+
.. code:: bash
977994
978-
[configtx/tool/localconfig] Load -> CRIT 002 Error reading configuration: Unsupported Config Type ""
979-
panic: Error reading configuration: Unsupported Config Type ""
995+
[configtx/tool/localconfig] Load -> CRIT 002 Error reading configuration: Unsupported Config Type ""
996+
panic: Error reading configuration: Unsupported Config Type ""
980997
981-
Then you did not set the ``FABRIC_CFG_PATH`` environment variable properly. The
982-
configtxgen tool needs this variable in order to locate the configtx.yaml. Go
983-
back and execute an ``export FABRIC_CFG_PATH=$PWD``, then recreate your
984-
channel artifacts.
998+
Then you did not set the ``FABRIC_CFG_PATH`` environment variable properly. The
999+
configtxgen tool needs this variable in order to locate the configtx.yaml. Go
1000+
back and execute an ``export FABRIC_CFG_PATH=$PWD``, then recreate your
1001+
channel artifacts.
9851002

9861003
- To cleanup the network, use the ``down`` option:
9871004

988-
.. code:: bash
1005+
.. code:: bash
9891006
9901007
./byfn.sh -m down
9911008
992-
- If you see an error stating that you still have "active endpoints", then prune
993-
your Docker networks. This will wipe your previous networks and start you with a
994-
fresh environment:
1009+
- If you see an error stating that you still have "active endpoints", then prune
1010+
your Docker networks. This will wipe your previous networks and start you with a
1011+
fresh environment:
9951012

996-
.. code:: bash
1013+
.. code:: bash
9971014
9981015
docker network prune
9991016
1000-
You will see the following message:
1017+
You will see the following message:
10011018

1002-
.. code:: bash
1019+
.. code:: bash
10031020
1004-
WARNING! This will remove all networks not used by at least one container.
1005-
Are you sure you want to continue? [y/N]
1021+
WARNING! This will remove all networks not used by at least one container.
1022+
Are you sure you want to continue? [y/N]
10061023
1007-
Select ``y``.
1024+
Select ``y``.
10081025

1009-
- If you continue to see errors, share your logs on the **# fabric-questions**
1010-
channel on `Hyperledger Rocket Chat <https://chat.hyperledger.org/home>`__.
1026+
.. note:: If you continue to see errors, share your logs on the
1027+
**fabric-questions** channel on
1028+
`Hyperledger Rocket Chat <https://chat.hyperledger.org/home>`__
1029+
or on `StackOverflow <https://stackoverflow.com/questions/tagged/hyperledger-fabric>`__.
10111030

10121031
.. Licensed under Creative Commons Attribution 4.0 International License
10131032
https://creativecommons.org/licenses/by/4.0/

‎docs/source/getting_started.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ Finally, we offer two chaincode tutorials. One oriented to developers,
6868
:doc:`chaincode4ade`, and the other oriented to operators,
6969
:doc:`chaincode4noah`.
7070

71-
..note:: If you have questions not addressed by this documentation, or run into
72-
issues with any of the tutorials, please visit the :doc:`questions`
73-
page for some tips on where to find additional help.
71+
.. note:: If you have questions not addressed by this documentation, or run into
72+
issues with any of the tutorials, please visit the :doc:`questions`
73+
page for some tips on where to find additional help.
7474

7575
.. Licensed under Creative Commons Attribution 4.0 International License
7676
https://creativecommons.org/licenses/by/4.0/

0 commit comments

Comments
 (0)
Please sign in to comment.