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

buildAndDeploy error #1

Closed
bhavers opened this issue Nov 7, 2017 · 11 comments
Closed

buildAndDeploy error #1

bhavers opened this issue Nov 7, 2017 · 11 comments

Comments

@bhavers
Copy link

bhavers commented Nov 7, 2017

Hi Bob,
In Chapter 3, on executing ./buildAndDeply i get the following error:
./deployNetwork.sh: line 80: composer: command not found

I am running MacOS. Any clue?

@rddill-IBM
Copy link
Owner

It's possible that the script files (the ones ending in .sh) had extra characters added to them when git cloned them to your system.

First, let's make sure that the clone operation worked correctly. Open a terminal window and navigate to the Chapter03 folder and type the following command: ls *.sh and press enter. You should see deployNetwork.sh as one of the listed files. If you don't see it, then there was a problem with the clone process and I'd recommend deleting your folder and recloning from your repository.

Assuming the file exists, try the following: In your chapter03 folder, type the following command: ./deployNetwork.sh -n zerotoblockchain-network and press enter. If the command fails to execute, which I'm guessing it will, then execute the following three steps. You only need do this once.

  • cd ../ This will move you back one folder level the the ZeroToBlockchain root folder
  • dos2unix fix_scripts.sh This will ensure that the fix_scripts exec will run correctly
  • ./fix_scripts.sh This will go through all of your folders and ensure that all of the scripts will run correctly.

If you have any problems, please copy the errors and add a comment to this stream.

@bhavers
Copy link
Author

bhavers commented Nov 7, 2017

The scripts are available

Brams-MacBook-Pro:Chapter03 bram_havers@nl.ibm.com$ ls *.sh
createArchive.sh	deployNetwork.sh	shutdown.sh		start_rest_server.sh	startup.sh

Unfortunately running fix_scripts.sh doesn't fix the issue, see output of deployNetworks.sh below.

Brams-MacBook-Pro:Chapter03 bram_havers@nl.ibm.com$ ./deployNetwork.sh -n zerotoblockchain-network
       =====================================================
       -----> option passed for network name is: 'zerotoblockchain-network'
       =====================================================

       network deploy script for the Zero To Blockchain Series
       This has been successfully tested on OSX Sierra and Ubuntu 16.04
       This script will create your Composer archive

Parameters:
       Network Name is:  zerotoblockchain-network 
       =====================================================
       -----> deploying network
       =====================================================
./deployNetwork.sh: line 80: composer: command not found
Brams-MacBook-Pro:Chapter03 bram_havers@nl.ibm.com$ 

@rddill-IBM
Copy link
Owner

Right, I misunderstood the error. composer is one of the binaries which needs to be installed. This indicates that either the binaries did not install, or else docker is not running.

I just ran a quick test and this is a binary installation issue. So, you need to re-run the installation command. The installation process is described in the README.pdf file in Chapter 3. If you have never run the setup_OSX.sh command, then running that command is your starting point. Simply change to your ZeroToBlockchain folder and run the command:

  • change to your ZeroToBlockchain folder
  • type in ./setup_OSX.sh and press enter.

If you did run this command, then you need to reinstall the binaries, because the previous installation failed. in that case, do the following:

  • change to your ZeroToBlockchain folder
  • type in ./setup_OSX.sh -g false -b false and press enter. This will tell OSX to skip the git and brew installation and install node V6, the node blockchain sdk and the hyperledger composer binaries for OSX.

@bhavers
Copy link
Author

bhavers commented Nov 7, 2017

Great, that worked, thx.

@bhavers bhavers closed this as completed Nov 7, 2017
@AliCSLearner
Copy link

AliCSLearner commented Mar 11, 2018

Hi, I'm facing a similar issue except that I'm on Ubuntu inside VirtualBox.

In the last step of Chapter 3 i.e. Check out the network, I'm getting the following errors while executing ./buildAndDeploy:

./createArchive.sh: line 80: composer: command not found
./startup.sh: line 37: ./startFabric.sh: No such file or directory
and other errors as well.

@rddill-IBM
Copy link
Owner

The error you are seeing indicates that the composer cli (command line interface) did not successfully install. This happens as part of the first of two install scripts for Ubuntu:

 - setup_Ubuntu_Part_1.sh
 - setup_Ubuntu_Part_1.sh

If you did not run these scripts, they are required and handle the set-up for your environment. If you have already run them, then please rerun the first one and let me know if you have any errors. Please remember that Composer requires 64-bit Ubuntu and the install scriipts are set to run against Ubuntu 16.04. You can check your version by typing in the following command:

dpkg --print-architecture

which should return amd64. If it returns i386 then you have installed 16-bit Ubuntu and need install the 64-bit version, rerun both setup scripts and then reclone your repository.

@AliCSLearner
Copy link

I had already run those scripts but re-running setup_Ubuntu_Part_1.sh worked. Thanks @rddill-IBM

@rsarosh
Copy link

rsarosh commented Dec 18, 2018

I have Ubuntu 18.04.1 LTS and ran setup_Ubuntu_Part_1.sh but kept getting the error composer: command not found. Do i have only one option to go back to 16.04 LTS? Is there no way to upgrade these scripts to 18?

@rddill-IBM
Copy link
Owner

Please update your copy of the master repo to the latest release ( https://github.com/rddill-IBM/ZeroToBlockchain/releases/tag/1.6.2 ). This has support for Ubuntu 18.

@rsarosh
Copy link

rsarosh commented Dec 18, 2018

After updating to latest 1.6.2... I kept getting the error as attached. But after couple of restarts and rerunning setup_Ubuntu_Part_1.sh and Part_2.sh fixed the error and displayed the page localhost:3000/explorer. Part_2, I have to run with sudo. Part_1 hangs at the eula notice, I believe we can kill it without harming.

Just sharing for others - Don't give up, keep trying. Huge thanks to @rddill-IBM

dockererror
eula
hyperladgererror

@rsarosh
Copy link

rsarosh commented Dec 19, 2018

To get around eula notice, use tab and spaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants