Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ja_JP] Getting Started - Run Fabric / Using the Fabric test network #891

Open
shimos opened this issue Sep 28, 2023 · 0 comments
Open

[ja_JP] Getting Started - Run Fabric / Using the Fabric test network #891

shimos opened this issue Sep 28, 2023 · 0 comments
Labels
good first issue Good for newcomers jaJP-docs-ongoing Japanese Documentation ongoing

Comments

@shimos
Copy link
Contributor

shimos commented Sep 28, 2023

Original HTML: https://hyperledger-fabric.readthedocs.io/en/release-2.5/test_network.html
Original Source: https://github.com/hyperledger/fabric/blob/e1e8e2e52aa4fc543360d245fe6554a0eaf81183/docs/source/test_network.md

diff --git a/docs/source/test_network.md b/docs/source/test_network.md
index 48905ecd1..d2b4e492b 100644
--- a/docs/source/test_network.md
+++ b/docs/source/test_network.md
@@ -16,24 +16,17 @@ nodes are isolated within a Docker Compose network, the test network is not conf
 To learn how to use Fabric in production, see [Deploying a production network](deployment_guide_overview.html).
 
 **Note:** These instructions have been verified to work against the
-latest stable Docker images and the pre-compiled setup utilities within the
+latest stable Fabric Docker images and the pre-compiled setup utilities within the
 supplied tar file. If you run these commands with images or tools from the
-current master branch, it is possible that you will encounter errors.
+current main branch, it is possible that you will encounter errors.
 
 ## Before you begin
 
-Before you can run the test network, you need to clone the `fabric-samples`
-repository and download the Fabric images.
+Before you can run the test network, you need to install Fabric Samples in your
+environment. Follow the instructions on [getting_started](getting_started.html)
+to install the required software.
 
