Hyperledger Fabric Simples issue Run ./byfn.sh -m up failed - hyperledger-fabric
I want to build first-network of Hyperledger Fabric Samples
I get the simple code from git then download the platform-specific binaries follow
the guide http://hyperledger-fabric.readthedocs.io/en/v1.0.5/samples.html
But when I run the command ./byfn.sh -m generate there are different output in my screen and when I run ./byfn.sh -m up , the error occurred
Build your first network (BYFN) end-to-end test
Channel name : mychannel
Creating channel...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=INFO
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
+ peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=2
+ set +x
2018-04-04 09:59:34.078 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7fc6bfc34259]
runtime stack:
runtime.throw(0xf11259, 0x2a)
/opt/go/src/runtime/panic.go:605 +0x95
runtime.sigpanic()
/opt/go/src/runtime/signal_unix.go:351 +0x2b8
goroutine 25 [syscall, locked to thread]:
runtime.cgocall(0xbf3800, 0xc420027de8, 0xf0fa21)
/opt/go/src/runtime/cgocall.go:132 +0xe4 fp=0xc420027da8 sp=0xc420027d68 pc=0x4023b4
net._C2func_getaddrinfo(0x7fc6b00008c0, 0x0, 0xc42038a3c0, 0xc42000e838, 0x0, 0x0, 0x0)
net/_obj/_cgo_gotypes.go:86 +0x5f fp=0xc420027de8 sp=0xc420027da8 pc=0x5f893f
net.cgoLookupIPCNAME.func2(0x7fc6b00008c0, 0x0, 0xc42038a3c0, 0xc42000e838, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x13)
/opt/go/src/net/cgo_unix.go:151 +0x13f fp=0xc420027e40 sp=0xc420027de8 pc=0x5ffedf
net.cgoLookupIPCNAME(0x7ffe5b6e1a3a, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/opt/go/src/net/cgo_unix.go:151 +0x175 fp=0xc420027f38 sp=0xc420027e40 pc=0x5fa195
net.cgoIPLookup(0xc420382360, 0x7ffe5b6e1a3a, 0x13)
/opt/go/src/net/cgo_unix.go:203 +0x4d fp=0xc420027fc8 sp=0xc420027f38 pc=0x5fa8dd
runtime.goexit()
/opt/go/src/runtime/asm_amd64.s:2337 +0x1 fp=0xc420027fd0 sp=0xc420027fc8 pc=0x45e391
created by net.cgoLookupIP
/opt/go/src/net/cgo_unix.go:213 +0xaf
goroutine 1 [select]:
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.DialContext(0x7fc6bfe577e0, 0xc4203821e0, 0x7ffe5b6e1a3a, 0x18, 0xc420355780, 0x4, 0x4, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:422 +0x532
github.com/hyperledger/fabric/core/comm.(*grpcClient).NewConnection(0xc4203705f0, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/core/comm/client.go:217 +0x389
github.com/hyperledger/fabric/peer/common.(*OrdererClient).Broadcast(0xc42038a270, 0x0, 0x0, 0xc420153b10, 0xbc3839)
/opt/gopath/src/github.com/hyperledger/fabric/peer/common/ordererclient.go:50 +0x6c
github.com/hyperledger/fabric/peer/common.GetBroadcastClient(0x380, 0xc420184a00, 0x138, 0x138)
/opt/gopath/src/github.com/hyperledger/fabric/peer/common/broadcastclient.go:41 +0x3e
github.com/hyperledger/fabric/peer/channel.InitCmdFactory.func1(0xc420335680, 0xc420335e30, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/channel.go:136 +0x29
github.com/hyperledger/fabric/peer/channel.sendCreateChainTransaction(0xc420265360, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:164 +0xa7
github.com/hyperledger/fabric/peer/channel.executeCreate(0xc420265360, 0xc420265360, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:178 +0x2f
github.com/hyperledger/fabric/peer/channel.create(0xc4201f7680, 0xc4201f5860, 0x1, 0xa, 0x0, 0xd5afc0, 0x16705c0)
/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:213 +0x40
github.com/hyperledger/fabric/peer/channel.createCmd.func1(0xc4201f7680, 0xc4201f5860, 0x1, 0xa, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:59 +0x52
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0xc4201f7680, 0xc4201f5720, 0xa, 0xa, 0xc4201f7680, 0xc4201f5720)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:599 +0x3e8
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x164d4e0, 0x11, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:689 +0x2fe
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x164d4e0, 0x7d, 0xc420014035)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:648 +0x2b
main.main()
/opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:112 +0x5e1
goroutine 19 [runnable]:
github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).keepalive(0xc420332340)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1272
created by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:292 +0xdd2
goroutine 18 [runnable]:
github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).controller(0xc420332340)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1225
created by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:290 +0xd2e
goroutine 10 [syscall]:
os/signal.signal_recv(0x0)
/opt/go/src/runtime/sigqueue.go:131 +0xa6
os/signal.loop()
/opt/go/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.0
/opt/go/src/os/signal/signal_unix.go:28 +0x41
goroutine 21 [runnable]:
github.com/hyperledger/fabric/vendor/golang.org/x/net/trace.allocFamily(0xc42035a0c0, 0x19, 0x16c6c40)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/golang.org/x/net/trace/trace.go:514
created by github.com/hyperledger/fabric/vendor/golang.org/x/net/trace.New
/opt/gopath/src/github.com/hyperledger/fabric/vendor/golang.org/x/net/trace/trace.go:359 +0x235
goroutine 16 [runnable]:
github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).reader(0xc420332340)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1137
created by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:260 +0xbf8
goroutine 20 [runnable]:
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*addrConn).transportMonitor(0xc420120540)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:990
created by github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*ClientConn).resetAddrConn
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:716 +0x67a
goroutine 22 [runnable]:
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.newClientStream.func3(0x166c200, 0xc420332340, 0xc420120380, 0xc42024d600, 0xc4200ff800)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/stream.go:254
created by github.com/hyperledger/fabric/vendor/google.golang.org/grpc.newClientStream
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/stream.go:254 +0xe23
goroutine 23 [select]:
net.(*Resolver).LookupIPAddr(0x169d370, 0x1667b40, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0)
/opt/go/src/net/lookup.go:196 +0x52b
net.(*Resolver).internetAddrList(0x169d370, 0x1667b40, 0xc4203822a0, 0xee7636, 0x3, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0x0, ...)
/opt/go/src/net/ipsock.go:293 +0x644
net.(*Resolver).resolveAddrList(0x169d370, 0x1667b40, 0xc4203822a0, 0xee7b40, 0x4, 0xee7636, 0x3, 0x7ffe5b6e1a3a, 0x18, 0x0, ...)
/opt/go/src/net/dial.go:193 +0x594
net.(*Dialer).DialContext(0xc42004f458, 0x1667b40, 0xc4203822a0, 0xee7636, 0x3, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0x0, ...)
/opt/go/src/net/dial.go:375 +0x248
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.dialContext(0x1667b40, 0xc4203822a0, 0xee7636, 0x3, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0xc4200ff900, 0xc420284e00)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/go17.go:38 +0xb3
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.DialContext.func1(0x7fc6bfe577e0, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0x16571c0, 0xc420140c80)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:329 +0x86
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.newProxyDialer.func1(0x7fc6bfe577e0, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0xc420334e10, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/proxy.go:121 +0x137
github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.dial(0x7fc6bfe577e0, 0xc4203822a0, 0xc42037f790, 0x7ffe5b6e1a3a, 0x18, 0xc42017f780, 0xc4203235c0, 0x7fc6bfe55d10, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:119 +0x5a
github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client(0x7fc6bfe577e0, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0xeef4b1, 0xd, 0x0, 0x0, ...)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:157 +0xa7
github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.NewClientTransport(0x7fc6bfe577e0, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0xeef4b1, 0xd, 0x0, 0x0, ...)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/transport.go:505 +0xae
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*addrConn).resetTransport(0xc420120a80, 0xc42038a200, 0xc420120aa0, 0xc42038e108)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:929 +0x4b4
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*ClientConn).resetAddrConn(0xc4201208c0, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:702 +0x340
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.DialContext.func3(0xc420382240, 0xc4201208c0, 0x1669a40, 0xc42000e828, 0x7ffe5b6e1a3a, 0x18)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:417 +0x223
created by github.com/hyperledger/fabric/vendor/google.golang.org/grpc.DialContext
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:386 +0x441
goroutine 24 [select]:
net.cgoLookupIP(0x1667b40, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x13, 0xc4201cbc80, 0x0, 0x0, 0x0, 0x0, 0x0)
/opt/go/src/net/cgo_unix.go:214 +0x1b0
net.(*Resolver).lookupIP(0x169d370, 0x1667b40, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0)
/opt/go/src/net/lookup_unix.go:95 +0x12d
net.(*Resolver).(net.lookupIP)-fm(0x1667b40, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x13, 0x3, 0xc420340f00, 0xc420052080, 0x0, 0xc420020000)
/opt/go/src/net/lookup.go:187 +0x56
net.glob..func10(0x1667b40, 0xc4203822a0, 0xc42037f7f0, 0x7ffe5b6e1a3a, 0x13, 0x42ad09, 0xc400000008, 0xc420052080, 0x0, 0x8db329)
/opt/go/src/net/hook.go:19 +0x52
net.(*Resolver).LookupIPAddr.func1(0x18, 0x0, 0x0, 0x1)
/opt/go/src/net/lookup.go:193 +0x5c
internal/singleflight.(*Group).doCall(0x169d360, 0xc420370870, 0x7ffe5b6e1a3a, 0x13, 0xc42038a360)
/opt/go/src/internal/singleflight/singleflight.go:93 +0x2e
created by internal/singleflight.(*Group).DoChan
/opt/go/src/internal/singleflight/singleflight.go:86 +0x31f
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
ERROR !!!! Test failed
Please help me to fix this problem thanks!
You should be able to resolve this by adding GODEBUG=netdns=go to the environment variables section of your the Docker Compose file(s).
If you take a look at https://github.com/hyperledger/fabric-samples/blob/release-1.1/first-network/base/peer-base.yaml, you can modify the contents like this:
version: '2'
services:
peer-base:
image: hyperledger/fabric-peer:$IMAGE_TAG
environment:
- GODEBUG=netdns=go
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
# the following setting starts chaincode containers on the same
# bridge network as the peers
# https://docs.docker.com/compose/networking/
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_byfn
- CORE_LOGGING_LEVEL=INFO
#- CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: peer node start
The other possible solution is to add the dns_search property:
version: '2'
services:
peer-base:
image: hyperledger/fabric-peer:$IMAGE_TAG
dns_search: .
environment:
- GODEBUG=netdns=go
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
# the following setting starts chaincode containers on the same
# bridge network as the peers
# https://docs.docker.com/compose/networking/
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_byfn
- CORE_LOGGING_LEVEL=INFO
#- CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: peer node start
or try both as well
You seem to have mismatched the version of the samples and Hyperledger Fabric images and binaries (I noticed that the version of the output matches code added for v1.1.0). Before running the first-network sample (or any other) make sure that you checkout the corresponding version of the fabric-samples git repository for the docker images and binaries you downloaded.
e.g.
git clone https://github.com/hyperledger/fabric-samples.git
git checkout v1.0.6
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/v1.0.6/scripts/bootstrap.sh | bash -s 1.0.6
cd first-network
./byfn.sh -m generate
...
Its an issue of dns-go. Add this tag to the environment of peer container in docker-compose.yml.
- GODEBUG=netdns=go
Related
Hyperledger Fabric - Block Inspecting Error
I want to receive a correct block extract containing transaction for a typical invoke transaction (non config transaction). docker exec peer0.org1.example.com peer channel fetch 4 -c mychannel docker cp peer0.org1.example.com:/opt/gopath/src/github.com/hyperledger/fabric/peer/mychannel_4.block . configtxgen -inspectBlock mychannel_4.block > mychannel4.json This makes it possible to receive a full pb2json decode for the fabric-samples like "first-network". But it doesn't work for the "fabcar" sample. Normally this should work too, right? Any Ideas why and how to fix it? ../../bin/configtxgen -inspectBlock mychannel_3.block block3.json 2020-06-07 02:05:54.210 PDT [common.tools.configtxgen] main -> INFO 001 Loading configuration 2020-06-07 02:05:54.210 PDT [common.tools.configtxgen.localconfig] LoadTopLevel -> PANI 002 Error reading configuration: Unsupported Config Type "" 2020-06-07 02:05:54.210 PDT [common.tools.configtxgen] func1 -> PANI 003 Error reading configuration: Unsupported Config Type "" panic: Error reading configuration: Unsupported Config Type "" [recovered] panic: Error reading configuration: Unsupported Config Type "" goroutine 1 [running]: github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc0000c5ce0, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x546 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc000010230, 0x4, 0xc0000416c0, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0x101 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(...) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panic(0xc000010238, 0xc0002799e0, 0x1, 0x1) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0x9a main.main.func1() /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:260 +0x178 panic(0xde3fc0, 0xc000250a40) /w/workspace/fabric-release-jobs-x86_64/golang/go/src/runtime/panic.go:522 +0x1b5 github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc0000c5ce0, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x546 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc000010210, 0x4, 0xc0000415c0, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0x101 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(...) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panic(0xc000010218, 0xc000279df8, 0x2, 0x2) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0x9a github.com/hyperledger/fabric/common/tools/configtxgen/localconfig.LoadTopLevel(0x0, 0x0, 0x0, 0x1) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/localconfig/config.go:234 +0x3fe main.main() /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:278 +0xfb5
You can make use of configtxlator tool to decode the block as a whole. configtxlator proto_decode --type=common.Block --input=<your_block.pb> --output=<your_block.json>
Julia 1.4.1 fail to start, but 1.3.1 not. What is the issue?
Julia 1.3.1 works fine in my ubuntu 18.04 platform: Linux KenServ 5.3.0-45-generic #37~18.04.1-Ubuntu SMP Fri Mar 27 15:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux But when I download and try to run julia 1.4.1 it fails and show me this messages: Invalid instruction at 0x7faf524e39f8: 0x66, 0x0f, 0x3a, 0x0f, 0xc0, 0x08, 0x0f, 0x83, 0x61, 0x05, 0x00, 0x00, 0x48, 0xc1, 0xe0 signal (4): Instrucción ilegal in expression starting at none:0 _ZN4llvm13LexicalScopes23assignInstructionRangesERNS_15SmallVectorImplISt4pairIPKNS_12MachineInstrES5_EEERNS_8DenseMapIS5_PNS_12LexicalScopeENS_12DenseMapInfoIS5_EENS_6detail12DenseMapPairIS5_SB_EEEE at /home/kenneth/Descargas/julia/julia-1.4.1/bin/../lib/julia/libLLVM-8jl.so (unknown line) _ZN4llvm13LexicalScopes10initializeERKNS_15MachineFunctionE at /home/kenneth/Descargas/julia/julia-1.4.1/bin/../lib/julia/libLLVM-8jl.so (unknown line) _ZN4llvm18LiveDebugVariables20runOnMachineFunctionERNS_15MachineFunctionE at /home/kenneth/Descargas/julia/julia-1.4.1/bin/../lib/julia/libLLVM-8jl.so (unknown line) _ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE at /home/kenneth/Descargas/julia/julia-1.4.1/bin/../lib/julia/libLLVM-8jl.so (unknown line) _ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE at /home/kenneth/Descargas/julia/julia-1.4.1/bin/../lib/julia/libLLVM-8jl.so (unknown line) _ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE at /home/kenneth/Descargas/julia/julia-1.4.1/bin/../lib/julia/libLLVM-8jl.so (unknown line) _ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE at /home/kenneth/Descargas/julia/julia-1.4.1/bin/../lib/julia/libLLVM-8jl.so (unknown line) operator() at /buildworker/worker/package_linux64/build/src/jitlayers.cpp:356 addModule at /buildworker/worker/package_linux64/build/usr/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h:84 [inlined] addModule at /buildworker/worker/package_linux64/build/src/jitlayers.cpp:485 jl_add_to_ee at /buildworker/worker/package_linux64/build/src/jitlayers.cpp:747 [inlined] jl_finalize_function at /buildworker/worker/package_linux64/build/src/jitlayers.cpp:755 getAddressForFunction at /buildworker/worker/package_linux64/build/src/codegen.cpp:1414 jl_generate_fptr at /buildworker/worker/package_linux64/build/src/codegen.cpp:1508 jl_compile_method_internal at /buildworker/worker/package_linux64/build/src/gf.c:1912 _jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2153 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2322 #764 at ./client.jl:370 jfptr_#764_8156 at /home/kenneth/Descargas/julia/julia-1.4.1/lib/julia/sys.so (unknown line) _jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2144 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2322 jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1700 [inlined] do_apply at /buildworker/worker/package_linux64/build/src/builtins.c:643 jl_f__apply_latest at /buildworker/worker/package_linux64/build/src/builtins.c:693 #invokelatest#1 at ./essentials.jl:712 [inlined] invokelatest at ./essentials.jl:711 [inlined] run_main_repl at ./client.jl:367 exec_options at ./client.jl:305 _start at ./client.jl:484 jfptr__start_2075 at /home/kenneth/Descargas/julia/julia-1.4.1/lib/julia/sys.so (unknown line) _jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2144 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2322 jl_apply at /buildworker/worker/package_linux64/build/ui/../src/julia.h:1700 [inlined] true_main at /buildworker/worker/package_linux64/build/ui/repl.c:96 main at /buildworker/worker/package_linux64/build/ui/repl.c:217 __libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line) _start at ./julia (unknown line) Allocations: 2505 (Pool: 2496; Big: 9); GC: 0 Instrucción ilegal (`core' generado) I try to compile from source. The same thing happens. Invalid instruction at 0x7fad3a976ad0: 0x66, 0x0f, 0x3a, 0x0f, 0xc0, 0x08, 0x0f, 0x83, 0xae, 0x04, 0x00, 0x00, 0x48, 0xc1, 0xe0 signal (4): Instrucción ilegal Allocations: 1 (Pool: 1; Big: 0); GC: 0 Illegal instruction (core dumped) *** This error might be fixed by running `make clean`. If the error persists, try `make cleanall`. *** sysimage.mk:67: fallo en las instrucciones para el objetivo '/home/kenneth/Descargas/julia/julia-1.4.1/usr/lib/julia/sys.ji' make[1]: *** [/home/kenneth/Descargas/julia/julia-1.4.1/usr/lib/julia/sys.ji] Error 1 Makefile:81: fallo en las instrucciones para el objetivo 'julia-sysimg-ji' make: *** [julia-sysimg-ji] Error 2 Please help me, What am I doing wrong?
Hyperledger Fabric: Add Orderer in running raft network
I want to add a new orderer node in a running hyperledger-fabric network. I've used etcdraft as consensus between the orderers. I've followed step by step process of this accepted answer. In step #15, it is mentioned that, I've to fetch the latest config block from the system channel and use this block as genesis block of the new ordering service. So, I've copied the config block to the channel-artifacts folder [file name: config_block.pb] and then spin up a new container using a docker-compose.yaml file. As a reference I am posting the docker-compose.yaml file here: version: '2' volumes: orderer6.example.com: networks: byfn: services: orderer6.example.com: image: hyperledger/fabric-orderer:latest environment: - FABRIC_LOGGING_SPEC=INFO - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - ORDERER_GENERAL_GENESISMETHOD=file - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp # enabled TLS - ORDERER_GENERAL_TLS_ENABLED=true - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1 - ORDERER_KAFKA_VERBOSE=true - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] working_dir: /opt/gopath/src/github.com/hyperledger/fabric command: orderer container_name: orderer6.example.com networks: - byfn volumes: - ./channel-artifacts/config_block.pb:/var/hyperledger/orderer/orderer.genesis.block - ./crypto-config/ordererOrganizations/example.com/orderers/orderer6.example.com/msp:/var/hyperledger/orderer/msp - ./crypto-config/ordererOrganizations/example.com/orderers/orderer6.example.com/tls/:/var/hyperledger/orderer/tls - orderer6.example.com:/var/hyperledger/production/orderer ports: - 13050:7050 Finally, I'm running the orderer service using: docker-compose -f orderer6.yaml up The container starts and after a few seconds it crashes. Log file of the container shows: orderer6.example.com | 2020-01-07 09:03:12.363 UTC [orderer.common.cluster.replication] obtainStream -> INFO 03f Sending request for block [2] to orderer.example.com:7050 orderer6.example.com | 2020-01-07 09:03:12.365 UTC [orderer.common.cluster.replication] pullBlocks -> INFO 040 Got block [2] of size 47 KB from orderer.example.com:7050 orderer6.example.com | 2020-01-07 09:03:12.377 UTC [orderer.common.cluster] appendBlock -> PANI 041 Failed to write block [2]: unexpected Previous block hash. Expected PreviousHash = [1c99accab83de7a415061120831519badf4807c97a0195ab5f42bab979a7dc09], PreviousHash referred in the latest block= [37f11444fb0b1ca51419b5f1a95fab616d5179ed44a87716677f1b706c0b1854] orderer6.example.com | panic: Failed to write block [2]: unexpected Previous block hash. Expected PreviousHash = [1c99accab83de7a415061120831519badf4807c97a0195ab5f42bab979a7dc09], PreviousHash referred in the latest block= [37f11444fb0b1ca51419b5f1a95fab616d5179ed44a87716677f1b706c0b1854] orderer6.example.com | orderer6.example.com | goroutine 1 [running]: orderer6.example.com | github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc00014db80, 0x0, 0x0, 0x0) orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x546 orderer6.example.com | github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc000010a58, 0xc00004ae04, 0x1548ed8, 0x1e, 0xc00030b458, 0x2, 0x2, 0x0, 0x0, 0x0) orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0x101 orderer6.example.com | github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(...) orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 orderer6.example.com | github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panicf(...) orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:74 orderer6.example.com | github.com/hyperledger/fabric/orderer/common/cluster.(*Replicator).appendBlock(0xc000089bc0, 0xc0002e4a80, 0x16b8760, 0xc00068d0e0, 0xc000571f60, 0x10) orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/cluster/replication.go:253 +0x283 orderer6.example.com | github.com/hyperledger/fabric/orderer/common/cluster.(*Replicator).pullChannelBlocks(0xc000089bc0, 0xc000571f60, 0x10, 0xc00053e2a0, 0x3, 0x16b8760, 0xc00068d0e0, 0x0, 0x0) orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/cluster/replication.go:221 +0xd8 orderer6.example.com | github.com/hyperledger/fabric/orderer/common/cluster.(*Replicator).PullChannel(0xc000089bc0, 0xc000571f60, 0x10, 0x0, 0x0) orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/cluster/replication.go:207 +0x411 orderer6.example.com | github.com/hyperledger/fabric/orderer/common/cluster.(*Replicator).ReplicateChains(0xc000089bc0, 0xc00030ba88, 0x1, 0x1) orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/cluster/replication.go:163 +0x3ed orderer6.example.com | github.com/hyperledger/fabric/orderer/common/server.(*replicationInitiator).replicateNeededChannels(0xc000214180, 0xc00011ce00) orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/onboarding.go:102 +0x19a orderer6.example.com | github.com/hyperledger/fabric/orderer/common/server.(*replicationInitiator).replicateIfNeeded(0xc000214180, 0xc00011ce00) orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/onboarding.go:48 +0x9a orderer6.example.com | github.com/hyperledger/fabric/orderer/common/server.Start(0x15309fe, 0x5, 0xc000394900) orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:124 +0x11c8 orderer6.example.com | github.com/hyperledger/fabric/orderer/common/server.Main() orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:91 +0x208 orderer6.example.com | main.main() orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/main.go:15 +0x20 orderer6.example.com exited with code 2 Details log of the orderer is in here. What's the problem in my approach? I've used byfn network as my test bed by running: ./byfn up -o etcdraft
There is an issue with respect to the volumes being mount to the new orderer container. It is using an existing volume for the new orderer, because probably you kept pulling down the "byfn.sh" script and just used it again to up the network. Go to the docker-compose file which is used to bring up the new orderer node. Check the volumes section at the top of the file as well as within the container definition where it is actually mounted: volumes: orderer6.example.com: and - orderer6.example.com:/var/hyperledger/production/orderer. Change the name of the volume being created and mounted to completely new name. Every step mentioned in the official documentation just works fine thereafter.
./configtxgen mychannel.block > test3.json
./configtxgen mychannel.block > test3.json 2019-09-01 15:45:24.878 PKT [common/tools/configtxgen] main -> INFO 001 Loading configuration 2019-09-01 15:45:24.878 PKT [common/tools/configtxgen/localconfig] LoadTopLevel -> PANI 002 Error reading configuration: Unsupported Config Type "" 2019-09-01 15:45:24.878 PKT [common/tools/configtxgen] func1 -> PANI 003 Error reading configuration: Unsupported Config Type "" panic: Error reading configuration: Unsupported Config Type "" [recovered] panic: Error reading configuration: Unsupported Config Type "" goroutine 1 [running]: github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc42054e9a0, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go
Seems like you need mychannel.block as json format Follow the steps below in order to get the result One can decode this mychannel.block using protolator & configtxlator Commands: Step1: GOTO fabricsamples/bin ./configtxlator start Step2: GOTO mychannel.block file location then issue below command curl -X POST --data-binary #mychannel.block http://127.0.0.1:7059/protolator/decode/common.Block > mychannel.json I have done the same for sample genesis.block check this http://ideone.com/L1hcRX which contain genesis.block as json format which contain all network information.
openstack vm network flow
I setup an openstack environment and create a few vms. the vms as follows: root#controller:~# nova list +--------------------------------------+----------+--------+----------------------------------+ | ID | Name | Status | Networks | +--------------------------------------+----------+--------+----------------------------------+ | 2a2dbaa8-8ae1-47c9-a9c1-516ef8b955ba | key1 | ACTIVE | private=10.0.0.11, 172.16.10.114 | | 6f2831d0-8263-40de-8ebc-9ed9f8eab905 | keytest | ACTIVE | private=10.0.0.10, 172.16.10.123 | | 7f732f7b-d19e-42da-bf9e-b2c2c3e401af | t2 | ACTIVE | private=10.0.0.4, 172.16.10.121 | | e858db20-20a6-43d2-bac8-45a0ade319f4 | test0001 | ACTIVE | private=10.0.0.13 | | d1ca2f5d-ba09-47af-8126-b68e38ded582 | tt01 | ACTIVE | private=10.0.0.12 | | cae980d4-3973-49ad-ba76-94d5284a849a | zls01 | ACTIVE | private=10.0.0.14, 172.16.10.124 | +--------------------------------------+----------+--------+----------------------------------+ 10.0.0.0/24 is the internal network, and 172.16.10.0/24 is the floaing ips. I ping 8.8.8.8 in my vm tt01(10.0.0.12) root#controller:~# ssh root#10.0.0.12 root#10.0.0.12's password: Permission denied, please try again. root#10.0.0.12's password: Last login: Thu Oct 23 14:16:10 2014 from 10.0.0.5 [root#tt01 ~]# [root#tt01 ~]# [root#tt01 ~]# [root#tt01 ~]# ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=27 time=287 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=27 time=286 ms 64 bytes from 8.8.8.8: icmp_seq=4 ttl=27 time=289 ms ^C I capture the network packet using tcpdump as follows: root#controller:~# tcpdump icmp -ee -n -v -i any tcpdump: listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes 14:18:24.972228 P fa:16:3e:ca:a8:8e ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 10.0.0.12 > 8.8.8.8: ICMP echo request, id 34381, seq 1, length 64 14:18:24.972228 In fa:16:3e:ca:a8:8e ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 10.0.0.12 > 8.8.8.8: ICMP echo request, id 34381, seq 1, length 64 14:18:24.972280 Out 00:1e:67:45:85:ac ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 63, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 172.16.10.15 > 8.8.8.8: ICMP echo request, id 34381, seq 1, length 64 14:18:25.259378 In 00:12:7f:7d:37:a1 ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 28, id 0, offset 0, flags [none], proto ICMP (1), length 84) 8.8.8.8 > 172.16.10.15: ICMP echo reply, id 34381, seq 1, length 64 14:18:25.259401 Out 00:1e:67:45:85:ad ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 27, id 0, offset 0, flags [none], proto ICMP (1), length 84) 8.8.8.8 > 10.0.0.12: ICMP echo reply, id 34381, seq 1, length 64 14:18:25.259407 Out 00:1e:67:45:85:ad ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 27, id 0, offset 0, flags [none], proto ICMP (1), length 84) 8.8.8.8 > 10.0.0.12: ICMP echo reply, id 34381, seq 1, length 64 14:18:25.972520 P fa:16:3e:ca:a8:8e ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 10.0.0.12 > 8.8.8.8: ICMP echo request, id 34381, seq 2, length 64 14:18:25.972520 In fa:16:3e:ca:a8:8e ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 10.0.0.12 > 8.8.8.8: ICMP echo request, id 34381, seq 2, length 64 14:18:25.972557 Out 00:1e:67:45:85:ac ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 63, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 172.16.10.15 > 8.8.8.8: ICMP echo request, id 34381, seq 2, length 64 14:18:26.258533 In 00:12:7f:7d:37:a1 ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 28, id 0, offset 0, flags [none], proto ICMP (1), length 84) 8.8.8.8 > 172.16.10.15: ICMP echo reply, id 34381, seq 2, length 64 14:18:26.258557 Out 00:1e:67:45:85:ad ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 27, id 0, offset 0, flags [none], proto ICMP (1), length 84) 8.8.8.8 > 10.0.0.12: ICMP echo reply, id 34381, seq 2, length 64 14:18:26.258562 Out 00:1e:67:45:85:ad ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 27, id 0, offset 0, flags [none], proto ICMP (1), length 84) 8.8.8.8 > 10.0.0.12: ICMP echo reply, id 34381, seq 2, length 64 14:18:26.972630 P fa:16:3e:ca:a8:8e ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) based on the iptables I know there is a snat, 10.0.0.12 is translated 172.16.10.15. root#controller:~# iptables -t nat -S nova-network-snat -N nova-network-snat -A nova-network-snat -j nova-network-float-snat -A nova-network-snat -s 10.0.0.0/24 -o eth1 -j SNAT --to-source 172.16.10.15 So my question is, when the icmp echo reply packet arrived at 172.16.10.15, how should it translate 172.16.10.15 to 10.0.0.12?