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的版本

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
如何下载fabric-sdk-go的所有依赖项?

<div class="post-text" itemprop="text"> <p>I used command "<strong>go get github.com/hyperledger/fabric-sdk-go</strong>" to download fabric-sdk-go and its dependencies. No error happened.</p> <p>In the golang documentation( <a href="https://golang.org/cmd/go/#hdr-Download_and_install_packages_and_dependencies" rel="nofollow noreferrer">https://golang.org/cmd/go/#hdr-Download_and_install_packages_and_dependencies</a> ), it said that "Get downloads the packages named by the import paths, along with their dependencies. It then installs the named packages, like 'go install'."</p> <p>So I originally thought that all the dependencies of fabric-sdk-go would be downloaded <strong>recursively</strong>. But the fact proved that I was wrong.</p> <p>When I ran command "go install ./..." under fabric-sdk-go directory, many errors "cannot find package" were displayed: <a href="https://i.stack.imgur.com/nlrwu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nlrwu.png" alt="enter image description here"></a> So my questions are:</p> <ol> <li><p>Does "go get" download dependencies <strong>recursively</strong> or not?</p></li> <li><p>How to download <strong>all</strong> the dependencies of fabric-sdk-go, instead of using "go get [a_dependency_package]" to download every single dependency one by one?</p></li> </ol> <p>Thanks very much.</p> </div>

无法使用gRPC中的proto 3.0缓冲区生成客户端代码

<div class="post-text" itemprop="text"> <p>I am trying to generate client and server code in gRPC. I have installed grpc directory from github and trying to generate <code>C++</code> code. I installed proto compiler 3.0.0. </p> <p>When I am executing protoc i am getting below error</p> <pre><code>$ protoc -I ../../protos/ --grpc_out=. --plugin=protoc-gen-grpc=grpc_cpp_plugin ../../protos/helloworld.proto grpc_cpp_plugin: program not found or is not executable --grpc_out: protoc-gen-grpc: Plugin failed with status code 1. </code></pre> <p>Any idea why I am not able to generate client/server code</p> </div>

fabric-sdk-go错误:无对等连接

<div class="post-text" itemprop="text"> <p>We are using the IBM Managed Blockchain based on fabric 1.2, and using the Go SDK @5e291d3a34f59beb9a8ae2bcbba388515648dc73. When we try to invoke the chaincode we have installed on the peers, we get a "no peers to connect to" error:</p> <pre><code>[fabsdk/fab] 2019/01/25 12:25:57 UTC - dispatcher.(*Dispatcher).Start.func1 -&gt; DEBU Listening for events... [fabsdk/fab] 2019/01/25 12:25:57 UTC - client.(*Client).connect -&gt; DEBU ... got error in connection response: no peers to connect to [fabsdk/common] 2019/01/25 12:25:57 UTC - retry.(*RetryableInvoker).Invoke -&gt; DEBU Failed with err [error registering for TxStatus event: no peers to connect to] on attempt #1. Checking if retry is warranted... [fabsdk/util] 2019/01/25 12:25:57 UTC - lazyref.(*Reference).setTimerRunning -&gt; DEBU Timer started [fabsdk/common] 2019/01/25 12:25:57 UTC - retry.(*RetryableInvoker).Invoke -&gt; DEBU ... retry for err [error registering for TxStatus event: no peers to connect to] is NOT warranted after 1 attempt(s). [fabsdk/util] 2019/01/25 12:25:57 UTC - lazyref.checkTimeStarted -&gt; DEBU Starting timer </code></pre> <p>After putting some extra logging of our own it looks like the failure happens because the peer discovery service (<a href="https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/common/discovery/dynamicdiscovery/chservice.go#L72" rel="nofollow noreferrer">https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/common/discovery/dynamicdiscovery/chservice.go#L72</a>) doesn't return any peers in its response. The targets seem to be set correctly.</p> <p>After dumping the GRPC response, we get </p> <pre><code>(*discovery.Response)(0xc4205cd600)( results: &lt; members: &lt; peers_by_org: &lt; key: "org1" value: &lt;&gt; &gt; &gt; &gt; ) </code></pre> <p>We also set up a different fabric network on our own with the same chaincode, which works properly and the same dump shows this instead (some parts were redacted):</p> <pre><code>(*discovery.Response)(0xc42045ed20)( results: &lt; members: &lt; peers_by_org: &lt; key: "Org1MSP" value: &lt; peers: &lt; state_info: &lt; payload:"&lt;redacted&gt;" &gt; membership_info: &lt;payload:"&lt;redacted&gt;" &gt; identity:"&lt;redacted&gt;" &gt; peers: &lt; state_info: &lt; payload:"&lt;redacted&gt;" signature:"&lt;redacted&gt;" &gt; membership_info: &lt; payload:"&lt;redacted&gt;" signature:"&lt;redacted&gt;" &gt; identity:"&lt;redacted&gt;" &gt; &gt; &gt; peers_by_org: &lt; key:"Org2MSP" value: &lt; peers: &lt; state_info:&lt; payload:"&lt;redacted&gt;" signature:"&lt;redacted&gt;" &gt; membership_info: &lt; payload:"&lt;redacted&gt;" &gt; identity:"&lt;redacted&gt;" &gt; peers: &lt; state_info: &lt; payload:"&lt;redacted&gt;" signature:"&lt;redacted&gt;" &gt; membership_info: &lt; payload:"&lt;redacted&gt;" signature:"&lt;redacted&gt;" &gt; identity:"&lt;redacted&gt;" &gt; &gt; &gt; &gt; &gt; ) </code></pre> <p>I am unsure if the issue is in the configuration of the SDK or the IBM Managed fabric network. If it is the IBM network, then it seems that somehow the peers aren't aware that they are members of an organization. </p> <p>Has anyone seen this behaviour before? I searched the hyperledger official rocket chat for the "no peers to connect to" error, and some results came up, but they seemed to be caused by other reasons, such as the peers being excluded by the SDK, not due to the response to the discovery request.</p> </div>

protoc-gen-java代码使用内联对象提示语法错误

<div class="post-text" itemprop="text"> <h2>describe</h2> <p>I want to use java to call golang grpc.I used the old golang's consumer_proto.proto to gen java code</p> <h2>process</h2> <pre><code>protoc --java_out=/home/xxx/src/main/java custom_proto.proto protoc --plugin=protoc-gen-grpc-java=/home/xxx/protoc-gen-grpc-java-1.7.0-linux-x86_64.exe --grpc-java_out=/home/xxx/main/java custom_proto.proto </code></pre> <h2>result</h2> <p>I success gen my proto java file.but I find use Inline object prompt syntax error,the problem is from:</p> <pre><code>message RepGetClassBySchoolD { RequestRClassStruct Class = 1; } </code></pre> <p>the error is:</p> <pre><code>getClass() in xx classes in 'java.lang.Object';attempting to use incompatible return type </code></pre> <p>when I run the code,The error is:</p> <pre><code>Error:(92, 62) java: com.xxx.RepGetClassBySchoolD getClass() Unable to cover java.lang.Object's getClass() </code></pre> <p>The method to be overwritten is final</p> <p>It happend at class RepGetClassBySchoolD:</p> <pre><code>public com.class100.service.usercenter.RequestRClassStruct getClass() { return class_ == null ? com.class100.service.usercenter.RequestRClassStruct.getDefaultInstance() : class_; </code></pre> <p>}</p> <p>Is there a way to make this work? Or any ideas? thanks</p> </div>

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)