-**Important:** This tutorial is compatible with the Fabric test network sample v2.2.x. After you have installed the [prerequisites](../getting_started.html),
-**you must run the following command** to clone the required version of the
-[hyperledger/fabric samples](https://github.com/hyperledger/fabric-samples) repository and checkout
-the correct version tag. The command also installs the Hyperledger Fabric platform-specific
-binaries and config files for the version into the `/bin` and `/config` directories of `fabric-samples`.
-
-```
-curl -sSL https://bit.ly/2ysbOFE | bash -s -- 2.2.2 1.4.9
-```
+**Note:** The test network has been successfully verified with Docker Desktop version 2.5.0.1 and is the recommended version at this time. Higher versions may not work.
 
 ## Bring up the test network
 
@@ -112,7 +105,7 @@ ordering node. No channel is created when you run `./network.sh up`, though we
 will get there in a [future step](#creating-a-channel). If the command completes
 successfully, you will see the logs of the nodes being created:
 ```
-Creating network "net_test" with the default driver
+Creating network "fabric_test" with the default driver
 Creating volume "net_orderer.example.com" with default driver
 Creating volume "net_peer0.org1.example.com" with default driver
 Creating volume "net_peer0.org2.example.com" with default driver
@@ -198,7 +191,7 @@ channel with the default name of `mychannel`:
 If the command was successful, you can see the following message printed in your
 logs:
 ```
-========= Channel successfully joined ===========
+Channel 'mychannel' joined
 ```
 
 You can also use the channel flag to create a channel with custom name. As an
@@ -214,6 +207,12 @@ the command below to create a second channel named `channel2`:
 ./network.sh createChannel -c channel2
 ```
 
+**NOTE:** Make sure the name of the channel applies the following restrictions:
+
+  - contains only lower case ASCII alphanumerics, dots '.', and dashes '-'
+  - is shorter than 250 characters
+  - starts with a letter
+
 If you want to bring up the network and create a channel in a single step, you
 can use the `up` and `createChannel` modes together:
 ```
@@ -261,7 +260,7 @@ The `deployCC` subcommand will install the **asset-transfer (basic)** chaincode
 the chaincode on the channel specified using the channel flag (or `mychannel`
 if no channel is specified).  If you are deploying a chaincode for the first
 time, the script will install the chaincode dependencies. You can use the
-language flag, `-l`, to install the Go, typescript or javascript versions of the chaincode.
+language flag, `-ccl`, to install the Go, typescript or javascript versions of the chaincode.
 You can find the asset-transfer (basic) chaincode in the `asset-transfer-basic` folder of the `fabric-samples`
 directory. This folder contains sample chaincode that are provided as examples and
 used by tutorials to highlight Fabric features.
@@ -299,13 +298,13 @@ export CORE_PEER_ADDRESS=localhost:7051
 The `CORE_PEER_TLS_ROOTCERT_FILE` and `CORE_PEER_MSPCONFIGPATH` environment
 variables point to the Org1 crypto material in the `organizations` folder.
 
-If you used `./network.sh deployCC -ccl go` to install and start the asset-transfer (basic) chaincode, you can invoke the `InitLedger` function of the (Go) chaincode to put an initial list of assets on the ledger (if using typescript or javascript `./network.sh deployCC -ccl javascript` for example, you will invoke the `InitLedger` function of the respective chaincodes).
+If you used `./network.sh deployCC -ccl go` to install and start the asset-transfer (basic) chaincode, you can invoke the `InitLedger` function of the (Go) chaincode to put an initial list of assets on the ledger (if using TypeScript or JavaScript `./network.sh deployCC -ccl javascript` for example, you will invoke the `InitLedger` function of the respective chaincodes).
 
-Run the following command to initialize the ledger with assets:
+Run the following command to initialize the ledger with assets. (Note the CLI does not access the Fabric Gateway peer, so each endorsing peer must be specified.)
 ```
-peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile ${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n basic --peerAddresses localhost:7051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses localhost:9051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"function":"InitLedger","Args":[]}'
+peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile "${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" -C mychannel -n basic --peerAddresses localhost:7051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" --peerAddresses localhost:9051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" -c '{"function":"InitLedger","Args":[]}'
 ```
-If successful, you should see similar output to below:
+If successful, you should see output similar to the following example:
 ```
 -> INFO 001 Chaincode invoke successful. result: status:200
 ```
@@ -326,7 +325,7 @@ If successful, you should see the following output:
 ```
 Chaincodes are invoked when a network member wants to transfer or change an asset on the ledger. Use the following command to change the owner of an asset on the ledger by invoking the asset-transfer (basic) chaincode:
 ```
-peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile ${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n basic --peerAddresses localhost:7051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses localhost:9051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"function":"TransferAsset","Args":["asset6","Christopher"]}'
+peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile "${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" -C mychannel -n basic --peerAddresses localhost:7051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" --peerAddresses localhost:9051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" -c '{"function":"TransferAsset","Args":["asset6","Christopher"]}'
 ```
 
 If the command is successful, you should see the following response:
@@ -384,13 +383,9 @@ local machine, you can use the tutorials to start developing your own solution:
 
 - Learn how to deploy your own smart contracts to the test network using the
 [Deploying a smart contract to a channel](deploy_chaincode.html) tutorial.
-- Visit the [Writing Your First Application](write_first_app.html) tutorial
+- Visit the [Running a Fabric Application](write_first_app.html) tutorial
 to learn how to use the APIs provided by the Fabric SDKs to invoke smart
 contracts from your client applications.
-- If you are ready to deploy a more complicated smart contract to the network, follow
-the [commercial paper tutorial](tutorial/commercial_paper.html) to explore a
-use case in which two organizations use a blockchain network to trade commercial
-paper.
 
 You can find the complete list of Fabric tutorials on the [tutorials](tutorials.html)
 page.
@@ -624,6 +619,17 @@ If you have any problems with the tutorial, review the following:
    ```
    Select ``y``.
 
+-  If you try to create a channel with the command `./network.sh createChannel`,
+   and it fails with the following error:
+   ```
+   [comm.tls] ClientHandshake -> ERRO 003 Client TLS handshake failed after 1.908956ms with error: EOF remoteaddress=127.0.0.1:7051
+   Error: error getting endorser client for channel: endorser client failed to connect to localhost:7051: failed to create new connection: context deadline exceeded
+   After 5 attempts, peer0.org1 has failed to join channel 'mychannel'
+   ```
+
+   You need to uninstall Docker Desktop and reinstall the recommended version 2.5.0.1. Then, reclone the `fabric-samples`
+   repository before reattempting the commands.
+
 -  If you see an error similar to the following:
    ```
    /bin/bash: ./scripts/createChannel.sh: /bin/bash^M: bad interpreter: No such file or directory
@@ -632,7 +638,7 @@ If you have any problems with the tutorial, review the following:
    Ensure that the file in question (**createChannel.sh** in this example) is
    encoded in the Unix format. This was most likely caused by not setting
    ``core.autocrlf`` to ``false`` in your Git configuration (see
-    [Windows extras](prereqs.html#windows-extras)). There are several ways of fixing this. If you have
+    [Windows](prereqs.html#windows)). There are several ways of fixing this. If you have
    access to the vim editor for instance, open the file:
    ```
    vim ./fabric-samples/test-network/scripts/createChannel.sh
@@ -643,8 +649,7 @@ If you have any problems with the tutorial, review the following:
    :set ff=unix
    ```
 
-If you continue to see errors, share your logs on the **fabric-questions**
-channel on [Hyperledger Rocket Chat](https://chat.hyperledger.org/home) or on
+If you continue to see errors, share your logs on one of the Fabric [Discord channels](https://discord.com/invite/hyperledger) or on
 [StackOverflow](https://stackoverflow.com/questions/tagged/hyperledger-fabric).
 
 <!--- Licensed under Creative Commons Attribution 4.0 International License
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers jaJP-docs-ongoing Japanese Documentation ongoing
Projects
Development

No branches or pull requests

2 participants