Welcome to the Linux Foundation Forum!

Error in last step of start.sh in lab 1.

Options

Hi, This is my first post to this forum. I am working on Lab 1, LFS272.

I have completed all steps but receive an error in the final step of start.sh. Here are the specific error from start.sh followed by the full output of start.sh:

Error: proposal failed (err: rpc error: code = Unknown desc = error validating proposal: access denied: channel [] creator org unknown, creator is malformed)

Here is the full output of start.sh:

Set env vars

export CHANNEL_NAME=allarewelcome

docker compose -f docker-compose.yml down

[+] Running 4/4

✔ Container ca.org1.example.com R... 0.9s

✔ Container peer0.org1.example.com Removed 0.9s

✔ Container orderer.example.com R... 0.3s

✔ Network starter_basic Removed 0.5s

docker compose -f docker-compose.yml up -d ca.org1.example.com orderer.example.com peer0.org1.example.com cli

[+] Running 5/5

✔ Network starter_basic Created 0.3s

✔ Container ca.org1.example.com S... 14.7s

✔ Container orderer.example.com S... 13.8s

✔ Container peer0.org1.example.com Started 14.1s

✔ Container cli Started 16.7s

Wait for Hyperledger Fabric to start

In case of errors when running later commands, issue export FABRIC_START_TIMEOUT=

export FABRIC_START_TIMEOUT=15

sleep ${FABRIC_START_TIMEOUT}

Create the application channel

ORDERER_TLS_CA=docker exec cli env | grep ORDERER_TLS_CA | cut -d'=' -f2

docker exec cli peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f /etc/hyperledger/configtx/$CHANNEL_NAME.tx --tls --cafile $ORDERER_TLS_CA

2023-07-31 20:47:52.452 UTC 0001 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

2023-07-31 20:47:52.605 UTC 0002 INFO [cli.common] readBlock -> Expect block, but got status: &{NOT_FOUND}

2023-07-31 20:47:52.633 UTC 0003 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

2023-07-31 20:47:52.929 UTC 0004 INFO [cli.common] readBlock -> Expect block, but got status: &{SERVICE_UNAVAILABLE}

2023-07-31 20:47:52.934 UTC 0005 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

2023-07-31 20:47:53.137 UTC 0006 INFO [cli.common] readBlock -> Expect block, but got status: &{SERVICE_UNAVAILABLE}

2023-07-31 20:47:53.146 UTC 0007 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

2023-07-31 20:47:53.349 UTC 0008 INFO [cli.common] readBlock -> Expect block, but got status: &{SERVICE_UNAVAILABLE}

2023-07-31 20:47:53.355 UTC 0009 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

2023-07-31 20:47:53.557 UTC 000a INFO [cli.common] readBlock -> Expect block, but got status: &{SERVICE_UNAVAILABLE}

2023-07-31 20:47:53.565 UTC 000b INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

2023-07-31 20:47:53.767 UTC 000c INFO [cli.common] readBlock -> Expect block, but got status: &{SERVICE_UNAVAILABLE}

2023-07-31 20:47:53.772 UTC 000d INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

2023-07-31 20:47:53.975 UTC 000e INFO [cli.common] readBlock -> Expect block, but got status: &{SERVICE_UNAVAILABLE}

2023-07-31 20:47:53.980 UTC 000f INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

2023-07-31 20:47:54.184 UTC 0010 INFO [cli.common] readBlock -> Expect block, but got status: &{SERVICE_UNAVAILABLE}

2023-07-31 20:47:54.200 UTC 0011 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

2023-07-31 20:47:54.407 UTC 0012 INFO [cli.common] readBlock -> Received block: 0

Join peer0.org1.example.com to the channel

docker exec cli peer channel join -b $CHANNEL_NAME.block

2023-07-31 20:47:54.946 UTC 0001 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

Error: proposal failed (err: rpc error: code = Unknown desc = error validating proposal: access denied: channel [] creator org unknown, creator is malformed)


The error is only the last item. Note that all four containers were created, but appear to have not joined the channel 'allarewelcome'.

I am running Ubuntu 22.04 (not 18.04) and I am using Docker version 24.0.5, (not 19.03.13). Therefore, I modified lines 13 and 15 of start.sh to "docker compose" from "docker-compose" to reflect the shift from compose v1 (which has been deprecated) to compose v2. Other than that, the script is as originally written. I can't see how this would cause the error. Then again, I have no idea why the error occurs.

Thanks in advance for assistance.