使用gRPC-web通过身份验证安全地公开gRPC服务

<div class="post-text" itemprop="text"> <p>We are using Improbable's <a href="https://github.com/improbable-eng/grpc-web" rel="nofollow noreferrer">gRPC-Web library</a> to expose a gRPC service (implemented in Go) to a Javascript client running in-browser. This service will sit alongside an existing front-end Go service which hosts a REST-based API. The existing service uses session-based authentication to authenticate its users (session cookies + XSRF protection with <a href="https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.md#double-submit-cookie" rel="nofollow noreferrer">double-submit cookies</a>, which are also verified using some per-session server-side state).</p> <p>The front-end Go service hosts various API endpoints which are either handled locally or fulfilled by proxying the request to other services. All endpoints are exposed via a Gin middleware handler chain, which implements the aforementioned session authentication and XSRF protection checks. It has been proposed that we host gRPC-Web's <a href="https://github.com/improbable-eng/grpc-web/tree/ebef475aee9558e615643bd7c669ef39cf0999e0/go/grpcwebproxy" rel="nofollow noreferrer">gogrpcproxy component</a> behind this existing middleware to expose our gRPC service to the world.</p> <p>I am interested in ensuring the approach for authenticating the incoming gRPC-Web requests is secure. The following methods have been proposed:</p> <ul> <li><p><strong>Token-based authentication</strong> – i.e. passing bearer tokens in the gRPC request metadata, which are verified by the back-end gRPC service. This matches the authentication model by which native gRPC calls would be authenticated if gRPC-Web was not involved.</p> <p>In this model, gRPC-Web's responsibility is the implementation of the transport abstraction between browser and server, and marshalling requests to/from the native gRPC representation; authentication is delegated to the backing gRPC service. The gRPC-Web proxy is hosted as a separate endpoint external to the existing REST API.</p></li> <li><p><strong>Session-based authentication</strong> – re-use of the existing session authentication middleware. In this model, the grpcweb proxy server is hosted behind the Gin handler chain. Gin performs its usual checks to verify existence of the relevant cookies and XSRF headers prior to admitting the request.</p> <p>This approach re-uses much of the existing authentication logic. However, it requires the passing of the XSRF header to ensure the request is admitted by the Gin middleware. This is possible in the current implementation by setting request metadata, which is (currently) implemented by setting headers on the outbound HTTP request. However, it is unclear to me whether this:</p> <ul> <li>is appropriate, as it appears to be a layer violation by exploiting the implementation detail that metadata is currently passed as HTTP headers. This is not documented and could conceivably change;</li> <li>is compatible with gRPC-Web's websocket transport, which does not appear to propagate metadata into headers, as the websocket transport is dialled prior to any requests being transmitted;</li> <li>suffers potential security issues in future, as the long-lived gRPC-Web transport connection to the front-end service is only authenticated by the front-end proxy when first established, rather than continually on every request (unless the gRPC service also validates the request metadata).</li> </ul></li> </ul> <p>My understanding is that gRPC-Web seeks to emulate the gRPC transport between a browser and server, so accordingly implements no specific authentication logic. The standard gRPC mechanisms for passing authentication details make no allowance for implicit session-based state, so my preference is the token-based approach.</p> <p>Is this a reasonable analysis of the available options?</p> </div>

