Hyperledger

Hyperledger Fabric – Cryptogen Tool Not Found…Exiting

This error, Cryptogen Tool Not Found…Exiting occurred when I tried to build the first network by executing byfn.sh script using following commands for the first time after downloading and installing hyperledger fabric platform binaries/components and fabric samples:

./byfn.sh -m up
./byfn.sh -m generate

The following screenshot represents the error:

Figure 1. Cryptogen tool not found exiting error

Why the Error – Cryptogen Tool Not Found

This error occurs, primarily, due to the reason that cryptogen tool can be not be found in the path. The path to cryptogen tool needs to be set to PATH variable. This can be confirmed by checking the logs of the script execution by putting the following code (set -x) in the beginning of the file, byfn.sh, as shown below. Note that the code set-x is used to expand variables during shell command execution.

#!/bin/bash
set -x

You would note that the execution of command which cryptogen returns 1 (Note the value of $?). This is where the statement cryptogen tool not found. exiting is echoed.

Note that cryptogen tool gets installed as a result of downloading and installing Hyperledger Ledger platform binaries under folder bin. Other platform components which get set up along with cryptogen are some of the following:

  • configtxlator
  • configtxgen
  • peer
  • ordered



Solution to Error – Cryptogen Tool Not Found

  • Open .~/.bashrc file.
  • Assign path to cryptogen tool to PATH variable. The following is the code sample:
    export PATH=$PATH:/home/support/hyperledger/bin
    
  • Open a new terminal and execute the byfn.sh script. It should go through without the error such as Cryptogen tool not found…exiting.

Are you still seeing the error? The following could be one of the reasons:

Are you trying to execute byfn.sh  -m up command with sudo? I got this error on Ubuntu VM installationI was running with sudo command as my docker installation did not work without sudo. The error may occur because sudo which cryptogen may return a value of 1 which results in error within byfn.sh script. Fix the docker command to work without sudo using this page, Docker – Post-installation steps for Linux. Once you have fixed it, you should be good.

Latest posts by Ajitesh Kumar (see all)
Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking.

Share
Published by
Ajitesh Kumar

Recent Posts

What are AI Agents? How do they work?

Artificial Intelligence (AI) agents have started becoming an integral part of our lives. Imagine asking…

2 weeks ago

Agentic AI Design Patterns Examples

In the ever-evolving landscape of agentic AI workflows and applications, understanding and leveraging design patterns…

2 weeks ago

List of Agentic AI Resources, Papers, Courses

In this blog, I aim to provide a comprehensive list of valuable resources for learning…

2 weeks ago

Understanding FAR, FRR, and EER in Auth Systems

Have you ever wondered how systems determine whether to grant or deny access, and how…

3 weeks ago

Top 10 Gartner Technology Trends for 2025

What revolutionary technologies and industries will define the future of business in 2025? As we…

3 weeks ago

OpenAI GPT Models in 2024: What’s in it for Data Scientists

For data scientists and machine learning researchers, 2024 has been a landmark year in AI…

3 weeks ago