部署这个真是头大,昨晚搞几个小时都没有搞定,今天下午搞定
基本环境准备参照
http://www.cnblogs.com/aberic/p/7531202.html
http://blog.csdn.net/weixin_41714277/article/details/79413458
http://blog.csdn.net/remote_roamer/article/details/70228662
不过问题多多,启动不起来。排过的坑列出一下:
有个小技巧:
go get github.com/hyperledger/fabric
可以生成github.com/hyperledger/fabric目录
=========================================
1 编辑当前用户(这里是root用户)的环境变量:
vi ~/.profile
添加以下内容:
export PATH=$PATH:/usr/local/go/bin
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$HOME/go/bin
编辑保存并退出vi后,记得把这些环境载入:
source ~/.profile
我们把go的目录GOPATH设置为当前用户的文件夹下,所以记得创建go文件夹
cd ~
mkdir go
2 最好在/etc/.profile 也同样加一下
3 由于本机部署过 fabric-samples,所以在启动
root@ThinkPad-T450:~/go/src/github.com/hyperledger/fabric/examples/e2e_cli# pwd
/root/go/src/github.com/hyperledger/fabric/examples/e2e_cli
root@ThinkPad-T450:~/go/src/github.com/hyperledger/fabric/examples/e2e_cli# ./network_setup.sh up
=================
过程总提示
ERROR: for orderer.example.com Cannot create container for service orderer.example.com: Conflict. The container name "/orderer.example.com" is already in use by container "d8f8d32ed879f29b8e9d3d13ed395b7f53966597838abfc907689d6432e34e25". You have to remove (or rename) that container to be able to reuse that name.
ERROR: for peer0.org1.example.com Cannot create container for service peer0.org1.example.com: Conflict. The container name "/peer0.org1.example.com" is already in use bStarting peer1.org2.example.com ... done
ERROR: for peer0.org1.example.com Cannot create container for service peer0.org1.example.com: Conflict. The container name "/peer0.org1.example.com" is already in use by container "0f6c11f8e8e120bae651604135c8e4b83ca487dc8b67b8906b7dbff296a42a2d". You have to remove (or rename) that container to be able to reuse that name.
ERROR: for orderer.example.com Cannot create container for service orderer.example.com: Conflict. The container name "/orderer.example.com" is already in use by container "d8f8d32ed879f29b8e9d3d13ed395b7f53966597838abfc907689d6432e34e25". You have to remove (or rename) that container to be able to reuse that name.
ERROR: Encountered errors while bringing up the project.
ERROR !!!! Unable to pull the images
===============
很明显是有容器冲突,要删除以前的容器。
查找容器所在位置
find / depthmax 5 -name '0f6c11f8e8e120bae651604135c8e4b83ca487dc8b67b8906b7dbff296a42a2d'
/var/lib/docker/image/overlay2/layerdb/mounts
/var/lib/docker/containers
=====================
docker常用命令如下:
杀死所有正在运行的容器
docker kill $(docker ps -a -q)
删除所有已经停止的容器
docker rm $(docker ps -a -q)
删除所有镜像
docker rmi $(docker images -q)
强制删除所有镜像
docker rmi -f $(docker images -q)
=====================
这里使用
docker kill $(docker ps -a -q)
docker rm $(docker ps -a -q)
/var/lib/docker/image/overlay2/layerdb/mounts
/var/lib/docker/containers
目录下的容器都已清除掉了。
重新启动,OK。
Hyperledger Fabric v1.0.0 部署启动
猜你喜欢
转载自angie.iteye.com/blog/2413412
今日推荐
周排行