通过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方面的大神能否给帮忙解释一下,这个异常是因为什么问题导致的!!!不胜感激!!!

--go_out:protoc-gen-go:系统找不到Windows 10指定的文件

<div class="post-text" itemprop="text"> <p>I am trying to use this command <code>protoc greet\greetpb\greet.proto --go_out=plugins=grpc:</code>. I got that message </p> <blockquote> <p>"--go_out: protoc-gen-go: The system cannot find the file specified."</p> </blockquote> <p>My protoc version is libprotoc 3.6.1 My go version go version go1.11.2 windows/386 Also into my package list is this github.com/golang/protobuf/protoc-gen-go/grpc</p> <p>I am new using golang and I trying to learn grpc. Could someone helps me with that problem? I am using windows 10.</p> </div>

Prometheus 如何监控 grpc-java server

如何通过prometheus 去监控 grpc 的 server ip 等一些信息?用的是Java语言

如何在Go中启用GRPC压缩

<div class="post-text" itemprop="text"> <p>I see some methods <code>WithCompression</code> and <code>UseCompression</code> but I'm not very clear how they all fit together - a simple example of what to put in the client and what to put in the server would really help.</p> <p>My first attempt, </p> <pre><code>conn, err := grpc.Dial( addr, grpc.WithTimeout(timeout), grpc.WithCompressor(grpc.NewGZIPCompressor()), ... </code></pre> <p>resulted in this error when I made a call:</p> <pre><code>grpc: Decompressor is not installed for grpc-encoding \"gzip\" </code></pre> </div>

Golang中的GRPC连接管理

