hyperledger fabric 1.1.0 solo模式多机部署问题

在部署peer 结点并且创建channel(peer channel create -o orderer.example.com:7050 -t 50s -c mychannel -f ./channel-artifacts/mychannel.tx)时,报错如下
2018-09-16 04:00:35.140 UTC [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2028-09-13 03:27:21 +0000 UTC
2018-09-16 04:00:35.140 UTC [msp] Validate -> DEBU 036 MSP Org1MSP validating identity
2018-09-16 04:00:35.140 UTC [msp] GetDefaultSigningIdentity -> DEBU 037 Obtaining default signing identity
2018-09-16 04:00:35.140 UTC [grpc] Printf -> DEBU 038 parsed scheme: ""
2018-09-16 04:00:35.141 UTC [grpc] Printf -> DEBU 039 scheme "" not registered, fallback to default scheme
2018-09-16 04:00:35.141 UTC [grpc] Printf -> DEBU 03a ccResolverWrapper: sending new addresses to cc: [{orderer.example.com:7050 0 }]
2018-09-16 04:00:35.141 UTC [grpc] Printf -> DEBU 03b ClientConn switching balancer to "pick_first"
2018-09-16 04:00:35.141 UTC [grpc] Printf -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc4201e87f0, CONNECTING
2018-09-16 04:00:35.142 UTC [grpc] Printf -> DEBU 03d pickfirstBalancer: HandleSubConnStateChange: 0xc4201e87f0, READY
2018-09-16 04:00:35.142 UTC [channelCmd] InitCmdFactory -> INFO 03e Endorser and orderer connections initialized
2018-09-16 04:00:35.142 UTC [msp] GetDefaultSigningIdentity -> DEBU 03f Obtaining default signing identity
2018-09-16 04:00:35.143 UTC [msp] GetDefaultSigningIdentity -> DEBU 040 Obtaining default signing identity
2018-09-16 04:00:35.143 UTC [msp/identity] Sign -> DEBU 041 Sign: plaintext: 0AA2060A074F7267314D53501296062D...53616D706C65436F6E736F727469756D
2018-09-16 04:00:35.143 UTC [msp/identity] Sign -> DEBU 042 Sign: digest: DC3500D168C423A486C0F683F5DF55BFE21B7EA850AA349C0D007546157C15AC
2018-09-16 04:00:35.143 UTC [msp] GetDefaultSigningIdentity -> DEBU 043 Obtaining default signing identity
2018-09-16 04:00:35.143 UTC [msp] GetDefaultSigningIdentity -> DEBU 044 Obtaining default signing identity
2018-09-16 04:00:35.143 UTC [msp/identity] Sign -> DEBU 045 Sign: plaintext: 0AD9060A1508021A0608E3AAF7DC0522...4A549260CA04773C47CF17A70D57D107
2018-09-16 04:00:35.144 UTC [msp/identity] Sign -> DEBU 046 Sign: digest: D717D2150B425501D954A480D4A4DFE4D0861F3E3AE76791722755A46BB07707
2018-09-16 04:00:35.144 UTC [grpc] Printf -> DEBU 047 parsed scheme: ""
2018-09-16 04:00:35.144 UTC [grpc] Printf -> DEBU 048 scheme "" not registered, fallback to default scheme
2018-09-16 04:00:35.144 UTC [grpc] Printf -> DEBU 049 ccResolverWrapper: sending new addresses to cc: [{orderer.example.com:7050 0 }]
2018-09-16 04:00:35.144 UTC [grpc] Printf -> DEBU 04a ClientConn switching balancer to "pick_first"
2018-09-16 04:00:35.144 UTC [grpc] Printf -> DEBU 04b pickfirstBalancer: HandleSubConnStateChange: 0xc4201e9120, CONNECTING
2018-09-16 04:00:35.145 UTC [grpc] Printf -> DEBU 04c pickfirstBalancer: HandleSubConnStateChange: 0xc4201e9120, READY
Error: got unexpected status: BAD_REQUEST -- error authorizing update: error validating DeltaSet: invalid mod_policy for element [Policy] /Channel/Application/Admins: mod_policy not set

求大神解答

1个回答

u012587011
hjzdx 回复u012587011: 现在又报错:got notified that the client transport was broken read tcp 172.24.0.4:35084->116.196.94.4:7050: read: connection reset by peer. Error: rpc error: code = Internal desc = transport is closing
一年多之前 回复
u012587011
hjzdx 感谢,这也是个原因,还有个原因是,orderer的cryptogen和peer的cryptogen版本不一致
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
HyperLedger fabric 1.0 部署问题
![各位大牛我在部署HyperLedger fabric 1.0时,执行./byfn.sh -m up 时包这个错怎么回事?麻烦各位大牛指教指教,谢谢了](https://img-ask.csdn.net/upload/201707/12/1499862394_291263.png)
hyperledger fabric1.4新功能测试
有测试过新功能吗?matbles02_private测试用例里面,在私有数据集合配置文件里将memberReadOnly设置为false,org2里提交proposal的节点为什么还是没有可读权限
Hyperledgar fabric1.4中如何离线安装
我知道可以先将docker-compose中的需要的镜像都下载下来。导入到自己的机器 fabric-baseimage.tar fabric-ca.tar fabric-ccenv.tar fabric-couchdb.tar fabric-nodeenv.tar fabric-orderer.tar fabric-peer.tar fabric-tools.tar 但在实例化链码的时候是会将链码编译为一个镜像。 这个过程是程序完成的。如果是离线的情况下无法下载基础镜像。无法完成实例化的步骤 不知道有谁知道这个基础镜像是那一个啊
Sending proposal to peer1.org1.example.com failed
原来用的nodejs的sdk,现在要换成java的sdk,底层docker容器也都启动成功了 ![docker](https://img-ask.csdn.net/upload/201809/30/1538267524_410437.png) 但在IDEA中运行End2endIT例子的时候报了 Sending instantiateProposalRequest to all peers with arguments: a and b set to 100 and 200 respectively 2018-09-30 00:30:16,755 main ERROR Channel:2768 - Sending proposal to peer1.org1.example.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=Network closed for unknown reason, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2768) at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:1540) at org.hyperledger.fabric.sdkintegration.End2endIT.runChannel(End2endIT.java:492) at org.hyperledger.fabric.sdkintegration.End2endIT.runFabricTest(End2endIT.java:208) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:189) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason at io.grpc.Status.asRuntimeException(Status.java:526) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:467) at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:37) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:684) at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:37) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:391) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:471) at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:553) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:474) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:591) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) 2018-09-30 00:30:16,758 main ERROR Channel:2768 - Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=Network closed for unknown reason, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2768) at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:1540) at org.hyperledger.fabric.sdkintegration.End2endIT.runChannel(End2endIT.java:492) at org.hyperledger.fabric.sdkintegration.End2endIT.runFabricTest(End2endIT.java:208) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:189) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason at io.grpc.Status.asRuntimeException(Status.java:526) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:467) at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:37) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:684) at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:37) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:391) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:471) at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:553) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:474) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:591) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) Received 2 instantiate proposal responses. Successful+verified: 0 . Failed: 2 Not enough endorsers for instantiate :0endorser failed with Sending proposal to peer1.org1.example.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=Network closed for unknown reason, cause=null}, on peerPeer peer1.org1.example.com url: grpc://47.104.249.104:7056 Not enough endorsers for instantiate :0endorser failed with Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=Network closed for unknown reason, cause=null}, on peerPeer peer0.org1.example.com url: grpc://47.104.249.104:7051 java.lang.AssertionError: Not enough endorsers for instantiate :0endorser failed with Sending proposal to peer1.org1.example.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=Network closed for unknown reason, cause=null}. Was verified:false at org.junit.Assert.fail(Assert.java:88) at org.hyperledger.fabric.sdkintegration.End2endIT.runChannel(End2endIT.java:512) at org.hyperledger.fabric.sdkintegration.End2endIT.runFabricTest(End2endIT.java:208) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:189) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) 查了半天也没弄清啥原因,望各位大佬不吝赐教!!!
fabric网络环境整合java-sdk grpc连接异常
1、调用fabric-java-sdk整合fabric网络环境。启动的过程中一直报错 ``` 23:16:57.825 [main] ERROR org.hyperledger.fabric.sdk.Channel - Channel Channel{id: 1, name: mychannel} Sending proposal with transaction: 5fe505ed0e555ac50cc4773876d8eb3746da951a3ad2f8461b2fa177901e5862 to Peer{ id: 2, name: peer0.org1.example.com, channelName: mychannel, url: grpc://x.x.x.x:7051} failed because of: gRPC failure=Status{code=INTERNAL, description=http2 exception, cause=io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002 at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:85) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.verifyFirstFrameIsSettings(Http2ConnectionHandler.java:350) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:251) at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:450) at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:441) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1408) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:677) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:612) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:529) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:491) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748) } java.lang.Exception: io.grpc.StatusRuntimeException: INTERNAL: http2 exception at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:4179) at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:854) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1820) at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1657) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1103) ``` grpc://x.x.x.x:7051 访问失败 服务器地址为阿里云服务 根据网上提供的方法都说是grpc通信错误,添加相应的依赖, 然后并没用。 实在搞不懂是怎么弄了 哪位大神指导一下。 Fabric环境为1.0的版本
我用对hyperledger fabric性能进行了测试,但是测试结果并不是很懂,求解答
![图片说明](https://img-ask.csdn.net/upload/201812/05/1543973916_452553.png) 在这张图中 我对Hyperledger Fabric进行了性能测试,得出了图中的结果,但测试结果并不很了解 1.docker中的名称是什么意思?peer0.org1.example.com和dev.peer0.org1.example.com以及couchdb.peer0.org1.example.com有什么区别? 2.cpu的占有率为什么会超过100%,为什么会有cpu(max)和cpu(avg)? 3.traffic in和traffic out什么意思? 4.Disc Read什么意思?
我现在将项目部署到Hyperledger Fabric上,请问我如何测试该平台性能?
我现在将项目部署到Hyperledger Fabric上,请问我如何测试该平台性能?我用什么软件来测试该平台性能,具体过程越具体越好,谢谢
求大佬帮助一下,安装hyperledger fabric的时候遇到的问题
[root@promote hyperledger]# make docker make: *** No rule to make target `docker'. Stop. 以上为我在编译Fabric模块时遇到的,希望大佬帮帮忙
搭建 Hyperledger Fabric环境,运行e2e实例出错
``` InitCmd -> ERRO 002 Cannot run peer because error when setting up MSP of type bccsp from directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp: could not load a valid signer certificate from directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts: stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts: no such file or directory !!!!!!!!!!!!!!! Ordering Service is not available, Please try again ... !!!!!!!!!!!!!!!! ================== ERROR !!! FAILED to execute End-2-End Scenario ================== ``` 以上是错误代码,求大佬zhi'jiao
centos7部署Hyperledger Fabric e2e示例遇到的问题
到Chaincode is installed on remote peer PEER2 这一步为止是成功的。 接下来出现错误 Error: Error endorsing chaincode: rpc error: code = Unknown desc = Error starting container: Post http://unix.sock/containers/create?name=dev-peer0.org2.example.com-mycc-1.0: dial unix /host/var/run/docker.sock: connect: permission denied 请教大家,错误可能是什么导致的呢?
windows通过java-sdk调用远程虚拟机上的链码错误,交易失败
# 错误如下,并配上docker ps,及sdk参数配配置图片 exception in thread "main" org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel mychannel failed with peer peer0.org1.example.com. Status FAILURE, details: Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=null, cause=java.lang.IndexOutOfBoundsException: readerIndex(0) + length(10) exceeds writerIndex(0): PooledUnsafeDirectByteBuf(ridx: 0, widx: 0, cap: 30) at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1403) at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1390) at io.netty.buffer.AbstractByteBuf.readSlice(AbstractByteBuf.java:856) at io.netty.handler.codec.http2.DefaultHttp2FrameWriter$DataFrameHeader.slice(DefaultHttp2FrameWriter.java:644) at io.netty.handler.codec.http2.DefaultHttp2FrameWriter.writeData(DefaultHttp2FrameWriter.java:160) at io.netty.handler.codec.http2.Http2OutboundFrameLogger.writeData(Http2OutboundFrameLogger.java:44) at io.netty.handler.codec.http2.DefaultHttp2ConnectionEncoder$FlowControlledData.write(DefaultHttp2ConnectionEncoder.java:411) at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController$FlowState.writeAllocatedBytes(DefaultHttp2RemoteFlowController.java:372) at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController$WritabilityMonitor$1.write(DefaultHttp2RemoteFlowController.java:562) at io.netty.handler.codec.http2.WeightedFairQueueByteDistributor$State.write(WeightedFairQueueByteDistributor.java:612) at io.netty.handler.codec.http2.WeightedFairQueueByteDistributor.distribute(WeightedFairQueueByteDistributor.java:293) at io.netty.handler.codec.http2.WeightedFairQueueByteDistributor.distributeToChildren(WeightedFairQueueByteDistributor.java:326) at io.netty.handler.codec.http2.WeightedFairQueueByteDistributor.distribute(WeightedFairQueueByteDistributor.java:272) at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController$WritabilityMonitor.writePendingBytes(DefaultHttp2RemoteFlowController.java:643) at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController.writePendingBytes(DefaultHttp2RemoteFlowController.java:267) at io.netty.handler.codec.http2.Http2ConnectionHandler.flush(Http2ConnectionHandler.java:200) at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776) at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768) at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749) at io.netty.channel.DefaultChannelPipeline.flush(DefaultChannelPipeline.java:983) at io.netty.channel.AbstractChannel.flush(AbstractChannel.java:248) at io.grpc.netty.WriteQueue.flush(WriteQueue.java:136) at io.grpc.netty.WriteQueue.access$000(WriteQueue.java:32) at io.grpc.netty.WriteQueue$1.run(WriteQueue.java:44) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Unknown Source) } at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1168) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:948) at com.chanpay.demo.Demo.initChannel(Demo.java:151) at com.chanpay.demo.Demo.invoke(Demo.java:59) at com.chanpay.demo.Demo.main(Demo.java:47)
通过java版sdk调用智能合约向Fabric提交交易出现异常
是在程序中通过java版的Fabric-sdk调用部署在远程主机上的智能合约执行相关的业务逻辑,但在执行过程中出现异常信息,导致交易请求没有提交到Fabric的peer节点上,具体异常信息如下: ``` 17:16:06 [http-bio-8080-exec-5] ERROR org.hyperledger.fabric.sdk.Channel - Sending proposal to peer0.org0.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: Failed to unmarshal section -), cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: chaincode error (status: 500, message: Failed to unmarshal section -) at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2241) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2155) at org.hyperledger.fabric.sdk.Channel.sendTransactionProposal(Channel.java:2103) at com.cmit.fabric.java.sdk.test.bean.ChaincodeManager.invokeWithTransactionId(ChaincodeManager.java:307) at com.cmit.fabric.java.sdk.test.service.impl.SectionSDKServiceImpl.updateSection(SectionSDKServiceImpl.java:155) at rsbc.controller.NetworkController.modifySave(NetworkController.java:357) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:832) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:743) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:961) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:895) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:869) at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.planetj.servlet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:293) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at net.mopai.filter.SiteStatusFilter.doFilterInternal(SiteStatusFilter.java:50) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at net.mopai.filter.HtmlFilter.doFilterInternal(HtmlFilter.java:40) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) Caused by: io.grpc.StatusRuntimeException: UNKNOWN: chaincode error (status: 500, message: Failed to unmarshal section -) at io.grpc.Status.asRuntimeException(Status.java:526) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:427) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:419) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:60) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:493) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$500(ClientCallImpl.java:422) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:525) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:102) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ... 1 common frames omitted ``` 面对这个问题没有什么头绪,不知道是哪里出了问题,求问Fabric方面的大神能否给帮忙解释一下,这个异常是因为什么问题导致的!!!不胜感激!!!
Hyperledger Explorer 出现 Error: 2 UNKNOWN: Stream removed 异常
``` [2019-11-13 20:20:34.351] [DEBUG] Platform - ******* Initialization started for hyperledger fabric platform ****** [2019-11-13 20:20:34.352] [DEBUG] Platform - Setting admin organization enrolment files [2019-11-13 20:20:34.352] [DEBUG] Platform - Creating client [[object Object]] >> first-network [2019-11-13 20:20:34.353] [DEBUG] FabricUtils - ************ Initializing fabric client for [first-network]************ [2019-11-13 20:20:34.353] [DEBUG] FabricClient - Client configuration [first-network] ... this.client_config { name: 'first-network', profile: '/root/go/src/github.com/hyperledger/blockchain-explorer/app/platform/fabric/connection-profile/first-network.json', enableAuthentication: false } [2019-11-13 20:20:34.354] [DEBUG] FabricGateway - LOADING CONFIGURATION [OBJECT OBJECT] [2019-11-13 20:20:34.354] [DEBUG] FabricGateway - LOADING CONFIGURATION [OBJECT OBJECT] [2019-11-13 20:20:34.354] [INFO] FabricGateway - peer0.org1.example.com [2019-11-13 20:20:34.354] [INFO] FabricGateway - peer0.org1.example.com [2019-11-13 20:20:34.355] [INFO] FabricGateway - /root/go/src/github.com/hyperledger/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem adminPrivateKeyPath /root/go/src/github.com/hyperledger/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/5ceddae32a833ed134279f0a7caab64a7193614c86948ad3491bb309283b401d_sk [2019-11-13 20:20:34.355] [INFO] FabricGateway - /root/go/src/github.com/hyperledger/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem adminPrivateKeyPath /root/go/src/github.com/hyperledger/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/5ceddae32a833ed134279f0a7caab64a7193614c86948ad3491bb309283b401d_sk [2019-11-13 20:20:34.356] [INFO] FabricGateway - admin [2019-11-13 20:20:34.356] [INFO] FabricGateway - admin [2019-11-13 20:20:34.631] [DEBUG] FabricClient - Set client [first-network] default channel as >> mychannel [2019-11-13 20:20:34.652] [ERROR] FabricClient - { Error: 2 UNKNOWN: Stream removed at Object.exports.createStatusError (/root/go/src/github.com/hyperledger/blockchain-explorer/node_modules/fabric-network/node_modules/grpc/src/common.js:91:15) at Object.onReceiveStatus (/root/go/src/github.com/hyperledger/blockchain-explorer/node_modules/fabric-network/node_modules/grpc/src/client_interceptors.js:1204:28) at InterceptingListener._callNext (/root/go/src/github.com/hyperledger/blockchain-explorer/node_modules/fabric-network/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/root/go/src/github.com/hyperledger/blockchain-explorer/node_modules/fabric-network/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/root/go/src/github.com/hyperledger/blockchain-explorer/node_modules/fabric-network/node_modules/grpc/src/client_interceptors.js:845:24) code: 2, metadata: Metadata { _internal_repr: {} }, details: 'Stream removed', peer: { url: 'grpc://隐藏地址:7051', name: 'peer0.org1.example.com', options: { 'grpc.max_receive_message_length': -1, 'grpc.max_send_message_length': -1, 'grpc.keepalive_time_ms': 120000, 'grpc.http2.min_time_between_pings_ms': 120000, 'grpc.keepalive_timeout_ms': 20000, 'grpc.http2.max_pings_without_data': 0, 'grpc.keepalive_permit_without_calls': 1, name: 'peer0.org1.example.com', 'request-timeout': 300000, clientCert: '-----BEGIN CERTIFICATE-----\nMIICKzCCAdGgAwIBAgIRAJw2YDgGud/J/TE7tq1P1a8wCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTkxMTEzMDMzMjAwWhcNMjkxMTEwMDMzMjAw\nWjBsMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEPMA0GA1UECxMGY2xpZW50MR8wHQYDVQQDDBZBZG1pbkBv\ncmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEDv+QrNpH\nD7X3Erolb3YUfoPwfWXpBReeNumtPqGmSqMtpEOm/Bz1JoZ6crNav6/QDrOrOZHl\naHYxMfFrZy0aO6NNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYD\nVR0jBCQwIoAgjdsNfvZPIL6xrscyAQBn/1ykaWuPEFOyeEa0ryCJYqMwCgYIKoZI\nzj0EAwIDSAAwRQIhAJ5sBseMFcGBs/6xr2xj/RzsPWCfrWvk6wL3y/sm468aAiBL\n9CBXGEs01kgH33Z61/vEpTJLubdw19v2gr1rE4p/kw==\n-----END CERTIFICATE-----\n', 'grpc.ssl_target_name_override': 'peer0.org1.example.com', 'grpc.default_authority': 'peer0.org1.example.com' } } } [2019-11-13 20:20:34.653] [DEBUG] FabricClient - this.defaultPeer peer0.org1.example.com [2019-11-13 20:20:34.662] [ERROR] FabricClient - { Error: 2 UNKNOWN: Stream removed at Object.exports.createStatusError (/root/go/src/github.com/hyperledger/blockchain-explorer/node_modules/fabric-network/node_modules/grpc/src/common.js:91:15) at Object.onReceiveStatus (/root/go/src/github.com/hyperledger/blockchain-explorer/node_modules/fabric-network/node_modules/grpc/src/client_interceptors.js:1204:28) at InterceptingListener._callNext (/root/go/src/github.com/hyperledger/blockchain-explorer/node_modules/fabric-network/node_modules/grpc/src/client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (/root/go/src/github.com/hyperledger/blockchain-explorer/node_modules/fabric-network/node_modules/grpc/src/client_interceptors.js:618:8) at callback (/root/go/src/github.com/hyperledger/blockchain-explorer/node_modules/fabric-network/node_modules/grpc/src/client_interceptors.js:845:24) code: 2, metadata: Metadata { _internal_repr: {} }, details: 'Stream removed' } [2019-11-13 20:20:34.665] [INFO] main - Please set logger.setLevel to DEBUG in ./app/helper.js to log the debugging. ```
Deploy to the running Hyperledger Fabric 中出现的错误
Hyperledger Composer部署时 我在完成这步composer network deploy -a my-network.bna -p hlfv1 -i PeerAdmin -s randomString 之后会出现Error:Failed to deserialize createor identity,err MSP Org1MSP is unknow 是怎么回事
canvas库fabric.js如何设置背景自适应
fabric.js 设置背景的方法,这样确实可以设置 canvas 背景图 var canvas = new fabric.Canvas('canvasx'); canvas.setBackgroundImage('../img/zxzx.jpg', canvas.renderAll.bind(canvas)); 如果图像太大的话,那么背景只会显示一部分图像 请问各位请问各位大神,如何用 fabric.js 设置背景图的 高和宽呢? 使之自动适应canvas的大小
使用Fabric.js循环添加图片,总是堆叠在一起
使用Fabric.js循环添加图片,总是堆叠在一起。 代码如下: ``` var canvas = new fabric.Canvas("myPanel"); for (var i = 0; i < 5; i++) { var myLeft = i * 100; fabric.Image.fromURL("Images/PC.png", function (oImg) { oImg.left = myLeft; oImg.top = 400, canvas.add(oImg); }); ``` 发现这5张图片的left都是按照i=4的时候计算的,显示以后全部重合,请教一下这个情况是怎么回事儿?
关于jquery输出的数值如何传递到其他
首先,我在PHP网页中写了一个选择颜色与容量的手机选择器(没有连接)数据库 ``` <div class="row allocate-row"><div class="col-xs-12" id="fabric"> <div class="allocate_list"> <span class="name">选择颜色:</span> <button class="btn-allocate btn-normal"><i class="select-color1"></i>黑色</button> <button class="btn-allocate btn-normal"><i class="select-color2"></i>白色</button> <button class="btn-allocate btn-normal"><i class="select-color3"></i>粉色金</button> <button class="btn-allocate btn-normal"><i class="select-color4"></i>翡翠绿</button> </div></div></div> <br/> <div class="row allocate-row"><div class="col-xs-12" id="fabric2"> <div class="allocate_list"> <span class="name">选择容量:</span> <button class="btn-allocate btn-normal">64G</button> <button class="btn-allocate btn-normal">128G</button> <button class="btn-allocate btn-normal">256G</button> </div></div></div> ``` 通过下面的jquery代码处理,并同步显示在网页中 ``` <script> $(function(){ $(" .btn-allocate.btn-normal").click(function(){ if ($(this).hasClass("active")){ $(this).removeClass("active") } else{ $(this).addClass("active") } }) //颜色,单选 $("#fabric .btn-allocate.btn-normal").click(function(){ $("#fabric .btn-allocate.btn-normal").removeClass("active"); $(this).addClass("active"); }) $("#fabric button").click(function(){ $("#show-fabric span").remove(); $("#show-fabric").append("<span>"+$(this).find(".name").text()+$(this).text()+"</span>") }) //容量,单选 $("#fabric2 .btn-allocate.btn-normal").click(function(){ $("#fabric2 .btn-allocate.btn-normal").removeClass("active"); $(this).addClass("active"); }) $("#fabric2 button").click(function(){ $("#show-fabric2 span").remove(); $("#show-fabric2").append("<span>"+"&nbsp;"+$(this).find(".name").text()+$(this).text()+"</span>") }) }) </script> ``` 在以下span中显示 ``` <span id="show-fabric" ></span> <span id="show-fabric2" ></span> ``` 最终效果如下![图片说明](https://img-ask.csdn.net/upload/201912/07/1575723884_153036.jpg)![图片说明](https://img-ask.csdn.net/upload/201912/07/1575723899_389980.jpg) 选择完属性之后,商品名字后面会加入所选属性,请问各位大佬,应该如何才能将span中实时出现的属性,保存进sseion!感谢各位
mysql-connector-java 6.0.6,怎样使用FabricMySQLDriver
MySQL Fabric 在mysql-connector-java 5.1.45中使用com.mysql.fabric.jdbc.FabricMySQLDriver 驱动, 在6.0.6中使用哪个驱动??
实例化合约报错:chaincode registration failed
环境是用fabric1.4.2 + raft 共识机制 3台raft+1台peer image 均启动正常 在实例化链码时候报错,请各位大咖帮我看看,如何解决,谢谢 # 1、实例化链码 peer chaincode instantiate -o orderer0.koko.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/koko.com/orderers/orderer0.koko.com/msp/tlscacerts/tlsca.koko.com-cert.pem -C kokochannel -n mycc -l golang -v 1.0 -c '{"Args":["init","a","100","b","200"]}' -P 'AND("Org1MSP.peer")' # 2、cli容器报错: Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 0![图片说明](https://img-ask.csdn.net/upload/201909/21/1569050405_900988.png) # 3、实例化合约peer docker 日志报错 信息 docker logs -f peer d4e4543te534r5 [kokochannel][52342533] Exit chaincode: name:"lscc" (44159ms) 2019-09-21 06:23:09.871 UTC [endorser] SimulateProposal -> ERRO 04c [kokochannel][52342533] failed to invoke chaincode name:"lscc" , error: container exited with 0 github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1 /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:63 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333 chaincode registration failed 2019-09-21 06:23:09.871 UTC [comm.grpc.server] 1 -> INFO 04d unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.19.0.1:39190 grpc.code=OK grpc.call_duration=44.161172022s![图片说明](https://img-ask.csdn.net/upload/201909/21/1569050439_481805.png) 4、实例化合约 orderer docker 日志错误信息 docker logs -f 78ret8rere8retre 2019-09-21 06:04:23.367 UTC [common.deliver] deliverBlocks -> WARN 039 [channel: kokochannel] Rejecting deliver request for 192.168.213.134:46044 because of consenter error 2019-09-21 06:04:23.372 UTC [comm.grpc.server] 1 -> INFO 03a streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=192.168.213.134:46044 grpc.code=OK grpc.call_duration=197.489105ms 2019-09-21 06:04:23.591 UTC [common.deliver] deliverBlocks -> WARN 03b [channel: kokochannel] Rejecting deliver request for 192.168.213.134:46046 because of consenter error 2019-09-21 06:04:23.643 UTC [comm.grpc.server] 1 -> INFO 03c streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=192.168.213.134:46046 grpc.code=OK grpc.call_duration=252.482946ms 2019-09-21 06:04:23.848 UTC [common.deliver] deliverBlocks -> WARN 03d [channel: kokochannel] Rejecting deliver request for 192.168.213.134:46048 because of consenter error 2019-09-21 06:04:23.848 UTC [comm.grpc.server] 1 -> INFO 03e streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=192.168.213.134:46048 grpc.code=OK grpc.call_duration=200.238916ms 2019-09-21 06:04:24.054 UTC [common.deliver] deliverBlocks -> WARN 03f [channel: kokochannel] Rejecting deliver request for 192.168.213.134:46050 because of consenter error 2019-09-21 06:04:24.054 UTC [comm.grpc.server] 1 -> INFO 040 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=192.168.213.134:46050 grpc.code=OK grpc.call_duration=201.471445ms 2019-09-21 06:04:24.260 UTC [common.deliver] deliverBlocks -> WARN 041 [channel: kokochannel] Rejecting deliver request for 192.168.213.134:46052 because of consenter error 2019-09-21 06:04:24.260 UTC [comm.grpc.server] 1 -> INFO 042 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=192.168.213.134:46052 grpc.code=OK grpc.call_duration=201.238803ms 2019-09-21 06:04:24.295 UTC [orderer.consensus.etcdraft] Step -> INFO 043 1 [logterm: 1, index: 3, vote: 0] cast MsgPreVote for 2 [logterm: 1, index: 3] at term 1 channel=kokochannel node=1 2019-09-21 06:04:24.339 UTC [orderer.consensus.etcdraft] Step -> INFO 044 1 [term: 1] received a MsgVote message with higher term from 2 [term: 2] channel=kokochannel node=1 2019-09-21 06:04:24.339 UTC [orderer.consensus.etcdraft] becomeFollower -> INFO 045 1 became follower at term 2 channel=kokochannel node=1 2019-09-21 06:04:24.339 UTC [orderer.consensus.etcdraft] Step -> INFO 046 1 [logterm: 1, index: 3, vote: 0] cast MsgVote for 2 [logterm: 1, index: 3] at term 2 channel=kokochannel node=1 2019-09-21 06:04:24.343 UTC [orderer.consensus.etcdraft] run -> INFO 047 raft.node: 1 elected leader 2 at term 2 channel=kokochannel node=1 2019-09-21 06:04:24.344 UTC [orderer.consensus.etcdraft] serveRequest -> INFO 048 Raft leader changed: 0 -> 2 channel=kokochannel node=1 2019-09-21 06:04:24.498 UTC [common.deliver] Handle -> WARN 049 Error reading from 192.168.213.134:46054: rpc error: code = Canceled desc = context canceled 2019-09-21 06:04:24.498 UTC [comm.grpc.server] 1 -> INFO 04a streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=192.168.213.134:46054 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=233.075631ms 2019-09-21 06:23:09.917 UTC [orderer.common.broadcast] Handle -> WARN 04b Error reading from 192.168.213.134:46118: rpc error: code = Canceled desc = context canceled 2019-09-21 06:23:09.917 UTC [comm.grpc.server] 1 -> INFO 04c streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.peer_address=192.168.213.134:46118 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=44.160408206s![图片说明](https://img-ask.csdn.net/upload/201909/21/1569050453_792288.png) 已解决
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
JDK12 Collectors.teeing 你真的需要了解一下
前言 在 Java 12 里面有个非常好用但在官方 JEP 没有公布的功能,因为它只是 Collector 中的一个小改动,它的作用是 merge 两个 collector 的结果,这句话显得很抽象,老规矩,我们先来看个图(这真是一个不和谐的图????): 管道改造经常会用这个小东西,通常我们叫它「三通」,它的主要作用就是将 downstream1 和 downstre...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
【图解经典算法题】如何用一行代码解决约瑟夫环问题
约瑟夫环问题算是很经典的题了,估计大家都听说过,然后我就在一次笔试中遇到了,下面我就用 3 种方法来详细讲解一下这道题,最后一种方法学了之后保证让你可以让你装逼。 问题描述:编号为 1-N 的 N 个士兵围坐在一起形成一个圆圈,从编号为 1 的士兵开始依次报数(1,2,3…这样依次报),数到 m 的 士兵会被杀死出列,之后的士兵再从 1 开始报数。直到最后剩下一士兵,求这个士兵的编号。 1、方...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
GitHub标星近1万:只需5秒音源,这个网络就能实时“克隆”你的声音
作者 | Google团队 译者 | 凯隐 编辑 | Jane 出品 | AI科技大本营(ID:rgznai100) 本文中,Google 团队提出了一种文本语音合成(text to speech)神经系统,能通过少量样本学习到多个不同说话者(speaker)的语音特征,并合成他们的讲话音频。此外,对于训练时网络没有接触过的说话者,也能在不重新训练的情况下,仅通过未知...
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员...
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC...
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下...
【管理系统课程设计】美少女手把手教你后台管理
【文章后台管理系统】URL设计与建模分析+项目源码+运行界面 栏目管理、文章列表、用户管理、角色管理、权限管理模块(文章最后附有源码) 1. 这是一个什么系统? 1.1 学习后台管理系统的原因 随着时代的变迁,现如今各大云服务平台横空出世,市面上有许多如学生信息系统、图书阅读系统、停车场管理系统等的管理系统,而本人家里就有人在用烟草销售系统,直接在网上完成挑选、购买与提交收货点,方便又快捷。 试想,若没有烟草销售系统,本人家人想要购买烟草,还要独自前往药...
4G EPS 第四代移动通信系统
目录 文章目录目录4G 与 LTE/EPCLTE/EPC 的架构E-UTRANE-UTRAN 协议栈eNodeBEPCMMES-GWP-GWHSSLTE/EPC 协议栈概览 4G 与 LTE/EPC 4G,即第四代移动通信系统,提供了 3G 不能满足的无线网络宽带化,主要提供数据(上网)业务。而 LTE(Long Term Evolution,长期演进技术)是电信领域用于手机及数据终端的高速无线通...
相关热词 c# 输入ip c# 乱码 报表 c#选择结构应用基本算法 c# 收到udp包后回包 c#oracle 头文件 c# 序列化对象 自定义 c# tcp 心跳 c# ice连接服务端 c# md5 解密 c# 文字导航控件
立即提问