错误:对于 peer0.org1.example.com 无法为服务 peer0.org1.example.com 创建容器:mkdir C:\Program Files\Git\var:访问被拒绝

我正在尝试使用命令 ./network.sh up createChannel -c mychannel -cafabric-samples(2.3 版)启动结构测试网络。

当为 Org1 和 Org2 生成 CCP 文件时,我收到以下错误:

Generating CCP files for Org1 and Org2
Found orphan containers (ca_org1,ca_orderer,ca_org2) for this project. If you removed or renamed this service in your compose file,you can run this command with the --remove-orphans flag to clean it up.
Creating peer0.org2.example.com ...
Creating peer0.org1.example.com ...
Creating orderer.example.com    ...
Creating peer0.org1.example.com ... error

ERROR: for peer0.org1.example.com  Cannot create container for service peer0.org1.example.com: mkdir C:\Program Files\Git\var: access is denied.
Creating peer0.org2.example.com ... error

ERROR: for peer0.org2.example.com  Cannot create container for service peer0.org2.example.com: mkdir C:\Program Files\Git\var: access is denied.
Creating orderer.example.com    ... done

ERROR: for peer0.org1.example.com  Cannot create container for service peer0.org1.example.com: mkdir C:\Program Files\Git\var: access is denied.

ERROR: for peer0.org2.example.com  Cannot create container for service peer0.org2.example.com: mkdir C:\Program Files\Git\var: access is denied.
Encountered errors while bringing up the project.
Docker Compose is now in the Docker CLI,try `docker compose up`

CONTAINER ID   IMAGE                               COMMAND                  CREATED          STATUS                  PORTS                                                                                                                                 NAMES
88feeed7fab3   hyperledger/fabric-orderer:latest   "orderer"                3 seconds ago    Up Less than a second   0.0.0.0:7050->7050/tcp,:::7050->7050/tcp,0.0.0.0:7053->7053/tcp,:::7053->7053/tcp,0.0.0.0:17050->17050/tcp,:::17050->17050/tcp   orderer.example.com
627fa71a0361   hyperledger/fabric-ca:latest        "sh -c 'fabric-ca-se…"   24 seconds ago   Up 21 seconds           0.0.0.0:7054->7054/tcp,:::7054->7054/tcp,0.0.0.0:17054->17054/tcp,:::17054->17054/tcp                                              ca_org1
0bbf5d51ec2a   hyperledger/fabric-ca:latest        "sh -c 'fabric-ca-se…"   24 seconds ago   Up 21 seconds           0.0.0.0:8054->8054/tcp,:::8054->8054/tcp,7054/tcp,0.0.0.0:18054->18054/tcp,:::18054->18054/tcp                                    ca_org2
5b07405d8546   hyperledger/fabric-ca:latest        "sh -c 'fabric-ca-se…"   24 seconds ago   Up 21 seconds           0.0.0.0:9054->9054/tcp,:::9054->9054/tcp,0.0.0.0:19054->19054/tcp,:::19054->19054/tcp  

                              ca_orderer

然后在创建频道时出现此错误:

Channel 'mychannel' created
Joining org1 peer to the channel...
Using organization 1
+ peer channel join -b ./channel-artifacts/mychannel.block
+ res=1
+ peer channel join -b ./channel-artifacts/mychannel.block
+ res=1
+ peer channel join -b ./channel-artifacts/mychannel.block
+ res=1
+ peer channel join -b ./channel-artifacts/mychannel.block
+ res=1
Error: error getting endorser client for channel: endorser client failed to connect to localhost:7051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp [::1]:7051: connectex: No connection could be made because the target machine actively refused it."
After 5 attempts,peer0.org1 has failed to join channel 'mychannel'

有谁知道如何解决这个问题,因为这不是我第一次启动结构网络,而且之前一切正常。我猜这与docker有关。我已经尝试停止容器 (docker ps -aq | xargs docker kill) 并删除它们 (docker ps -aq | xargs docker rm),但没有成功。

wzy8352663 回答:错误:对于 peer0.org1.example.com 无法为服务 peer0.org1.example.com 创建容器:mkdir C:\Program Files\Git\var:访问被拒绝

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2319.html

大家都在问