<div class="post-text" itemprop="text"> <p>我对GRPC比较陌生,我想确定我正在正确地使用golang进行连接管理。我不想为每个请求创建一个新的连接,但我也不想在扩展时造成瓶颈。</p> <p>我在init函数中创建了一个连接:</p> <pre><code>var userConn *grpc.ClientConn var userServiceName string func init() { userServiceName := os.Getenv("USER_SERVICE_URL") if userServiceName == "" { userServiceName = "localhost" } logging.LogDebug("userClient: Connecting to: "+userServiceName, "") tempConn, err := grpc.Dial(userServiceName, grpc.WithInsecure()) if err != nil { logging.LogEmergency("account_user_client.Init() Could not get the connection. "+err.Error(), "") return } userConn = tempConn } </code></pre> <p>然后,对于每个函数,我都使用这个连接来创建一个Client:</p> <pre><code>c := user.NewUserClient(userConn) // Contact the server and print out its response. ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() r, err := c.GetUserFromTokenID(ctx, &amp;user.GetUserFromTokenRequest{TransactionID: transactionID, OathToken: *oathToken}) //Handle Error and Response </code></pre> <p>这是处理GRPC连接的一种可接受的方法吗?或者说有更好的方法吗?</p> <p>十分感谢。</p> </div>

如何使用gradle生成go grpc代码?

