hyperledger / fabric-samples

Samples for Hyperledger Fabric
https://wiki.hyperledger.org/display/fabric
Apache License 2.0
2.78k stars 3.38k forks source link

test-network channel creation error #1050

Open MArSha1147 opened 1 year ago

MArSha1147 commented 1 year ago

ERROR

Run ./network.sh up createChannel, then "peer" and "order" were found exited right now, which are supposed to be up all the time. image

So "Error: Post "https://localhost:7053/participation/v1/channels": dial tcp 127.0.0.1:7053: connect: connection refused" appeared, and channel creation failed.

Env is followed:

ENV

Question

Surprisingly, test-network sample goes well in my local desktop with ubuntu 22.04 while the other configs of env are the same as those listed above! So how can I figure the error out in server with ubuntu 18.04?

Hope to see your reply soon! Thx!

salimbene commented 1 year ago

Having exact same issue on Mac OS with Apple chip. I had been working without problems, I think it started failing after last macos upgrade but not sure. Tried several things, removing, reinstalling. Wasn't able to downgrade docker tho.

Error: Post "https://localhost:7053/participation/v1/channels": dial tcp [::1]:7053: connect: connection refused

I'm on Mac os Ventura 13.4 (22F66)

salimbene commented 1 year ago

I was able to figure out my problem, new version of docker uses "docker compose", instead of "docker-compose". I manually edited network.sh on line 259 to remove the hyphen, and started working.

Online 32 from : ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI}-compose"} to : ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI} compose"}

MArSha1147 commented 1 year ago

I was able to figure out my problem, new version of docker uses "docker compose", instead of "docker-compose". I manually edited network.sh on line 259 to remove the hyphen, and started working.

Online 32 from : ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI}-compose"} to : ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI} compose"}

Thx a lot, I'll try it. BTW, I found that the error can be solved when I run test-network with root.

FawazMalik-jjj commented 1 year ago
  1. Verify Docker Containers:

    docker ps -a
  2. Check Docker Compose File: The Docker Compose file defines the services, networks, and volumes for your application. You'll need to locate the relevant file, such as network.sh, and review its contents to ensure the configurations are correct.

  3. Check Port Availability:

    netstat -tuln | grep 7053
  4. Firewall and Networking: Check the firewall status on your remote server and ensure the necessary ports are open. The commands can vary depending on your server's configuration. Here's an example using ufw:

    sudo ufw status
    sudo ufw allow 7053
  5. Logs and Debugging:

    docker logs <container_name>
  6. Network Connectivity: Ensure that your remote server has a working network connection. You can test connectivity to external resources by using tools like ping or curl. For example:

    ping google.com
    curl https://www.example.com
  7. Compare Local and Remote Configurations: Compare the configurations between your local machine and the remote server by reviewing the Docker versions, fabric versions, and any other relevant settings. You may need to access configuration files or use Docker commands to inspect specific details.