Answers

  • Bobbijn
    Bobbijn Posts: 190
    Options

    Hello,

    Welcome to the forum @dougd! Don't worry, your error isn't uncommon, and it's usually related to misconfigurations or inconsistencies in the certificates. Let's walk through a few potential issues:

    Incorrect Certificate Authority (CA) Setup: Make sure that the certificates from the CA for the peers and orderer nodes are correctly configured. If the organization identities aren't correctly recognized by the Fabric network, you might see this type of error.

    Network not Fully Bootstrapped: Ensure that your Hyperledger Fabric network is fully up and running before you try to execute commands. The peers and the orderer node may not have been fully initialized before the script tried to create and join the channel.

    Correct CHANNEL_NAME Export: Check if the environment variable CHANNEL_NAME is correctly set. The error message suggests that the channel name is not recognized.

    Certificate Path: Make sure the --cafile flag points to the correct path of the Orderer's TLS CA certificate file. The ORDERER_TLS_CA environment variable must contain the correct path to the certificate file.

    User Identity Configuration: Check if the user MSP (Membership Service Provider) is correctly setup in the core.yaml file. The error message suggests an issue with the creator's identity.

    Remember, it's essential that the configurations for your peers, orderer nodes, and organizations are all correct and consistent throughout your setup. Please review your setup, consider these points, and try again.

    Regarding the Docker Compose version, the shift from "docker-compose" to "docker compose" should not cause any issues, as long as the Docker Compose file (docker-compose.yml) and commands are compatible with the version you are using.

    If you're still encountering issues after this, please provide more information about your setup and configurations so we can help diagnose the problem more accurately.

    Hope this helps, and let us know how it goes! Bobbi

  • dougd
    dougd Posts: 5
    Options

    Thank you Bobbi,

    This is exactly what I was looking for. I don't have time today, but will definitely work through it tomorrow, Thursday, and will post the results in a comment.

    Doug

  • dougd
    dougd Posts: 5
    Options

    Hi Bobbi,

    Thanks again for your response, and for encouraging me to give it a try before coming back hat in hand. Well, here I am. :-)

    The root challenge with your response is that I don't know how to do what you are asking to investigate. The way this course is structured, for Lab 1, it is just run a couple of scripts and don't worry about the details. We'll get to those. Well, I ain't got there yet cause I can't get past the last step in start.sh of Lab 1.

    So, first I want to respond to your specific comments, then I'll present the detailed output.

    Incorrect Certificate Authority (CA) Setup: Make sure that the certificates from the CA for the peers and orderer nodes are correctly configured. If the organization identities aren't correctly recognized by the Fabric network, you might see this type of error.

    How do I do that? Since it is all with the generate.sh and start.sh scripts that are provided, I don't know how to know if the nodes are correctly configured. Again, since they are part of the scripts that have been provided, I expect they are OK.

    Network not Fully Bootstrapped: Ensure that your Hyperledger Fabric network is fully up and running before you try to execute commands. The peers and the orderer node may not have been fully initialized before the script tried to create and join the channel.

    Same comment. How do you tell if the nodes have been fully initialized. I will say that the four containers are set up and appear to be correct, but I don't know how to determine if they have been fully initialized.

    Correct CHANNEL_NAME Export: Check if the environment variable CHANNEL_NAME is correctly set. The error message suggests that the channel name is not recognized.

    From the output of start.sh below, it appears that allarewelcome is properly named.

    Certificate Path: Make sure the --cafile flag points to the correct path of the Orderer's TLS CA certificate file. The ORDERER_TLS_CA environment variable must contain the correct path to the certificate file.

    Same comment.

    User Identity Configuration: Check if the user MSP (Membership Service Provider) is correctly setup in the core.yaml file. The error message suggests an issue with the creator's identity.

    And finally, I can read the core.yaml file, but don't know what to look for to know if it is properly set up. Again, since this was a downloaded file, I'd be surprised if it is in error.


    Next, here is the complete output. Note that the only modifications to the original start.sh script are: switch from docker-compose to docker compose (which seems to work as it should), and I added
    "set -x

    trap read debug"

    to the top of the script so I could more closely observe what was happening. Here is the output from the script.

    fabric@doug-VirtualBox:~/Desktop/lfs272-assets/networkFiles$ ./start.sh

    • trap read debug

    ++ read

    • set -ev

    Set env vars

    export CHANNEL_NAME=allarewelcome

    read

    ++ read

    • export CHANNEL_NAME=allarewelcome

    • CHANNEL_NAME=allarewelcome

    docker compose -f docker-compose.yml down

    read

    ++ read

    • docker compose -f docker-compose.yml down

    [+] Running 5/5

    ✔ Container ca.org1.example.com Removed 12.5s

    ✔ Container cli Removed 3.1s

    ✔ Container peer0.org1.example.com Removed 2.4s

    ✔ Container orderer.example.com Removed 1.6s

    ✔ Network starter_basic Remo... 0.7s

    docker compose -f docker-compose.yml up -d ca.org1.example.com orderer.example.com peer0.org1.example.com cli

    read

    ++ read

    • docker compose -f docker-compose.yml up -d ca.org1.example.com orderer.example.com peer0.org1.example.com cli

    [+] Running 5/5

    ✔ Network starter_basic Crea... 0.4s

    ✔ Container orderer.example.com Started 5.7s

    ✔ Container ca.org1.example.com Started 5.7s

    ✔ Container peer0.org1.example.com Started 4.9s

    ✔ Container cli Started 6.4s

    Wait for Hyperledger Fabric to start

    In case of errors when running later commands, issue export FABRIC_START_TIMEOUT=

    export FABRIC_START_TIMEOUT=15

    read

    ++ read

    • export FABRIC_START_TIMEOUT=15

    • FABRIC_START_TIMEOUT=15

    sleep ${FABRIC_START_TIMEOUT}

    read

    ++ read

    • sleep 15

    Create the application channel

    ORDERER_TLS_CA=docker exec cli env | grep ORDERER_TLS_CA | cut -d'=' -f2

    read

    ++ read

    ++ docker exec cli env

    ++ grep ORDERER_TLS_CA

    ++ cut -d= -f2

    • ORDERER_TLS_CA=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

    docker exec cli peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f /etc/hyperledger/configtx/$CHANNEL_NAME.tx --tls --cafile $ORDERER_TLS_CA

    read

    ++ read

    • docker exec cli peer channel create -o orderer.example.com:7050 -c allarewelcome -f /etc/hyperledger/configtx/allarewelcome.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

    2023-08-15 22:31:00.532 UTC 0001 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

    2023-08-15 22:31:00.578 UTC 0002 INFO [cli.common] readBlock -> Expect block, but got status: &{NOT_FOUND}

    2023-08-15 22:31:00.584 UTC 0003 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

    2023-08-15 22:31:01.086 UTC 0004 INFO [cli.common] readBlock -> Expect block, but got status: &{SERVICE_UNAVAILABLE}

    2023-08-15 22:31:01.102 UTC 0005 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

    2023-08-15 22:31:01.304 UTC 0006 INFO [cli.common] readBlock -> Expect block, but got status: &{SERVICE_UNAVAILABLE}

    2023-08-15 22:31:01.310 UTC 0007 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

    2023-08-15 22:31:01.514 UTC 0008 INFO [cli.common] readBlock -> Expect block, but got status: &{SERVICE_UNAVAILABLE}

    2023-08-15 22:31:01.520 UTC 0009 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

    2023-08-15 22:31:01.724 UTC 000a INFO [cli.common] readBlock -> Expect block, but got status: &{SERVICE_UNAVAILABLE}

    2023-08-15 22:31:01.737 UTC 000b INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

    2023-08-15 22:31:01.942 UTC 000c INFO [cli.common] readBlock -> Expect block, but got status: &{SERVICE_UNAVAILABLE}

    2023-08-15 22:31:01.950 UTC 000d INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

    2023-08-15 22:31:02.157 UTC 000e INFO [cli.common] readBlock -> Received block: 0

    Join peer0.org1.example.com to the channel

    docker exec cli peer channel join -b $CHANNEL_NAME.block

    read

    ++ read

    • docker exec cli peer channel join -b allarewelcome.block

    2023-08-15 22:31:07.111 UTC 0001 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized

    Error: proposal failed (err: rpc error: code = Unknown desc = error validating proposal: access denied: channel [] creator org unknown, creator is malformed)

    fabric@doug-VirtualBox:~/D

    So, that's all I have. If you need something additional, I can't imagine what it would be since all I did was execute the two scripts that are provided as a part of Lab 1.

    Really looking forward to getting past this so I can start learning the details of this wonderful set of products.

    Thanks in advance for your guidance.

    Doug

  • jay846josh
    Options

    Facing the same problems @dougd. It's 2 months now, I really hope you have found a solution to this?

    @Bobbijn all we do is run the scripts provided. We don't alter the code.

  • Bobbijn
    Bobbijn Posts: 190
    Options

    Hello @dougd and @jay846josh,

    I understand the frustration that comes with encountering such errors, especially when following provided scripts in a learning environment like LFS272. Let's address the issue step-by-step to find a solution.

    The error message Error: proposal failed (err: rpc error: code = Unknown desc = error validating proposal: access denied: channel [] creator org unknown, creator is malformed) typically indicates an issue with the way the Hyperledger Fabric network is recognizing the identity of the user or peer trying to execute the command. This could be due to a variety of reasons, including misconfiguration of MSP (Membership Service Provider) identities, incorrect setup of the network, or timing issues in the script execution.

    Given that you're using provided scripts and not altering the code, let's consider a few areas:

    Wait for Network Initialization: Ensure that all components of the Hyperledger Fabric network are fully initialized and operational before executing the start.sh script. The script might be running before all containers are ready. Increasing the FABRIC_START_TIMEOUT value might help.

    Check MSP Configurations: Even if you're not altering the scripts, there can sometimes be issues with the MSP configurations in the provided materials. Verify that the MSPs for the peers and orderer are correctly set up in the network configurations.

    Identity of the User Executing the Script: The error suggests an issue with the identity (creator org unknown, creator is malformed). Ensure that the identity trying to create the channel and join the peer to it has the correct permissions and is recognized by the network. This might involve checking the environment variables and the user context under which the start.sh script is running.

    Certificate Authorities and TLS: Double-check that the Certificate Authorities (CAs) are correctly set up and running. The TLS certificates should be correctly generated and available for the orderer and peers.

    Docker Compose Version: Although the shift from docker-compose to docker compose should not be an issue, verify that your Docker Compose version and configuration are compatible with the Hyperledger Fabric version you are using.

    Please let me know if you have any luck with these suggestions, Bobbi

Categories

Upcoming Training