<div class="post-text" itemprop="text"> <p>My build.gradle is able to generate protobuf code for Go. What do I need to change to make it generate grpc code for the Go code?</p> <pre><code>apply plugin: 'com.google.protobuf' buildscript { dependencies { classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.3' } } def grpcVersion = '1.11.0' dependencies { compile "io.grpc:grpc-netty:${grpcVersion}" compile "io.grpc:grpc-protobuf:${grpcVersion}" compile "io.grpc:grpc-stub:${grpcVersion}" } protobuf { protoc { artifact = "com.google.protobuf:protoc:3.5.1-1" } plugins { grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" } } generateProtoTasks { all().each { task -&gt; task.builtins { go { } } } all()*.plugins { grpc {} } } } </code></pre> </div>

grpc-java 如何做负载均衡?

那位大佬有关于grpc-java的负载均衡的demo?求大佬解救一下小白!!!

Netty中的INBOUND和OUTBOUND事件为什么一直在执行?

我通过Fabric的java-sdk从链上获取区块高度信息和从状态库查询相关数据信息,出现Netty一直在进行Inbound和Outbound事件程序,打印的日志如下代码段(之前程序运行的很正常,但后来再次启动后就一直在执行事件程序,日志了将近1个G,基本内容也是如下形式,不甚明白是什么原因造成的,请有了解的大神能给予解答): ``` 19:45:37 [grpc-default-worker-ELG-1-3] DEBUG io.grpc.netty.NettyClientHandler - ----------------OUTBOUND-------------------- [id: 0xe5db3b97, L:/192.168.206.80:60947 - R:/192.168.125.170:7051] DATA: streamId=8371, padding=0, endStream=true, length=1118, bytes=00000004590a8e080abd070a68080310011a0c08e1ebb7e1051080dad6fd012208636368686c7830312a40386263353236616534656434373738663136343066... ------------------------------------ 19:45:37 [grpc-default-worker-ELG-1-3] DEBUG io.grpc.netty.NettyClientHandler - ----------------INBOUND-------------------- [id: 0xe5db3b97, L:/192.168.206.80:60947 - R:/192.168.125.170:7051] WINDOW_UPDATE: streamId=0, windowSizeIncrement=1118 ------------------------------------ 19:45:37 [grpc-default-worker-ELG-1-3] DEBUG io.grpc.netty.NettyClientHandler - ----------------INBOUND-------------------- [id: 0xe5db3b97, L:/192.168.206.80:60947 - R:/192.168.125.170:7051] PING: ack=false, length=8, bytes=02041010090e0707 ------------------------------------ 19:45:37 [grpc-default-worker-ELG-1-3] DEBUG io.grpc.netty.NettyClientHandler - ----------------OUTBOUND-------------------- [id: 0xe5db3b97, L:/192.168.206.80:60947 - R:/192.168.125.170:7051] PING: ack=true, length=8, bytes=02041010090e0707 ------------------------------------ 19:45:37 [grpc-default-worker-ELG-1-3] DEBUG io.grpc.netty.NettyClientHandler - ----------------INBOUND-------------------- [id: 0xe5db3b97, L:/192.168.206.80:60947 - R:/192.168.125.170:7051] HEADERS: streamId=8371, headers=GrpcHttp2ResponseHeaders[:status: 200, content-type: application/grpc], padding=0, endStream=false ------------------------------------ 19:45:37 [grpc-default-worker-ELG-1-3] DEBUG io.grpc.netty.NettyClientHandler - ----------------INBOUND-------------------- [id: 0xe5db3b97, L:/192.168.206.80:60947 - R:/192.168.125.170:7051] DATA: streamId=8371, padding=0, endStream=false, length=16384, bytes=00000112ff0801229f8f0208c8011a988f020a4708b0671220b0ff282fbc2b365e347efb290a6fdb160c978aae8e384460072ed09cebe03eb81a206bc4874a0a... ------------------------------------ 19:45:37 [grpc-default-worker-ELG-1-3] DEBUG io.grpc.netty.NettyClientHandler - ----------------INBOUND-------------------- [id: 0xe5db3b97, L:/192.168.206.80:60947 - R:/192.168.125.170:7051] DATA: streamId=8371, padding=0, endStream=false, length=16384, bytes=6c65724944223a2231303133222c2273656374696f6e4e6f223a2231393139383634222c22737461727454696d65223a313438333534353630303030302c2276... ------------------------------------ 19:45:37 [grpc-default-worker-ELG-1-4] DEBUG io.grpc.netty.NettyClientHandler - ----------------INBOUND-------------------- [id: 0x870a0635, L:/192.168.206.80:60946 - R:/192.168.125.171:7051] DATA: streamId=8381, padding=0, endStream=false, length=16384, bytes=737d607440ced8c83f5c83d606b0449df8ea31bb0a7c4c73cdcdfb8f00b8559312463044022051884054ff79e4ccbfa473af94bc15ba881e56f5571b0894e3bb... ------------------------------------ ```

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服务器无法连接

<div class="post-text" itemprop="text"> <p>Got this issue and can't seem to figure out what exactly is going wrong.</p> <p>Some insights into this would be helpful if someone has come across this problem.</p> <p>In my setup, I have a go grpc server that needs to call another go grpc client but the server is not able to connect to the client.</p> <p>However when I run the code to connect to the grpc client from a test file and it works!!!</p> <p>Here is what the connection step looks like from grpc server side.</p> <pre><code>ctxValues := map[string]string{ auth.AUTH_USERID_HEADER_GRPC: "xxxx", auth.AUTH_USER_SCOPE_HEADER_GRPC: "yyy", } md := metadata.New(ctxValues) newctx := metadata.NewOutgoingContext(context.Background(), md) user, err := service.userProfileClient.GetUser(newctx, empty) </code></pre> <p>The error I see in the console is this:</p> <p><strong>rpc error: code = FailedPrecondition desc = grpc: the client connection is closing</strong></p> <p>Same connection code above works from a test file.</p> <p>Any ideas what is going wrong when grpc server is trying to connect with the grpc server using the generated client stub.</p> </div>

Hyperledger Fabric 在 chaincode-docker-devmode 中為何加入CouchDB容器,會導致Cli容器無法啟動?

因为目前还在初学阶段,所以选择fabric-simple 中的开发者模式来测试chaincode,但当我在docker-compose-simple.yaml 中加入 CouchDB容器,如下: ``` version: '2' services: orderer: container_name: orderer image: hyperledger/fabric-orderer environment: - FABRIC_LOGGING_SPEC=debug - ORDERER_GENERAL_LISTENADDRESS=orderer - ORDERER_GENERAL_GENESISMETHOD=file - ORDERER_GENERAL_GENESISFILE=orderer.block - ORDERER_GENERAL_LOCALMSPID=DEFAULT - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp - GRPC_TRACE=all=true, - GRPC_VERBOSITY=debug working_dir: /opt/gopath/src/github.com/hyperledger/fabric command: orderer volumes: - ./msp:/etc/hyperledger/msp - ./orderer.block:/etc/hyperledger/fabric/orderer.block ports: - 7050:7050 couchdb: container_name: couchdb image: hyperledger/fabric-couchdb environment: - COUCHDB_USER= - COUCHDB_PASSWORD= ports: - 5984:5984 peer: container_name: peer image: hyperledger/fabric-peer dns_search: . environment: - CORE_PEER_ID=peer - CORE_PEER_ADDRESS=peer:7051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer:7051 - CORE_PEER_LOCALMSPID=DEFAULT - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - FABRIC_LOGGING_SPEC=DEBUG - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= volumes: - /var/run/:/host/var/run/ - ./msp:/etc/hyperledger/msp working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: peer node start --peer-chaincodedev=true ports: - 7051:7051 - 7053:7053 depends_on: - orderer - couchdb cli: container_name: cli image: hyperledger/fabric-tools tty: true environment: - GOPATH=/opt/gopath - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - FABRIC_LOGGING_SPEC=DEBUG - CORE_PEER_ID=cli - CORE_PEER_ADDRESS=peer:7051 - CORE_PEER_LOCALMSPID=DEFAULT - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp working_dir: /opt/gopath/src/chaincodedev command: /bin/bash -c './script.sh ; sleep 20' volumes: - /var/run/:/host/var/run/ - ./msp:/etc/hyperledger/msp - ./../chaincode:/opt/gopath/src/chaincodedev/chaincode - ./:/opt/gopath/src/chaincodedev/ depends_on: - orderer - peer chaincode: container_name: chaincode image: hyperledger/fabric-ccenv tty: true environment: - GOPATH=/opt/gopath - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - FABRIC_LOGGING_SPEC=DEBUG - CORE_PEER_ID=example02 - CORE_PEER_ADDRESS=peer:7051 - CORE_PEER_LOCALMSPID=DEFAULT - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp working_dir: /opt/gopath/src/chaincode command: /bin/bash -c 'sleep 6000000' volumes: - /var/run/:/host/var/run/ - ./msp:/etc/hyperledger/msp - ./../chaincode:/opt/gopath/src/chaincode depends_on: - orderer - peer ``` 当我使用以下指令启动容器, ``` docker-compose -f docker-compose-simple.yaml up ``` 唯有Cli 容器是无法启动的状态,并在Logs中返回以下错误讯息 ``` Error: error getting endorser client for channel: endorser client failed to connect to peer:7051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 172.29.0.4:7051: connect: connection refused" ``` 有查询到同样错误讯息的人是在docker 启动设定档加入sleep指令,加长等待时间以确定CouchDB启动 ``` command: /bin/bash -c 'sleep 6000000' ``` 但我即使加入了,还是会报相同的错误

如何为安全的go grpc服务创建不安全的Java grpc客户端

<div class="post-text" itemprop="text"> <p>I am trying to create grpc service client in Java where server is in goLang and deployed with the https . where I am trying to achieve a non-secured connection [I don't want to pass the certificate ]</p> <pre><code>public class testgrpc { ManagedChannel channel ; ServiceGrpc.ServiceBlockingStub blockingStub; String host = "remotesecuredhost"; int port ="XXX"; @Test public void testgrpc() { channel = ManagedChannelBuilder.forAddress(host,port).build(); blockingStub = ServiceGrpc.newBlockingStub(channel); response = blockingStub.health(Empty.newBuilder().build()); } } </code></pre> <p>the above code gives following exception </p> <pre><code>io.grpc.StatusRuntimeException: UNAVAILABLE: io exception at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:221) at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:202) at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:131) </code></pre> <p>can someone help with Client code </p> </div>

安全性-无法使用gRPC创建安全的TLS连接

<div class="post-text" itemprop="text"> <p>I need a secure connection to Knative.</p> <p>Tried a milion, and on the top of my head - the following scenario:</p> <pre><code>WORKED: |----------------------------------------------------------------------------|--------------------------------------------| | 1. curl -H "Host: my-servivce.default.mydomin.com" http(s)://mydomain.com | knative-ingress-gateway(tls with cert.pem) | |----------------------------------------------------------------------------|--------------------------------------------| | 2. unsecure gRPC port:80 | knative | |----------------------------------------------------------------------------|--------------------------------------------| NOT WORKING: |-----------------------------|------------------------------------------------------------------------------------------------| | 3. unsecure gRPC port:443 | knative-ingress-gateway(tls PASSTHROUGH) | |-----------------------------|------------------------------------------------------------------------------------------------| | 4. --//-- | knative-ingress-gateway(tls with cert.pem) using same working certificate as for 1. (curl) | |-----------------------------|--------------------------------------------|---------------------------------------------------| | 5. secure gRPC(cert from 4.)| knative-ingress-gateway(tls PASSTHROUGH) | gRPC secure server OpenSSL mydomain.com | |-----------------------------|--------------------------------------------|---------------------------------------------------| | 6. OpenSSL secure gRPC | knative-ingress-gateway(tls PASSTHROUGH) | gRPC secure server OpenSSL mydomain.com | |-----------------------------|--------------------------------------------|---------------------------------------------------| | 7. --//-- | knative-ingress-gateway(tls PASSTHROUGH) | gRPC secure server OpenSSL internall host domain | |-------------------------- |--------------------------------------------|---------------------------------------------------| </code></pre> <p>If you have got anything working with TLS or http(s), or know one who has, I would very much like to know?</p> <p>Thanks in advance</p> </div>

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

String s = new String(" a ") 到底产生几个对象?

老生常谈的一个梗,到2020了还在争论,你们一天天的,哎哎哎,我不是针对你一个,我是说在座的各位都是人才! 上图红色的这3个箭头,对于通过new产生一个字符串(”宜春”)时,会先去常量池中查找是否已经有了”宜春”对象,如果没有则在常量池中创建一个此字符串对象,然后堆中再创建一个常量池中此”宜春”对象的拷贝对象。 也就是说准确答案是产生了一个或两个对象,如果常量池中原来没有 ”宜春” ,就是两个。...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

Linux面试题(2020最新版)

文章目录Linux 概述什么是LinuxUnix和Linux有什么区别?什么是 Linux 内核?Linux的基本组件是什么?Linux 的体系结构BASH和DOS之间的基本区别是什么?Linux 开机启动过程?Linux系统缺省的运行级别?Linux 使用的进程间通信方式?Linux 有哪些系统日志文件?Linux系统安装多个桌面环境有帮助吗?什么是交换空间?什么是root帐户什么是LILO?什...

Linux命令学习神器!命令看不懂直接给你解释!

大家都知道,Linux 系统有非常多的命令,而且每个命令又有非常多的用法,想要全部记住所有命令的所有用法,恐怕是一件不可能完成的任务。 一般情况下,我们学习一个命令时,要么直接百度去搜索它的用法,要么就直接用 man 命令去查看守冗长的帮助手册。这两个都可以实现我们的目标,但有没有更简便的方式呢? 答案是必须有的!今天给大家推荐一款有趣而实用学习神器 — kmdr,让你解锁 Linux 学习新姿势...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

史上最全的 python 基础知识汇总篇,没有比这再全面的了,建议收藏

网友们有福了,小编终于把基础篇的内容全部涉略了一遍,这是一篇关于基础知识的汇总的文章,请朋友们收下,不用客气,不过文章篇幅肯能会有点长,耐心阅读吧爬虫(七十)多进程multiproces...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

85后蒋凡:28岁实现财务自由、34岁成为阿里万亿电商帝国双掌门,他的人生底层逻辑是什么?...

蒋凡是何许人也? 2017年12月27日,在入职4年时间里,蒋凡开挂般坐上了淘宝总裁位置。 为此,时任阿里CEO张勇在任命书中力赞: 蒋凡加入阿里,始终保持创业者的冲劲,有敏锐的...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

新一代神器STM32CubeMonitor介绍、下载、安装和使用教程

关注、星标公众号,不错过精彩内容作者:黄工公众号:strongerHuang最近ST官网悄悄新上线了一款比较强大的工具:STM32CubeMonitor V1.0.0。经过我研究和使用之...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

大学一路走来,学习互联网全靠这几个网站,最终拿下了一把offer

大佬原来都是这样炼成的

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

什么时候跳槽,为什么离职,你想好了么?

都是出来打工的,多为自己着想

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

你期望月薪4万,出门右拐,不送,这几个点,你也就是个初级的水平

先来看几个问题通过注解的方式注入依赖对象,介绍一下你知道的几种方式@Autowired和@Resource有何区别说一下@Autowired查找候选者的...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

立即提问
相关内容推荐