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

Failed to pass "Fabric Test Network" tutorial #1533

Open
yizhihuaqi opened this issue Jun 22, 2024 · 8 comments
Open

Failed to pass "Fabric Test Network" tutorial #1533

yizhihuaqi opened this issue Jun 22, 2024 · 8 comments
Assignees

Comments

@yizhihuaqi
Copy link

yizhihuaqi commented Jun 22, 2024

When I executed

ff init fabric test1 \
  --ccp "${HOME}/org1_ccp.yml" \
  --msp "organizations" \
  --ccp "${HOME}/org2_ccp.yml" \
  --msp "organizations" \
  --channel mychannel \
  --chaincode firefly

, it reported error.

Error: no version for docker-compose has been detected

so the following operation are not successful.
After I modified the "~/.firefly/stacks/test1/docker-compose.override.yml" file, I executed

ff start test1 -b -v

and the error was as follows:

ERROR: for firefly_core_0  Container "64dc5b6558c7" is unhealthy.
ERROR: for firefly_core_1  Container "de81c4e47781" is unhealthy.
Encountered errors while bringing up the project.

Then I executed

docker logs 64dc5b6558c7

,it prints:

Copyright (C) 2021 Kaleido
Licensed under the Apache License, Version 2.0
Version:  (Build Date: 2024-01-25T22:47:36Z)

time="2024-06-22T09:29:21Z" level=info msg="Can't read config: read /fabconnect/fabconnect.yaml: is a directory, will rely on environment variables and command line arguments for required configurations\n"
Error: Must provide REST Gateway client configuration path

and I find "~/.firefly/stacks/test1/runtime/blockchain/fabconnect.yaml" is a empty directory rather than a file.
I haven't solved this problem yet.
Below is my docker and docker compose version.

Docker version 26.1.4, build 5650f9b
Docker Compose version v2.28.0
@EnriqueL8
Copy link
Contributor

Thanks for raising this - I have seen someone on Discord call out the same problem that the fabconnect.yaml becomes a directory instead of a file!

A few things that would help me:

@yizhihuaqi
Copy link
Author

@EnriqueL8 Thank you for your reply.
There are details you mentioned:

  1. The OS version is:
    Ubuntu 20.04.6 LTS, Linux 6.1.84
  2. The Cli permissions are:
    -rwxrwxr-x 1 daqi daqi 30042818 Jun 23 09:04 ff
  3. I saw the PR you mentioned, then manually compiled the latest version of cli, and installed a docker-compose, but still encountered this problem. I wonder if there's something else wrong or I did some wrong operations.
    Thanks again.

@EnriqueL8
Copy link
Contributor

@yizhihuaqi Can you clear the stack and recreate it now that you fixed the docker part? It might have created the file originally and then a second init might have a caused other problems with the filesystem

@yizhihuaqi
Copy link
Author

@EnriqueL8 I deleted all stacks and the .firefly directory, then init ff again and still got the error.
Error: no version for docker-compose has been detected

@EnriqueL8
Copy link
Contributor

Interesting - I just fixed a bug that was swallowing errors through that docker-compose error! Do you mind trying again with a latest build?

@bellaj
Copy link

bellaj commented Dec 29, 2024

same problem with (mac M1)

ff version
{
  "Version": "1.3.2",
  "Commit": "14e7721bf8cca1fc6b2b217d00a5d79926a17af2",
  "Date": "2024-10-03T11:35:44Z",
  "License": "Apache-2.0"
}
ff init fabric dev2  --ccp "${HOME}/test/org1_ccp.yml"  --msp "organizations" --channel mychannel  --chaincode firefly
initializing new FireFly stack...
Error: no version for docker-compose has been detected
Usage:
  ff init fabric [stack_name] [member_count] [flags]

Flags:
      --ccp stringArray      Path to the ccp.yaml file for an org in your Fabric network
      --chaincode string     The name given to the FireFly chaincode when it was deployed
      --channel string       The name of the Fabric channel on which the FireFly chaincode has been deployed
      --custom-pin-support   Configure the blockchain listener to listen for BatchPin events from any chaincode on the channel
  -h, --help                 help for fabric
      --msp stringArray      Path to the MSP directory for an org in your Fabric network

Global Flags:
      --ansi string                          control when to print ANSI control characters ("never"|"always"|"auto") (default "auto")
      --connector-config string              The path to a yaml file containing extra config for the blockchain connector
      --consensus string                     Consensus algorithm to use. Options are [clique raft ibft qbft] (default "clique")
      --core-config string                   The path to a yaml file containing extra config for FireFly Core
  -d, --database string                      Database type to use. Options are: [sqlite3 postgres] (default "sqlite3")
      --environment-vars stringToString      Common environment variables to set on all containers in FireFly stack (default [])
  -e, --external int                         Manage a number of FireFly core processes outside of the docker-compose stack - useful for development and debugging
  -p, --firefly-base-port int                Mapped port base of FireFly core API (1 added for each member) (default 5000)
      --ipfs-mode string                     Set the mode in which IFPS operates. Options are: [private public] (default "private")
  -m, --manifest string                      Path to a manifest.json file containing the versions of each FireFly microservice to use. Overrides the --release flag.
      --multiparty                           Enable or disable multiparty mode (default true)
      --node-name stringArray                Node name
      --org-name stringArray                 Organization name
      --private-transaction-manager string   Private Transaction Manager to use. Options are: [none tessera] (default "none")
      --prometheus-enabled                   Enables Prometheus metrics exposition and aggregation to a shared Prometheus server
      --prometheus-port int                  Port for the shared Prometheus server (default 9090)
      --prompt-names                         Prompt for org and node names instead of using the defaults
      --ptm-base-port int                    Mapped port base of private transaction manager (10 added for each member) (default 4100)
  -r, --release string                       Select the FireFly release version to use. Options are: [stable head alpha beta rc] (default "latest")
      --remote-node-deploy                   Enable or disable deployment of FireFly contracts on remote nodes
      --request-timeout int                  Custom request timeout (in seconds) - useful for registration to public chains
      --sandbox-enabled                      Enables the FireFly Sandbox to be started with your FireFly stack (default true)
  -s, --services-base-port int               Mapped port base of services (100 added for each member) (default 5100)
  -t, --token-providers stringArray          Token providers to use. Options are: [none erc1155 erc20_erc721] (default [erc20_erc721])
  -v, --verbose                              verbose log output

Error: no version for docker-compose has been detected

shen running ff start
got in fabconnect

time="2024-12-30T09:12:34Z" level=info msg="Can't read config: read /fabconnect/fabconnect.yaml: is a directory, will rely on environment variables and command line arguments for required configurations\n"
Error: Must provide REST Gateway client configuration path

If ignored when we start the stack i get that fabconnect.yaml is folder
@EnriqueL8 not fixed in last build

@bellaj
Copy link

bellaj commented Jan 2, 2025

@EnriqueL8 I have created a PR to fix the issue! please check

@EnriqueL8
Copy link
Contributor

Thanks @bellaj !

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

3 participants