grpc连接服务器报错,连接报Make sure to call shutdown()

每次使用java客户端连接python服务器时,grpc连接就报错。但是最终会连接成功。
每次报错一大堆错误日志:
ERROR io.grpc.internal.ManagedChannelOrphanWrapper - ~~*~ Channel ManagedChannelImpl{logId=433, target=57.101.32.97:8002} was not shutdown properly!!! ~*~*~*
Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
java.lang.RuntimeException: ManagedChannel allocation site
at io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.(ManagedChannelOrphanWrapper.java:94)
at io.grpc.internal.ManagedChannelOrphanWrapper.(ManagedChannelOrphanWrapper.java:52)
at io.grpc.internal.ManagedChannelOrphanWrapper.(ManagedChannelOrphanWrapper.java:43)
at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:514)
at com.ruijie.wechat.open.util.GrpcUtil.createChannel(GrpcUtil.java:32)
at com.ruijie.wechat.open.util.GrpcUtil.getGrpcChannel(GrpcUtil.java:41)
at com.ruijie.wechat.open.service.statistics.impl.UnifiedDataCenterService.dealCountTypeSpecs(UnifiedDataCenterService.java:127)
at com.ruijie.wechat.open.service.statistics.impl.UnifiedDataCenterService$$FastClassBySpringCGLIB$$a137a63d.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:669)
at com.ruijie.wechat.open.service.statistics.impl.UnifiedDataCenterService$$EnhancerBySpringCGLIB$$df7696f8.dealCountTypeSpecs()
at com.ruijie.wechat.open.service.statistics.impl.UnifiedStatisticsServiceImpl.getCountInfo(UnifiedStatisticsServiceImpl.java:116)
at com.ruijie.wechat.open.controller.statistics.UnifiedStatisticsController.getCount(UnifiedStatisticsController.java:127)
at sun.reflect.GeneratedMethodAccessor502.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:110)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:108)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
c++ grpc 异步服务器在多线程情况下出core。
我有一个c++ grpc服务器,异步的,不是stream模式,在多线程情况下跑了一会儿会core,打印出来的错误是 E0717 18:54:02.635424482 14110 server_cc.cc:677] Fatal: grpc_call_start_batch returned 8 E0717 18:54:02.635514690 14110 server_cc.cc:678] ops[0]: SEND_MESSAGE ptr=0x7f3c0815cb60 E0717 18:54:02.635563281 14110 server_cc.cc:678] ops[1]: SEND_STATUS_FROM_SERVER status=0 单线程情况下就没有啥问题,请问这个是为什么? 我google了下,说是不能同时有多个写,可是我看grpc repo里面的实现也没有对输出做处理。 有没有正确的grpc async simple server 在多线程下的正确实现可以参考下的吗?
实例化合约报错: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) 已解决
Python client + Java Server 使用grpc 报错
Python client + Java Server 使用grpc 报错 因为没有找到现成的例子,对python也不是很熟悉.所以请各位看官大佬帮忙看下这个问题.最好有的demo的话也可以给一下.多谢 ``` grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with (StatusCode.UNIMPLEMENTED, Method not found: DemoGrpc.SendMailService/sendMail)> ``` proto文件都是一样.同种语言之间调用没有问题,就是互相调用的时候直接报这个错.
grpc helloworld程序卡死?
在跟随教程安装 grpc 后运行 helloworld 时,greeter__server 没有预想的输出。 具体来说应该是在 "BuildAndStart" 这一步卡住,清空grpc重装后还是这个问题,不知道什么原因。 跟随这个教程:https://blog.csdn.net/libaineu2004/article/details/80734547 我确定完全按照教程去做的,除了git下载第三方库下载不了去github里一个个手动拷贝的 ![图片说明](https://img-ask.csdn.net/upload/202001/16/1579136058_120097.png) 环境是虚拟机centos7
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的版本
关于Colab上Keras模型转TPU模型的问题
使用TPU加速训练,将Keras模型转TPU模型时报错,如图![图片说明](https://img-ask.csdn.net/upload/202001/14/1578998736_238721.png) 关键代码如下 引用库: ``` %tensorflow_version 1.x import json import os import numpy as np import tensorflow as tf from tensorflow.python.keras.applications import resnet from tensorflow.python.keras import callbacks from tensorflow.python.keras.preprocessing.image import ImageDataGenerator import matplotlib.pyplot as plt ``` 转换TPU模型代码如下 ``` # This address identifies the TPU we'll use when configuring TensorFlow. TPU_WORKER = 'grpc://' + os.environ['COLAB_TPU_ADDR'] tf.logging.set_verbosity(tf.logging.INFO) self.model = tf.contrib.tpu.keras_to_tpu_model(self.model, strategy=tf.contrib.tpu.TPUDistributionStrategy(tf.contrib.cluster_resolver.TPUClusterResolver(TPU_WORKER))) self.model = resnet50.ResNet50(weights=None, input_shape=dataset.input_shape, classes=num_classes) ```
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. ```
grpc-java 如何做负载均衡?
那位大佬有关于grpc-java的负载均衡的demo?求大佬解救一下小白!!!
Error:(22, 8) java: 类重复: net.whir.hos.organization.grpc.converters.UserInfoConverterImpl
用spring Boot 启动 显示类重复 求各位大神帮帮忙,如何解决?![图片说明](https://img-ask.csdn.net/upload/201911/23/1574503940_832340.png)
--go_out: protoc-gen-go: 系统找不到指定的文件。
protoc --go_out=plugins=grpc:. hello.proto --go_out: protoc-gen-go: 系统找不到指定的文件。
急求大佬指导grpc python进行安全连接的代码(有PHP版本的代码,改写成python)
急求大佬,我现在在用python写grpc的客户端,用来获取数据提供商的股票数据。提供商只给了我一个PHP版本的代码用作指导,但是我需要用python写。其他地方都没有问题了,只有安全连接这个部分卡住了,查了两天也没查到解决办法。。用了好几种api可是都不行。情况就是有url,端口,.pem格式的证书以及账号和密码。大概的思路应该是在建立channel的时候带入额外的账号密码等信息? 求大佬帮忙看看用python怎么写呢。。跪谢大佬了! 下面为php代码: ![图片说明](https://img-ask.csdn.net/upload/201708/15/1502780176_733195.jpg) 下面为我写的不好用的python代码: ``` from __future__ import print_function import grpc import historicalQuote_pb2 import historicalQuote_pb2_grpc import common_pb2 import common_pb2_grpc import marketData_pb2 import marketData_pb2_grpc import os from google import auth as google_auth from google.auth.transport import grpc as google_auth_transport_grpc from google.auth.transport import requests as google_auth_transport_requests def run(): symbol = common_pb2.Symbol() symbol.code = "BABA" symbol.market = common_pb2.US symbol.type = common_pb2.Stock market_request = marketData_pb2.MarketDataRequest() market_request.symbol.code = symbol.code market_request.symbol.market = symbol.market market_request.symbol.type = symbol.type market_request.language = common_pb2.zhHans print(market_request) try: path = os.path.abspath('.') pemPath = path + '/open_test_cert.pem' transport_creds = grpc.ssl_channel_credentials(open(pemPath).read()) options = [] update_metadata = {} update_metadata2 = {} update_metadata['UserName'] = 'xxxx' update_metadata['Password'] = 'yyyy' update_metadata2['grpc.ssl_target_name_override'] = 'open.test.yintongzhibo.com' options.append(update_metadata) # options.append(update_metadata2) channel = grpc.secure_channel("open.test.yintongzhibo.com:9002",transport_creds,options) # credentials , project= google_auth.default(scopes=(scope1,scope2,scope3)) # credentials , project= google_auth.default() # http_request = google_auth_transport_requests.Request() # metadata_plugin = AuthMetadataPlugin(credentials,http_request) # google_auth_credentials = grpc.metadata_call_credentials(metadata_plugin) # ssl_credentials = grpc.ssl_channel_credentials(open(pemPath).read()) # composite_credentials = grpc.composite_channel_credentials(ssl_credentials,google_auth_credentials) # channel = grpc.secure_channel("open.test.yintongzhibo.com:9002",composite_credentials) # channel = google_auth_transport_grpc.secure_authorized_channel(credentials,request,'open.test.yintongzhibo.com:9002') stub = historicalQuote_pb2_grpc.HistoricalQuoteServiceStub(channel) response = stub.getTodayM1Quotes(symbol) # stub = marketData_pb2_grpc.MarketDataServiceStub(channel) # response = stub.getMarketData(market_request) print(response.message) except Exception as e: print (e) if __name__ == '__main__': run() ```
Prometheus 如何监控 grpc-java server
如何通过prometheus 去监控 grpc 的 server ip 等一些信息?用的是Java语言
怎么使用gRPC调用SpringBean的方法
最近在学习gRPC,请问各位大神,怎么把gRPC集成到Spring环境里,通过gRPC远程调用SpringBean?
移植GRPC,key在开源Java server上加载,总是报Proc-type:4
小妹初步接触这个grpc,看了一下: 产品必须要用固定的key文件,格式为下面的,应该是pkcs1,在工具服务端加载总是报错;然后grpc 开源的自己客户端、服务端对接,可以,我看了下,是pkcs8的。想请问一下,grpc 开源的只能支持pkcs8么,不能支持pkcs1的key么。但是产品上的key必须是pkcs1,如果是pkcs8,他会提示:key文件没有加密!现在只能寄希望开源能适配pkcs1的情况了 这种情况要怎么适配 小妹只有3个币,倾其所有,望大神帮我解答 -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: DES-EDE3-CBC,29DE8F99F382D122 3gQZqxU8HPaUzfFOX1scxXU2qiJezXEwVarq13fALK6/08CEs+66O7iQxfjSMsT9 J9aDluB7Xr9JtAhAqGCQZ9XMLS5rP7aOWnXpmp46XtDYoYEB3Kebov7iFJOEAgXf xtPm7AJtQSqTE1wof4y9EQTjysECnndyyXDASt/ugvfFuLn6dZ5Qiv8f2Jpce8Ek dzU6ToVFnrb3eNt+/UP1PGCKFuTA6nEG284e0FrTE94JL8Fwi9NWlp7CdYINM2HL Q6TMLIVdxJk/gnZm3h2bmVrqhMoacNdStC6EKMoEBoSWsqTpQRg08Z9qA6m5BjYI CzoRNfB5BPIIVxCa1maxWbCbac1Wk+34bwk1aLuKZGXRpRWT3wE5vMYr6y54MbYt XMtB7I6xLQZRzWEkqxWtpca/PfzgGF0DwxSLGFIVmc0EpdX7OJQEjPoLeCTokDlG K4c1S930kqMrkK8Fc4o7l05TzRGwQQVJCw0MaN626daSy1obF/hHoZPt8jTWFmBV kELDGwljaxvBj5oqBZZuZwv2IGZ56W4vbyDuF7/CoGLAtnh5XxXSV14jlo62NYIf g/BW6tPznLXCWm+gzNJ6nud7cARZZwOfF4dQND6JIKGLob0cAUHkawqXXEbRUdF5 IVCRCbrpg14BZyRyoGsj7oQXBQz0h/8QE7Lj8QqIZ5is84xAczs/+UWtx+qZKFq1 ugAm+raN+jFL4LtAe7dovDSx7SfRgPkQJykToaiMP4hJcPqHHtoBw7oiaFZzY5KV p131eXUMr8Yv9w1FWBlc8IrInvBkGmMhcsPbePh9/CKQdU6WH993Dg== -----END RSA PRIVATE KEY-----
帮忙解决一个docker守护进程自己莫名死掉的问题,containerd异常
CentOS7, 多台虚拟机构建的Docker集群,所有服务器配置相同,其中一台总是莫名的Docker守护进程死掉,查看message日志如下: ``` Sep 3 12:30:03 sup-svc-70 systemd: Unit containerd.service entered failed state. Sep 3 12:30:03 sup-svc-70 containerd: github.com/containerd/containerd/metrics/cgroups.(*oomCollector).start(0xc0003146c0) Sep 3 12:30:03 sup-svc-70 containerd: /go/src/github.com/containerd/containerd/metrics/cgroups/oom.go:114 +0x7d Sep 3 12:30:03 sup-svc-70 containerd: created by github.com/containerd/containerd/metrics/cgroups.newOOMCollector Sep 3 12:30:03 sup-svc-70 containerd: /go/src/github.com/containerd/containerd/metrics/cgroups/oom.go:50 +0xed Sep 3 12:30:03 sup-svc-70 containerd: goroutine 15 [IO wait, 1615 minutes]: Sep 3 12:30:03 sup-svc-70 containerd: internal/poll.runtime_pollWait(0x7f906759ff00, 0x72, 0x0) Sep 3 12:30:03 sup-svc-70 containerd: /.GOROOT/src/runtime/netpoll.go:173 +0x68 Sep 3 12:30:03 sup-svc-70 containerd: internal/poll.(*pollDesc).wait(0xc00036af98, 0x72, 0xc0001b6800, 0x0, 0x0) Sep 3 12:30:03 sup-svc-70 containerd: /.GOROOT/src/internal/poll/fd_poll_runtime.go:85 +0x9c Sep 3 12:30:03 sup-svc-70 containerd: internal/poll.(*pollDesc).waitRead(0xc00036af98, 0xffffffffffffff00, 0x0, 0x0) Sep 3 12:30:03 sup-svc-70 containerd: /.GOROOT/src/internal/poll/fd_poll_runtime.go:90 +0x3f Sep 3 12:30:03 sup-svc-70 containerd: internal/poll.(*FD).Accept(0xc00036af80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) Sep 3 12:30:03 sup-svc-70 containerd: /.GOROOT/src/internal/poll/fd_unix.go:384 +0x1a2 Sep 3 12:30:03 sup-svc-70 containerd: net.(*netFD).accept(0xc00036af80, 0xc000326058, 0x0, 0x0) Sep 3 12:30:03 sup-svc-70 containerd: /.GOROOT/src/net/fd_unix.go:238 +0x44 Sep 3 12:30:03 sup-svc-70 containerd: net.(*UnixListener).accept(0xc0000df890, 0xc0003d9dc8, 0xc0003d9dd0, 0x18) Sep 3 12:30:03 sup-svc-70 containerd: /.GOROOT/src/net/unixsock_posix.go:162 +0x34 Sep 3 12:30:03 sup-svc-70 containerd: net.(*UnixListener).Accept(0xc0000df890, 0x55d3f39bdd58, 0xc0000c2000, 0x55d3f39eb6c0, 0xc000326058) Sep 3 12:30:03 sup-svc-70 containerd: /.GOROOT/src/net/unixsock.go:257 +0x49 Sep 3 12:30:03 sup-svc-70 containerd: github.com/containerd/containerd/vendor/google.golang.org/grpc.(*Server).Serve(0xc0000c2000, 0x55d3f39e1960, 0xc0000df890, 0x0, 0x0) Sep 3 12:30:03 sup-svc-70 containerd: /go/src/github.com/containerd/containerd/vendor/google.golang.org/grpc/server.go:544 +0x212 Sep 3 12:30:03 sup-svc-70 containerd: github.com/containerd/containerd/services/server.(*Server).ServeGRPC(0xc00026e7b0, 0x55d3f39e1960, 0xc0000df890, 0x18, 0xc0004b2738) Sep 3 12:30:03 sup-svc-70 containerd: /go/src/github.com/containerd/containerd/services/server/server.go:167 +0x6b Sep 3 12:30:03 sup-svc-70 containerd: github.com/containerd/containerd/services/server.(*Server).ServeGRPC-fm(0x55d3f39e1960, 0xc0000df890,0xc0000df890, 0x0) Sep 3 12:30:03 sup-svc-70 containerd: /go/src/github.com/containerd/containerd/cmd/containerd/command/main.go:171 +0x40 Sep 3 12:30:03 sup-svc-70 containerd: github.com/containerd/containerd/cmd/containerd/command.serve.func1(0x55d3f39e1960, 0xc0000df890, 0xc000249f70, 0x55d3f39e2f20, 0xc00003c018, 0xc0001e9640, 0x1f) Sep 3 12:30:03 sup-svc-70 dockerd: time="2019-09-03T12:30:03.279896469+08:00" level=error msg="failed to get event" error="rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = \"transport: Error while dialin g dial unix /run/containerd/containerd.sock: connect: connection refused\"" module=libcontainerd namespace=moby Sep 3 12:30:03 sup-svc-70 dockerd: time="2019-09-03T12:30:03.279979412+08:00" level=error msg="failed to get event" error="rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = \"transport: Error while dialin g dial unix /run/containerd/containerd.sock: connect: connection refused\"" module=libcontainerd namespace=moby ``` **** 请问下,这可能是什么问题造成的,如何解决,或者该朝哪个方向去调查?
怎么将gRPC的数据序列化从Protocol Buffers替换成JSON
![图片说明](https://img-ask.csdn.net/upload/201610/17/1476693797_66193.jpg) 最近在学习gRPC,看到gRPC的概述文档中说,可以把数据序列化从Protocol Buffers换成JSON,请问有没有人知道怎么替换?
C++编译Tensorflow时出现 no such package '@icu//'no such package '@grpc//'这两个error是为什么呀?
![图片说明](https://img-ask.csdn.net/upload/201907/03/1562133791_485352.png)
Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
postgres://root:root@127.0.0.1:5432/root (node:12744) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead <<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>> TypeError: Channel's second argument must be a ChannelCredentials at ServiceClient.Client (/home/wdrfxy/blockchain-explorer/node_modules/grpc/src/client.js:410:23) at new ServiceClient (/home/wdrfxy/blockchain-explorer/node_modules/grpc/src/client.js:936:12) at new AdminPeer (/home/wdrfxy/blockchain-explorer/app/platform/fabric/AdminPeer.js:65:30) at FabricClient.newAdminPeer (/home/wdrfxy/blockchain-explorer/app/platform/fabric/FabricClient.js:546:25) at FabricClient.initializeChannelFromDiscover (/home/wdrfxy/blockchain-explorer/app/platform/fabric/FabricClient.js:499:38) at <anonymous> Received kill signal, shutting down gracefully Closed out connections
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) 查了半天也没弄清啥原因,望各位大佬不吝赐教!!!
动态规划入门到熟悉,看不懂来打我啊
持续更新。。。。。。 2.1斐波那契系列问题 2.2矩阵系列问题 2.3跳跃系列问题 3.1 01背包 3.2 完全背包 3.3多重背包 3.4 一些变形选讲 2.1斐波那契系列问题 在数学上,斐波纳契数列以如下被以递归的方法定义:F(0)=0,F(1)=1, F(n)=F(n-1)+F(n-2)(n&gt;=2,n∈N*)根据定义,前十项为1, 1, 2, 3...
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
Python——画一棵漂亮的樱花树(不同种樱花+玫瑰+圣诞树喔)
最近翻到一篇知乎,上面有不少用Python(大多是turtle库)绘制的树图,感觉很漂亮,我整理了一下,挑了一些我觉得不错的代码分享给大家(这些我都测试过,确实可以生成) one 樱花树 动态生成樱花 效果图(这个是动态的): 实现代码 import turtle as T import random import time # 画樱花的躯干(60,t) def Tree(branch, ...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
shell脚本:备份数据库、代码上线
备份MySQL数据库 场景: 一台MySQL服务器,跑着5个数据库,在没有做主从的情况下,需要对这5个库进行备份 需求: 1)每天备份一次,需要备份所有的库 2)把备份数据存放到/data/backup/下 3)备份文件名称格式示例:dbname-2019-11-23.sql 4)需要对1天以前的所有sql文件压缩,格式为gzip 5)本地数据保留1周 6)需要把备份的数据同步到远程备份中心,假如...
如何安装 IntelliJ IDEA 最新版本——详细教程
IntelliJ IDEA 简称 IDEA,被业界公认为最好的 Java 集成开发工具,尤其在智能代码助手、代码自动提示、代码重构、代码版本管理(Git、SVN、Maven)、单元测试、代码分析等方面有着亮眼的发挥。IDEA 产于捷克,开发人员以严谨著称的东欧程序员为主。IDEA 分为社区版和付费版两个版本。 我呢,一直是 Eclipse 的忠实粉丝,差不多十年的老用户了。很早就接触到了 IDEA...
面试还搞不懂redis,快看看这40道面试题(含答案和思维导图)
Redis 面试题 1、什么是 Redis?. 2、Redis 的数据类型? 3、使用 Redis 有哪些好处? 4、Redis 相比 Memcached 有哪些优势? 5、Memcache 与 Redis 的区别都有哪些? 6、Redis 是单进程单线程的? 7、一个字符串类型的值能存储最大容量是多少? 8、Redis 的持久化机制是什么?各自的优缺点? 9、Redis 常见性...
为什么要推荐大家学习字节码?
配套视频: 为什么推荐大家学习Java字节码 https://www.bilibili.com/video/av77600176/ 一、背景 本文主要探讨:为什么要学习 JVM 字节码? 可能很多人会觉得没必要,因为平时开发用不到,而且不学这个也没耽误学习。 但是这里分享一点感悟,即人总是根据自己已经掌握的知识和技能来解决问题的。 这里有个悖论,有时候你觉得有些技术没用恰恰是...
【设计模式】单例模式的八种写法分析
网上泛滥流传单例模式的写法种类,有说7种的,也有说6种的,当然也不排除说5种的,他们说的有错吗?其实没有对与错,刨根问底,写法终究是写法,其本质精髓大体一致!因此完全没必要去追究写法的多少,有这个时间还不如跟着宜春去网吧偷耳机、去田里抓青蛙得了,一天天的....
《面试宝典》:检验是否为合格的初中级程序员的面试知识点,你都知道了吗?查漏补缺
欢迎关注文章系列,一起学习 《提升能力,涨薪可待篇》 《面试知识,工作可待篇》 《实战演练,拒绝996篇》 也欢迎关注公 众 号【Ccww笔记】,原创技术文章第一时间推出 如果此文对你有帮助、喜欢的话,那就点个赞呗,点个关注呗! 《面试知识,工作可待篇》-Java笔试面试基础知识大全 前言 是不是感觉找工作面试是那么难呢? 在找工作面试应在学习的基础进行总结面试知识点,工作也指日可待,欢...
在阿里,40岁的奋斗姿势
在阿里,40岁的奋斗姿势 在阿里,什么样的年纪可以称为老呢?35岁? 在云网络,有这样一群人,他们的平均年龄接近40,却刚刚开辟职业生涯的第二战场。 他们的奋斗姿势是什么样的呢? 洛神赋 “翩若惊鸿,婉若游龙。荣曜秋菊,华茂春松。髣髴兮若轻云之蔽月,飘飖兮若流风之回雪。远而望之,皎若太阳升朝霞;迫而察之,灼若芙蕖出渌波。” 爱洛神,爱阿里云 2018年,阿里云网络产品部门启动洛神2.0升...
【超详细分析】关于三次握手与四次挥手面试官想考我们什么?
在面试中,三次握手和四次挥手可以说是问的最频繁的一个知识点了,我相信大家也都看过很多关于三次握手与四次挥手的文章,今天的这篇文章,重点是围绕着面试,我们应该掌握哪些比较重要的点,哪些是比较被面试官给问到的,我觉得如果你能把我下面列举的一些点都记住、理解,我想就差不多了。 三次握手 当面试官问你为什么需要有三次握手、三次握手的作用、讲讲三次三次握手的时候,我想很多人会这样回答: 首先很多人会先讲下握...
压测学习总结(1)——高并发性能指标:QPS、TPS、RT、吞吐量详解
一、QPS,每秒查询 QPS:Queries Per Second意思是“每秒查询率”,是一台服务器每秒能够相应的查询次数,是对一个特定的查询服务器在规定时间内所处理流量多少的衡量标准。互联网中,作为域名系统服务器的机器的性能经常用每秒查询率来衡量。 二、TPS,每秒事务 TPS:是TransactionsPerSecond的缩写,也就是事务数/秒。它是软件测试结果的测量单位。一个事务是指一...
新程序员七宗罪
当我发表这篇文章《为什么每个工程师都应该开始考虑开发中的分析和编程技能呢?》时,我从未想到它会对读者产生如此积极的影响。那些想要开始探索编程和数据科学领域的人向我寻求建议;还有一些人问我下一篇文章的发布日期;还有许多人询问如何顺利过渡到这个职业。我非常鼓励大家继续分享我在这个旅程的经验,学习,成功和失败,以帮助尽可能多的人过渡到一个充满无数好处和机会的职业生涯。亲爱的读者,谢谢你。 -罗伯特。 ...
活到老,学到老,程序员也该如此
全文共2763字,预计学习时长8分钟 图片来源:Pixabay 此前,“网传阿里巴巴要求尽快实现P8全员35周岁以内”的消息闹得沸沸扬扬。虽然很快被阿里辟谣,但苍蝇不叮无缝的蛋,无蜜不招彩蝶蜂。消息从何而来?真相究竟怎样?我们无从而知。我们只知道一个事实:不知从何时开始,程序猿也被划在了“吃青春饭”行业之列。 饱受“996ICU”摧残后,好不容易“头秃了变强了”,即将步入为“高...
2019年Spring Boot面试都问了什么?快看看这22道面试题!
Spring Boot 面试题 1、什么是 Spring Boot? 2、Spring Boot 有哪些优点? 3、什么是 JavaConfig? 4、如何重新加载 Spring Boot 上的更改,而无需重新启动服务器? 5、Spring Boot 中的监视器是什么? 6、如何在 Spring Boot 中禁用 Actuator 端点安全性? 7、如何在自定义端口上运行 Sprin...
小白学 Python 爬虫(5):前置准备(四)数据库基础
人生苦短,我用 Python 前文传送门: 小白学 Python 爬虫(1):开篇 小白学 Python 爬虫(2):前置准备(一)基本类库的安装 小白学 Python 爬虫(3):前置准备(二)Linux基础入门 小白学 Python 爬虫(4):前置准备(三)Docker基础入门 本篇文章,我们接着介绍基础内容,数据库。 爬虫将数据爬取完成后,总要有地方存放吧,这个数据存在哪里呢? ...
面试官:关于Java性能优化,你有什么技巧
通过使用一些辅助性工具来找到程序中的瓶颈,然后就可以对瓶颈部分的代码进行优化。 一般有两种方案:即优化代码或更改设计方法。我们一般会选择后者,因为不去调用以下代码要比调用一些优化的代码更能提高程序的性能。而一个设计良好的程序能够精简代码,从而提高性能。 下面将提供一些在JAVA程序的设计和编码中,为了能够提高JAVA程序的性能,而经常采用的一些方法和技巧。 1.对象的生成和大小的调整。 J...
JavaScript 中, 5 种增加代码可读性的最佳实践
作者:Milos Protic 译者:前端小智 来源:blog.risingstack 为了保证的可读性,本文采用意译而非直译。 简介 如果咱们关注代码本身结构及可读笥,而不是只关心它是否能工作,那么咱们写代码是有一定的水准。专业开发人员将为未来的自己和“其他人”编写代码,而不仅仅只编写能应付当前工作的代码。 在此基础上,可读性高的代码可以定义为自解释的、易于人理解的、易于更改...
【图解算法面试】记一次面试:说说游戏中的敏感词过滤是如何实现的?
版权声明:本文为苦逼的码农原创。未经同意禁止任何形式转载,特别是那些复制粘贴到别的平台的,否则,必定追究。欢迎大家多多转发,谢谢。 小秋今天去面试了,面试官问了一个与敏感词过滤算法相关的问题,然而小秋对敏感词过滤算法一点也没听说过。于是,有了下下事情的发生… 面试官开怼 面试官:玩过王者荣耀吧?了解过敏感词过滤吗?,例如在游戏里,如果我们发送“你在干嘛?麻痹演员啊你?”,由于“麻痹”是一个敏感词,...
程序员需要了解的硬核知识之汇编语言(一)
之前的系列文章从 CPU 和内存方面简单介绍了一下汇编语言,但是还没有系统的了解一下汇编语言,汇编语言作为第二代计算机语言,会用一些容易理解和记忆的字母,单词来代替一个特定的指令,作为高级编程语言的基础,有必要系统的了解一下汇编语言,那么本篇文章希望大家跟我一起来了解一下汇编语言。 汇编语言和本地代码 我们在之前的文章中探讨过,计算机 CPU 只能运行本地代码(机器语言)程序,用 C 语言等高级语...
GitHub 标星 1.6w+,我发现了一个宝藏项目,作为编程新手有福了!
大家好,我是 Rocky0429,一个最近老在 GitHub 上闲逛的蒟蒻… 特别惭愧的是,虽然我很早就知道 GitHub,但是学会逛 GitHub 的时间特别晚。当时一方面是因为菜,看着这种全是英文的东西难受,不知道该怎么去玩,另一方面是一直在搞 ACM,没有做一些工程类的项目,所以想当然的以为和 GitHub 也没什么关系(当然这种想法是错误的)。 后来自己花了一个星期看完了 Pyt...
Java知识体系最强总结(2020版)
更新于2019-12-15 10:38:00 本人从事Java开发已多年,平时有记录问题解决方案和总结知识点的习惯,整理了一些有关Java的知识体系,这不是最终版,会不定期的更新。也算是记录自己在从事编程工作的成长足迹,通过博客可以促进博主与阅读者的共同进步,结交更多志同道合的朋友。特此分享给大家,本人见识有限,写的博客难免有错误或者疏忽的地方,还望各位大佬指点,在此表示感激不尽。 文章目录...
计算机专业的书普遍都这么贵,你们都是怎么获取资源的?
介绍几个可以下载编程电子书籍的网站。 1.Github Github上编程书资源很多,你可以根据类型和语言去搜索。推荐几个热门的: free-programming-books-zh_CN:58K 星的GitHub,编程语言、WEB、函数、大数据、操作系统、在线课程、数据库相关书籍应有尽有,共有几百本。 Go语言高级编程:涵盖CGO,Go汇编语言,RPC实现,Protobuf插件实现,Web框架实...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
Fiddler+夜神模拟器进行APP抓包
Fiddler+夜神模拟器进行APP抓包 作者:霞落满天 需求:对公司APP进行抓包获取详细的接口信息,这是现在开发必备的。 工具:Fiddler抓包,夜神模拟器 模拟手机 安装APP 1.下载Fiddler https://www.telerik.com/download/fiddler Fiddler正是在这里帮助您记录计算机和Internet之间传递的所有HTTP和HTTPS通信...
相关热词 c# id读写器 c#俄罗斯方块源码 c# linq原理 c# 装箱有什么用 c#集合 复制 c# 一个字符串分组 c++和c#哪个就业率高 c# 批量动态创建控件 c# 模块和程序集的区别 c# gmap 截图
立即提问