fabric-samples icon indicating copy to clipboard operation
fabric-samples copied to clipboard

test-network channel creation error

Open MArSha1147 opened this issue 1 year ago • 4 comments

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

  • remote server with ubuntu 18.04

  • docker engine version: 24.0.2

  • docker-compose version: 1.29.2

  • fabric image/binary version: 2.5.0

  • fabric-ca image/binary version: 1.5.6

  • fabric-samples repo version: main

  • compose file version: 3.7

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!

MArSha1147 avatar Jun 01 '23 13:06 MArSha1147

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 avatar Jun 03 '23 02:06 salimbene

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"}

salimbene avatar Jun 03 '23 02:06 salimbene

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.

MArSha1147 avatar Jun 06 '23 09:06 MArSha1147

  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.

FawazMalik-jjj avatar Jun 12 '23 22:06 FawazMalik-jjj