关于编写链码时的报错error: RPC failed; curl 18 transfer closed with outstanding read data remaining

从书上看到,编写链码之前应该确定在本系统中有 Hyperledger Fabric 提供的相关API,如果本地系统中没有相关的API,请执行如下下载命令:

go get -u github.com/hyperledger/fabric/core/chaincode/shim

我执行之后,报错

# cd .; git clone https://github.com/hyperledger/fabric /home/yous/go/src/github.com/hyperledger/fabric
正克隆到 '/home/yous/go/src/github.com/hyperledger/fabric'...
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: 过早的文件结束符(EOF)
fatal: index-pack failed
package github.com/hyperledger/fabric/core/chaincode/shim: exit status 128

查了百度,基本上都在说 curl的postBuffer的默认值太小
我重新设置了一下还是不行。
我发现https://github.com/hyperledger/fabric/core/chaincode/shim 根本打不开网页,是不是这个包被关闭或删除了呢?

1个回答

yous123
Manolo� 这个用了还是不行啊
2 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
实例化合约报错: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) 已解决

实例化链码时出错

<div class="post-text" itemprop="text"> <p>Please help me this issue, error happened when I instantiate my chaincode:</p> <p>Currently, I guess the issue related to shim package, because I remove it in my utils package, instantiate successfully.</p> <h1>MyChainCode:</h1> <pre><code>import ( "bytes" "encoding/hex" "encoding/json" "fmt" "strconv" "github.com/golang/protobuf/proto" "github.com/hyperledger/fabric/core/chaincode/shim" "github.com/hyperledger/fabric/protos/msp" pb "github.com/hyperledger/fabric/protos/peer" "github.com/myproj/models" "github.com/myproj/packages/utils" ) APIstub shim.ChaincodeStubInterface ... username, _ = utils.GetCurrentUser(APIstub) ... </code></pre> <h1>My packages</h1> <pre><code>package utils import ( "github.com/hyperledger/fabric/core/chaincode/shim" "golang.org/x/crypto/bcrypt" ) func GetCurrentUser(stub shim.ChaincodeStubInterface) (string, error) { cert, err := GetCreatorCert(stub) return cert.Subject.CommonName, err } </code></pre> <h1>Issue:</h1> <blockquote> <p>Error: Error endorsing chaincode: rpc error: code = Unknown desc = error starting container: Failed to generate platform-specific docker build: Error returned from build: 2 "# ~vendor/github.com/hyperledger/fabric/vendor/github.com/docker/docker/pkg/archive ~vendor/github.com/hyperledger/fabric/vendor/github.com/docker/docker/pkg/archive/archive.go:364:5: hdr.Format undefined (type *tar.Header has no field or method Format) ~vendor/github.com/hyperledger/fabric/vendor/github.com/docker/docker/pkg/archive/archive.go:364:15: undefined: tar.FormatPAX ~/vendor/github.com/hyperledger/fabric/vendor/github.com/docker/docker/pkg/archive/archive.go:1166:7: hdr.Format undefined (type *tar.Header has no field or method Format) ~/vendor/github.com/hyperledger/fabric/vendor/github.com/docker/docker/pkg/archive/archive.go:1166:17: undefined: tar.FormatPAX</p> </blockquote> <p>Fabric ver 1.1.0</p> <p>Go ver 1.9.2</p> </div>

实例化链码时出错Error: endorsement failure during query. response: status:500 message:"make sure the chaincode hellocc has been successfully instantiated and try again:

https://blog.csdn.net/weixin_44676392/article/details/87938415 根据上面的网址一步步测试的,结果出现了错误,希望大神能指导一下 ``` peer chaincode query -n hellocc -c '{"Args":["query","Hello"]}' -C myc ``` 运行之后出现错误 ``` root@d37396069819:/opt/gopath/src/chaincodedev# peer chaincode query -n hellocc -c '{"Args":["query","Hello"]}' -C myc 2020-03-30 05:06:10.880 UTC [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} value for peer.BCCSP 2020-03-30 05:06:10.883 UTC [viperutil] unmarshalJSON -> DEBU 002 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value 2020-03-30 05:06:10.886 UTC [viperutil] getKeysRecursively -> DEBU 003 Found real value for peer.BCCSP.Default setting to string SW 2020-03-30 05:06:10.890 UTC [viperutil] getKeysRecursively -> DEBU 004 Found map[string]interface{} value for peer.BCCSP.SW 2020-03-30 05:06:10.891 UTC [viperutil] unmarshalJSON -> DEBU 005 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value 2020-03-30 05:06:10.898 UTC [viperutil] getKeysRecursively -> DEBU 006 Found real value for peer.BCCSP.SW.Hash setting to string SHA2 2020-03-30 05:06:10.900 UTC [viperutil] unmarshalJSON -> DEBU 007 Unmarshal JSON: value is not a string: 256 2020-03-30 05:06:10.902 UTC [viperutil] getKeysRecursively -> DEBU 008 Found real value for peer.BCCSP.SW.Security setting to int 256 2020-03-30 05:06:10.905 UTC [viperutil] getKeysRecursively -> DEBU 009 Found map[string]interface{} value for peer.BCCSP.SW.FileKeyStore 2020-03-30 05:06:10.907 UTC [viperutil] unmarshalJSON -> DEBU 00a Unmarshal JSON: value cannot be unmarshalled: unexpected end of JSON input 2020-03-30 05:06:10.911 UTC [viperutil] getKeysRecursively -> DEBU 00b Found real value for peer.BCCSP.SW.FileKeyStore.KeyStore setting to string 2020-03-30 05:06:10.913 UTC [viperutil] getKeysRecursively -> DEBU 00c Found map[string]interface{} value for peer.BCCSP.PKCS11 2020-03-30 05:06:10.916 UTC [viperutil] unmarshalJSON -> DEBU 00d Unmarshal JSON: value is not a string: <nil> 2020-03-30 05:06:10.921 UTC [viperutil] getKeysRecursively -> DEBU 00e Found real value for peer.BCCSP.PKCS11.Library setting to <nil> <nil> 2020-03-30 05:06:10.923 UTC [viperutil] unmarshalJSON -> DEBU 00f Unmarshal JSON: value is not a string: <nil> 2020-03-30 05:06:10.927 UTC [viperutil] getKeysRecursively -> DEBU 010 Found real value for peer.BCCSP.PKCS11.Label setting to <nil> <nil> 2020-03-30 05:06:10.928 UTC [viperutil] unmarshalJSON -> DEBU 011 Unmarshal JSON: value is not a string: <nil> 2020-03-30 05:06:10.929 UTC [viperutil] getKeysRecursively -> DEBU 012 Found real value for peer.BCCSP.PKCS11.Pin setting to <nil> <nil> 2020-03-30 05:06:10.936 UTC [viperutil] unmarshalJSON -> DEBU 013 Unmarshal JSON: value is not a string: <nil> 2020-03-30 05:06:10.937 UTC [viperutil] getKeysRecursively -> DEBU 014 Found real value for peer.BCCSP.PKCS11.Hash setting to <nil> <nil> 2020-03-30 05:06:10.939 UTC [viperutil] unmarshalJSON -> DEBU 015 Unmarshal JSON: value is not a string: <nil> 2020-03-30 05:06:10.940 UTC [viperutil] getKeysRecursively -> DEBU 016 Found real value for peer.BCCSP.PKCS11.Security setting to <nil> <nil> 2020-03-30 05:06:10.943 UTC [viperutil] getKeysRecursively -> DEBU 017 Found map[string]interface{} value for peer.BCCSP.PKCS11.FileKeyStore 2020-03-30 05:06:10.944 UTC [viperutil] unmarshalJSON -> DEBU 018 Unmarshal JSON: value is not a string: <nil> 2020-03-30 05:06:10.948 UTC [viperutil] getKeysRecursively -> DEBU 019 Found real value for peer.BCCSP.PKCS11.FileKeyStore.KeyStore setting to <nil> <nil> 2020-03-30 05:06:10.949 UTC [viperutil] EnhancedExactUnmarshalKey -> DEBU 01a map[peer.BCCSP:map[Default:SW SW:map[Hash:SHA2 Security:256 FileKeyStore:map[KeyStore:]] PKCS11:map[FileKeyStore:map[KeyStore:<nil>] Library:<nil> Label:<nil> Pin:<nil> Hash:<nil> Security:<nil>]]] 2020-03-30 05:06:10.952 UTC [bccsp_sw] openKeyStore -> DEBU 01b KeyStore opened at [/etc/hyperledger/msp/keystore]...done 2020-03-30 05:06:10.956 UTC [bccsp] initBCCSP -> DEBU 01c Initialize BCCSP [SW] 2020-03-30 05:06:10.967 UTC [msp] getPemMaterialFromDir -> DEBU 01d Reading directory /etc/hyperledger/msp/signcerts 2020-03-30 05:06:10.967 UTC [msp] getPemMaterialFromDir -> DEBU 01e Inspecting file /etc/hyperledger/msp/signcerts/peer.pem 2020-03-30 05:06:10.968 UTC [msp] getPemMaterialFromDir -> DEBU 01f Reading directory /etc/hyperledger/msp/cacerts 2020-03-30 05:06:10.968 UTC [msp] getPemMaterialFromDir -> DEBU 020 Inspecting file /etc/hyperledger/msp/cacerts/cacert.pem 2020-03-30 05:06:10.968 UTC [msp] getPemMaterialFromDir -> DEBU 021 Reading directory /etc/hyperledger/msp/admincerts 2020-03-30 05:06:10.968 UTC [msp] getPemMaterialFromDir -> DEBU 022 Inspecting file /etc/hyperledger/msp/admincerts/admincert.pem 2020-03-30 05:06:10.969 UTC [msp] getPemMaterialFromDir -> DEBU 023 Reading directory /etc/hyperledger/msp/intermediatecerts 2020-03-30 05:06:10.969 UTC [msp] getMspConfig -> DEBU 024 Intermediate certs folder not found at [/etc/hyperledger/msp/intermediatecerts]. Skipping. [stat /etc/hyperledger/msp/intermediatecerts: no such file or directory] 2020-03-30 05:06:10.969 UTC [msp] getPemMaterialFromDir -> DEBU 025 Reading directory /etc/hyperledger/msp/tlscacerts 2020-03-30 05:06:10.969 UTC [msp] getPemMaterialFromDir -> DEBU 026 Inspecting file /etc/hyperledger/msp/tlscacerts/tlsroot.pem 2020-03-30 05:06:10.970 UTC [msp] getPemMaterialFromDir -> DEBU 027 Reading directory /etc/hyperledger/msp/tlsintermediatecerts 2020-03-30 05:06:10.971 UTC [msp] getPemMaterialFromDir -> DEBU 028 Inspecting file /etc/hyperledger/msp/tlsintermediatecerts/tlsintermediate.pem 2020-03-30 05:06:10.971 UTC [msp] getPemMaterialFromDir -> DEBU 029 Reading directory /etc/hyperledger/msp/crls 2020-03-30 05:06:10.971 UTC [msp] getMspConfig -> DEBU 02a crls folder not found at [/etc/hyperledger/msp/crls]. Skipping. [stat /etc/hyperledger/msp/crls: no such file or directory] 2020-03-30 05:06:10.971 UTC [msp] getMspConfig -> DEBU 02b MSP configuration file not found at [/etc/hyperledger/msp/config.yaml]: [stat /etc/hyperledger/msp/config.yaml: no such file or directory] 2020-03-30 05:06:10.976 UTC [msp] newBccspMsp -> DEBU 02c Creating BCCSP-based MSP instance 2020-03-30 05:06:10.977 UTC [msp] New -> DEBU 02d Creating Cache-MSP instance 2020-03-30 05:06:10.977 UTC [msp] loadLocaMSP -> DEBU 02e Created new local MSP 2020-03-30 05:06:10.977 UTC [msp] Setup -> DEBU 02f Setting up MSP instance DEFAULT 2020-03-30 05:06:10.982 UTC [msp/identity] newIdentity -> DEBU 030 Creating identity instance for cert -----BEGIN CERTIFICATE----- MIICYjCCAgigAwIBAgIRAL1fEAnz5zp4moJ8MdSb/lYwCgYIKoZIzj0EAwIwgYEx CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4g RnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMQwwCgYDVQQLEwND T1AxHDAaBgNVBAMTE2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMTEyMTM0MTEx WhcNMjcxMTEwMTM0MTExWjCBgTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlm b3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhh bXBsZS5jb20xDDAKBgNVBAsTA0NPUDEcMBoGA1UEAxMTY2Eub3JnMS5leGFtcGxl LmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABGrsQ6oJpk6hDWf63HU3OSNd bou9KNw/VIee1IngPDI4YJU7O+Xa/XLJuwnFv7BpR8Ytl3f+njC8i/RZP2/svO+j XzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB/wQF MAMBAf8wKQYDVR0OBCIEIIpzkSIZzxBWVIV5unlgZJuyu2XPEeP8+y1uB6LLA5Qr MAoGCCqGSM49BAMCA0gAMEUCIQDUh/+CC2dAICnYtACXspwUaaEbiyZxYIx+XDvW o8VVcgIgGz5S4iC5+xkxgeaISPfxKTTVy6yzTdYGzCw1vPppjzo= -----END CERTIFICATE----- 2020-03-30 05:06:10.984 UTC [msp/identity] newIdentity -> DEBU 031 Creating identity instance for cert -----BEGIN CERTIFICATE----- MIICNjCCAd2gAwIBAgIRAMnf9/dmV9RvCCVw9pZQUfUwCgYIKoZIzj0EAwIwgYEx CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4g RnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMQwwCgYDVQQLEwND T1AxHDAaBgNVBAMTE2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMTEyMTM0MTEx WhcNMjcxMTEwMTM0MTExWjBpMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZv cm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEMMAoGA1UECxMDQ09QMR8wHQYD VQQDExZwZWVyMC5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D AQcDQgAEZ8S4V71OBJpyMIVZdwYdFXAckItrpvSrCf0HQg40WW9XSoOOO76I+Umf EkmTlIJXP7/AyRRSRU38oI8Ivtu4M6NNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1Ud EwEB/wQCMAAwKwYDVR0jBCQwIoAginORIhnPEFZUhXm6eWBkm7K7Zc8R4/z7LW4H ossDlCswCgYIKoZIzj0EAwIDRwAwRAIgVikIUZzgfuFsGLQHWJUVJCU7pDaETkaz PzFgsCiLxUACICgzJYlW7nvZxP7b6tbeu3t8mrhMXQs956mD4+BoKuNI -----END CERTIFICATE----- 2020-03-30 05:06:11.105 UTC [msp/identity] newIdentity -> DEBU 032 Creating identity instance for cert -----BEGIN CERTIFICATE----- MIICNjCCAd2gAwIBAgIRAMnf9/dmV9RvCCVw9pZQUfUwCgYIKoZIzj0EAwIwgYEx CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4g RnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMQwwCgYDVQQLEwND T1AxHDAaBgNVBAMTE2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMTEyMTM0MTEx WhcNMjcxMTEwMTM0MTExWjBpMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZv cm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEMMAoGA1UECxMDQ09QMR8wHQYD VQQDExZwZWVyMC5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D AQcDQgAEZ8S4V71OBJpyMIVZdwYdFXAckItrpvSrCf0HQg40WW9XSoOOO76I+Umf EkmTlIJXP7/AyRRSRU38oI8Ivtu4M6NNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1Ud EwEB/wQCMAAwKwYDVR0jBCQwIoAginORIhnPEFZUhXm6eWBkm7K7Zc8R4/z7LW4H ossDlCswCgYIKoZIzj0EAwIDRwAwRAIgVikIUZzgfuFsGLQHWJUVJCU7pDaETkaz PzFgsCiLxUACICgzJYlW7nvZxP7b6tbeu3t8mrhMXQs956mD4+BoKuNI -----END CERTIFICATE----- 2020-03-30 05:06:11.117 UTC [msp/identity] newIdentity -> DEBU 033 Creating identity instance for cert -----BEGIN CERTIFICATE----- MIICNjCCAd2gAwIBAgIRAMnf9/dmV9RvCCVw9pZQUfUwCgYIKoZIzj0EAwIwgYEx CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4g RnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMQwwCgYDVQQLEwND T1AxHDAaBgNVBAMTE2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMTEyMTM0MTEx WhcNMjcxMTEwMTM0MTExWjBpMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZv cm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEMMAoGA1UECxMDQ09QMR8wHQYD VQQDExZwZWVyMC5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D AQcDQgAEZ8S4V71OBJpyMIVZdwYdFXAckItrpvSrCf0HQg40WW9XSoOOO76I+Umf EkmTlIJXP7/AyRRSRU38oI8Ivtu4M6NNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1Ud EwEB/wQCMAAwKwYDVR0jBCQwIoAginORIhnPEFZUhXm6eWBkm7K7Zc8R4/z7LW4H ossDlCswCgYIKoZIzj0EAwIDRwAwRAIgVikIUZzgfuFsGLQHWJUVJCU7pDaETkaz PzFgsCiLxUACICgzJYlW7nvZxP7b6tbeu3t8mrhMXQs956mD4+BoKuNI -----END CERTIFICATE----- 2020-03-30 05:06:11.118 UTC [msp] setupSigningIdentity -> DEBU 034 Signing identity expires at 2027-11-10 13:41:11 +0000 UTC 2020-03-30 05:06:11.120 UTC [msp] Validate -> DEBU 035 MSP DEFAULT validating identity 2020-03-30 05:06:11.131 UTC [grpc] Printf -> DEBU 036 parsed scheme: "" 2020-03-30 05:06:11.131 UTC [grpc] Printf -> DEBU 037 scheme "" not registered, fallback to default scheme 2020-03-30 05:06:11.131 UTC [grpc] Printf -> DEBU 038 ccResolverWrapper: sending new addresses to cc: [{peer:7051 0 <nil>}] 2020-03-30 05:06:11.132 UTC [grpc] Printf -> DEBU 039 ClientConn switching balancer to "pick_first" 2020-03-30 05:06:11.132 UTC [grpc] Printf -> DEBU 03a pickfirstBalancer: HandleSubConnStateChange: 0xc420285c30, CONNECTING 2020-03-30 05:06:11.141 UTC [grpc] Printf -> DEBU 03b pickfirstBalancer: HandleSubConnStateChange: 0xc420285c30, READY 2020-03-30 05:06:11.144 UTC [grpc] Printf -> DEBU 03c parsed scheme: "" 2020-03-30 05:06:11.148 UTC [grpc] Printf -> DEBU 03d scheme "" not registered, fallback to default scheme 2020-03-30 05:06:11.148 UTC [grpc] Printf -> DEBU 03e ccResolverWrapper: sending new addresses to cc: [{peer:7051 0 <nil>}] 2020-03-30 05:06:11.148 UTC [grpc] Printf -> DEBU 03f ClientConn switching balancer to "pick_first" 2020-03-30 05:06:11.148 UTC [grpc] Printf -> DEBU 040 pickfirstBalancer: HandleSubConnStateChange: 0xc420196160, CONNECTING 2020-03-30 05:06:11.155 UTC [grpc] Printf -> DEBU 041 pickfirstBalancer: HandleSubConnStateChange: 0xc420196160, READY 2020-03-30 05:06:11.157 UTC [msp] GetDefaultSigningIdentity -> DEBU 042 Obtaining default signing identity 2020-03-30 05:06:11.161 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 043 java chaincode disabled 2020-03-30 05:06:11.161 UTC [msp/identity] Sign -> DEBU 044 Sign: plaintext: 0ACB070A6308031A0B08C3FC85F40510...1A0E0A0571756572790A0548656C6C6F 2020-03-30 05:06:11.162 UTC [msp/identity] Sign -> DEBU 045 Sign: digest: C1E1022BA3D653B591168C96B600A8F22814B38F87C5944FF2797D1F6849D710 Error: endorsement failure during query. response: status:500 message:"make sure the chaincode hellocc has been successfully instantiated and try again: getccdata myc/hellocc responded with error: could not find chaincode with name 'hellocc'" ``` 各种方法都试过了 不知道怎么解决这个问题了

建立用go编写的链码时出错

<div class="post-text" itemprop="text"> <p>When I try to modify the example described in <a href="http://hyperledger-fabric.readthedocs.io/en/release-1.1/write_first_app.html" rel="nofollow noreferrer">this hyperledger example</a> I get some error when adding <a href="https://github.com/hyperledger/fabric/tree/master/protos/ledger/queryresult" rel="nofollow noreferrer">this external library</a> in order to get the History of the chaincode state.<br> Why does that happen?</p> <p>I add the library with govendor, but when I run this command:</p> <pre><code>docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n $CC_NAME -l "$LANGUAGE" -v 1.0 -c $INIT_STR -P "OR ('Org1MSP.member','Org2MSP.member')" </code></pre> <p>I get this error:</p> <blockquote> <p>Error: Error endorsing chaincode:<br> rpc error: code = Unknown desc = error starting container: Failed to generate platform-specific docker build: Error returned from build: 2 "# firstExample chaincode/input/src/firstExample/firstStep.go:104:11: cannot assign *"github.com/hyperledger/fabric/protos/ledger/queryresult".KeyModification to kM (type *"firstExample/vendor/github.com/hyperledger/fabric/protos/ledger/queryresult".KeyModification) in multiple assignment chaincode/input/src/firstExample/firstStep.go:146:11: cannot assign *"github.com/hyperledger/fabric/protos/ledger/queryresult".KeyModification to kM (type *"firstExample/vendor/github.com/hyperledger/fabric/protos/ledger/queryresult".KeyModification) in multiple assignment chaincode/input/src/firstExample/firstStep.go:156:11: cannot assign *"github.com/hyperledger/fabric/protos/ledger/queryresult".KeyModification to kM (type *"firstExample/vendor/github.com/hyperledger/fabric/protos/ledger/queryresult".KeyModification) in multiple assignment</p> </blockquote> <p>I have some troubles with this. I'm sure that the library is imported because if I build the chaincode written in go with the command:</p> <pre><code>go build </code></pre> <p>I get no errors.<br> Please help me!</p> </div>

Hyperledger Fabric:无法调用链码名称:“ lscc”

<div class="post-text" itemprop="text"> <p>While trying to instantiate a chaincode, I always get a timeout error on lifecycle chaincode (lscc) as follows:</p> <pre><code>2018-04-06 12:36:50.210 UTC [chaincode] Launch -&gt; ERRO 031 launchAndWaitForRegister failed Timeout expired while starting chaincode mycc:1.0(networkid:dev,peerid:org1-peer1,tx:3fa17e226a26f624d4554f7b64572672370838ddb53bc6ae21f0614c61737a51) 2018-04-06 12:36:50.211 UTC [endorser] simulateProposal -&gt; ERRO 032 failed to invoke chaincode name:"lscc" on transaction 3fa17e226a26f624d4554f7b64572672370838ddb53bc6ae21f0614c61737a51, error: Timeout expired while starting chaincode mycc:1.0(networkid:dev,peerid:org1-peer1,tx:3fa17e226a26f624d4554f7b64572672370838ddb53bc6ae21f0614c61737a51) </code></pre> <p>And chaincode container is never created.</p> <p>EDIT: Timeout issue is solved when I changed the timeout parameters as follows:</p> <p><strong>Previously</strong> (not working):</p> <p><code>CORE_CHAINCODE_DEPLOYTIMEOUT=600000 CORE_CHAINCODE_STARTUPTIMEOUT=600000</code></p> <p><strong>Correct</strong> (working):</p> <p><code>CORE_CHAINCODE_DEPLOYTIMEOUT=300s CORE_CHAINCODE_STARTUPTIMEOUT=300s</code></p> </div>

Hyperledger-fabric无法实例化链码

<div class="post-text" itemprop="text"> <p>I am unable to instantiate chaincode in Hyperledge Fabric.</p> <p>When executing:</p> <pre><code>peer chaincode instantiate -o orderer -n test_cc -C test-channel -v 0.1 -c '{"Args":["initLedger"]}' </code></pre> <p>I get the error:</p> <pre><code>peer0 | 2018-04-17 13:02:11.097 UTC [dockercontroller] Start -&gt; ERRO 046 start-could not start container: API error (400): {"message":"OCI runtime create failed: container_linux.go:348: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\": unknown"} </code></pre> <p>When searching the internet, the error message is the same as on the original post at [<a href="https://stackoverflow.com/questions/48852755/oci-runtimer-error-when-installing-hyperledger-chaincode-via-java-sdk%5D">OCI Runtimer Error when installing Hyperledger Chaincode via Java-SDK</a> and [<a href="https://stackoverflow.com/questions/47593097/oci-runtime-error-when-sending-hyperledger-fabrics-chaincode-instantiation-requ%5D">OCI runtime error when sending Hyperledger Fabric's chaincode instantiation request to peers</a>, but the comments on these posts did not led me to the solution.</p> <p>I am using the following software versions: Hyperledger 1.1.0 Docker version 18.03.0-ce (on Linux), Hyperledger Docker images: x86_64-1.1.0</p> <p>The following steps succeed:</p> <ul> <li>Building the chaincode. The code compiles without errors. I did not include any dependencies except the two required "github.com/hyperledger/fabric/core/chaincode/shim" and "github.com/hyperledger/fabric/protos/peer"</li> <li>Packaging the chaincode.</li> <li>Signing the chaincode.</li> <li>Installing the chaincode (it ends up in the peer's /var/hyperledger/production/chaincodes/test_cc.0.1.</li> </ul> <p>(Steps according to Hyperledger documentation: [<a href="http://hyperledger-fabric-docs.readthedocs.io/en/latest/chaincode4noah.html%5D" rel="nofollow noreferrer">http://hyperledger-fabric-docs.readthedocs.io/en/latest/chaincode4noah.html]</a>)</p> <p>In the CLI Docker container, files are located in the directory <code>/opt/gopath/src/chaincode/go/test_cc/</code>, where 4 files are present: <code>test_cc, test_cc.go, test_cc_pack.out, test_cc_signed_pack.out</code> (the binary, source file, packaged file and signed package file).</p> <p>The full output of the orderer and peer is:</p> <pre><code>orderer | 2018-04-17 13:29:43.617 UTC [orderer/common/server] Broadcast -&gt; DEBU 167 Starting new Broadcast handler orderer | 2018-04-17 13:29:43.617 UTC [orderer/common/broadcast] Handle -&gt; DEBU 168 Starting new broadcast loop for 172.18.0.6:41228 couchdb | [notice] 2018-04-17T13:29:43.624931Z nonode@nohost &lt;0.16042.3&gt; b5d38cd27d couchdb:5984 172.18.0.5 undefined GET /test-channel_lscc/test_cc?attachments=true 404 ok 2 peer | 2018-04-17 13:29:44.416 UTC [dockercontroller] Start -&gt; ERRO 04a start-could not start container: API error (400): {"message":"OCI runtime create failed: container_linux.go:348: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\": unknown"} peer | 2018-04-17 13:29:44.647 UTC [chaincode] Launch -&gt; ERRO 04b launchAndWaitForRegister failed: API error (400): {"message":"OCI runtime create failed: container_linux.go:348: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\": unknown"} peer | peer | error starting container peer | 2018-04-17 13:29:44.647 UTC [endorser] simulateProposal -&gt; ERRO 04c [test-channel][39e4414a] failed to invoke chaincode name:"lscc" , error: API error (400): {"message":"OCI runtime create failed: container_linux.go:348: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\": unknown"} peer | peer | error starting container orderer | 2018-04-17 13:29:44.648 UTC [orderer/common/broadcast] Handle -&gt; DEBU 169 Received EOF from 172.18.0.6:41228, hangup orderer | 2018-04-17 13:29:44.648 UTC [orderer/common/server] func1 -&gt; DEBU 16a Closing Broadcast stream </code></pre> <p>It looks like there is some path issue, but the process of the creation of the chaincode container and the variables which influence this process.</p> <p>I'm messing around with this issue for few days(!) now, tried all path combinations like placing the file in <code>/opt/gopath/bin</code>, etcetera, but to no avail.</p> <p>Someone who can shine a light on this issue? Or knows what the correct paths are and where they are, or where they should be defined?</p> <p>Thanks</p> </div>

Hyperledger Fabric链码-无法使用InvokeChaincode从另一个链码读取数据。 状态200,但有效载荷为空

<div class="post-text" itemprop="text"> <p>I am working on a chaincode where I need to read data previously stored from another one. </p> <p>They are instantiated on the same channel and I can use them individually to read and write data separately. </p> <p>You can replicate it using the <code>marble</code> chaincode, installing it with different names on the same peer.</p> <p>In one of them (A) I implemented invokeChaincode(B), to read data stored by B in this way:</p> <pre><code>func (chaincode *SimpleChaincode) queryMarblesFromAnotherChaincode(stub shim.ChaincodeStubInterface, args []string) peer.Response { queryMarble := "queryMarble" if len(args) != 3 { return shim.Error("Incorrect number of arguments. Expecting 3") } chaincodeName := args[0] chaincodeArgs := toChaincodeArgs(queryMarble, args[1]) chaincodeChannel := args[2] response := stub.InvokeChaincode(chaincodeName, chaincodeArgs, chaincodeChannel) if response.Status != shim.OK { return shim.Error(fmt.Sprintf("Failed to query chaincode: %s", response.Payload)) } return shim.Success(response.Payload) } </code></pre> <p>Running that method using <code>peer chaincode invoke ..</code> , I receive <code>status: 200</code>, but Payload is empty. </p> <p>Could you advise on what I am doing wrong?</p> </div>

Hyperledger自定义Chaincode部署错误

<div class="post-text" itemprop="text"> <p>I'm using Hyperledger to work on a POC. I've set the chaincode setup as mentioned <a href="https://github.com/hyperledger/fabric/blob/master/docs/Setup/Chaincode-setup.md#chaincode-deploy-via-cli-and-rest" rel="nofollow">here</a> . I'm following the Option 1 mentioned in the link(using vagrant to run a CA server and one VP). In my current setup, I'm running with security disabled. My VP is running fine, and I'm able to start and register the chaincode just fine (as per mentioned <a href="https://github.com/hyperledger/fabric/blob/master/docs/Setup/Chaincode-setup.md#starting-and-registering-the-chaincode" rel="nofollow">here</a>. But, when I'm trying to deploy my chaincode via CLI with the following command :</p> <pre><code>peer chaincode deploy -n mycc -c '{"Function":"init", "Args": `["hi there"]}'` </code></pre> <p>I am getting the following error</p> <pre><code>Error: Error building chaincode: rpc error: code = 2 desc = "Error getting chaincode package bytes: Cannot generate hashcode from empty chaincode path" </code></pre> <p>I tried specifically mentioning the path where I've stored my custom chaincode, I get the following error :</p> <pre><code>Error: Error building chaincode: rpc error: code = 2 desc = "Path to chaincode does not exist: /opt/gopath/src/ProductBC/ProductBC/finished/" </code></pre> <p>Has anyone faced a similar issue or any points on what can be done to overcome this ?</p> </div>

lscc链码超时错误

<div class="post-text" itemprop="text"> <p>I have a setup, which was working until today. Since morning I 'm not able to create new channels or install new chaincodes. Existing chaincodes are working. Getting lscc chaincode timeout error when trying to install new chaincodes or create new channel.</p> <p>Here are the logs, can someone please help?</p> <pre><code>2018-07-18 05:44:59.527 UTC [endorser] SimulateProposal -&gt; ERRO 0d0 [][51efedf7] failed to invoke chaincode name:"lscc" , error: timeout expired while executing transaction github.com/hyperledger/fabric/core/chaincode.(*Handler).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:919 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:253 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Invoke /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:239 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:179 github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/support.go:141 github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:136 github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:287 github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:501 github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61 github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:31 github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler /opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:112 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).processUnaryRPC /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:923 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).handleStream /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1148 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:637 runtime.goexit /opt/go/src/runtime/asm_amd64.s:2361 error sending failed to execute transaction 51efedf7934af10cc3d6627c85262df4542d3186127c94f2a7156bb0111b2f72 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:181 github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/support.go:141 github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:136 github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:287 github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:501 github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61 github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:31 github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler /opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:112 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).processUnaryRPC /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:923 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).handleStream /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1148 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:637 runtime.goexit /opt/go/src/runtime/asm_amd64.s:2361 </code></pre> </div>

无法实例化对等点上的链码,连接被对等点重置

<div class="post-text" itemprop="text"> <p>I am trying to get started with Hyperledger Fabric. I managed to run the "build your first network"-tutorial from the samples, and I followed the "write your first application"-tutorial as well, which also worked.</p> <p>As a next step, I wanted to create my own network more or less from scratch, by adjusting the .yaml files from the samples and running cryptogen and configtxgen manually. I managed to build a network with three organisations, two peers per org and a solo ordering service. I now want to install some basic chaincode on one of the peers, but I'm stuck, as I get a couple of weird errors:</p> <pre><code>2018-03-01 22:27:30.525 UTC [grpc] Printf -&gt; DEBU 003 transport: http2Client.notifyError got notified that the client transport was broken read tcp 172.20.0.9:45178-&gt;172.20.0.3:7050: read: connection reset by peer. Error: Error getting broadcast client: Error connecting to orderer.rle.de:7050 due to rpc error: code = Internal desc = transport: write tcp 172.20.0.9:45178-&gt;172.20.0.3:7050: write: broken pipe 2018-03-01 22:27:30.525 UTC [grpc] Printf -&gt; DEBU 004 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup orderer.rle.de on 127.0.0.11:53: dial udp 127.0.0.11:53: operation was canceled"; Reconnecting to {orderer.rle.de:7050 &lt;nil&gt;} 2018-03-01 22:27:30.525 UTC [grpc] Printf -&gt; DEBU 005 grpc: addrConn.transportMonitor exits due to: grpc: the connection is closing </code></pre> <p>After that, I get the usage information for <code>peer chaincode instantiate</code></p> <p>If you could provide any insight into what might be causing this error, I would be super grateful. I don't even know if it is caused by the network config or by the chaincode itself (I don't think so, since I tried two different chaincodes, one of which was "sacc" from the samples) but the installation of the chaincode seems to be working. My problem is that I have no idea what I'm doing, so after googling and fooling around with the arguments for peer chaincode instantiate, I'm all out of ideas.</p> <p>My command (I run it from a .sh file) is:</p> <pre><code>peer chaincode instantiate -o orderer.rle.de:7050 -C driverlogschannel -n test -v 1.0 -c '{"Args":["John","0"]}' -P "OR ('rleMSP.member')" </code></pre> <p>The chaincode is taken from the sacc example installed via </p> <pre><code>peer chaincode install -n test -v 1.0 -p sacc </code></pre> <p>Thanks a lot! If you need more logs or other info, I can provide them.</p> </div>

无法组装事务,错误的提案响应未成功,错误代码500,味精链码注册失败:容器退出,返回0

<div class="post-text" itemprop="text"> <p>I'm trying to instantiate the chaincode, but an error happens, and I can not find solutions to it.</p> <p>ubuntu 18.04<br> hyperledger fabric 1.4.1<br> I've followed the document and it succeeded last week. The same code works well on another computer.<br> Before instantiate, everything went on well including making channels. I have not applied node in my project.</p> <p>Codes:</p> <pre><code>root@c442cc2748e7:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA -C $CHANNEL_NAME -n mycc -l golang -v 1.0 -c '{"Args":[]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')" 2019-05-23 06:31:31.382 UTC [chaincodeCmd] checkChaincodeCmdParams -&gt; INFO 001 Using default escc 2019-05-23 06:31:31.382 UTC [chaincodeCmd] checkChaincodeCmdParams -&gt; INFO 002 Using default vscc Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 0 </code></pre> </div>

找不到超级账本链码库

<div class="post-text" itemprop="text"> <p>Hi to all who can help.</p> <p>Currently developing a chaincode for fabric version 1.0. The problem is, even after vendoring, when I do the deployment, I get this error.</p> <pre><code>[DEBUG] instantiate-chaincode - ============ Instantiate chaincode on organization XYZ ============ error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/XYZ/vendor/github.com/hyperledger/fabric/bccsp/factory/pluginfactory.go:12:2: cannot find package "plugin" in any of: /chaincode/input/src/XYZ/vendor/plugin (vendor tree) /opt/go/src/plugin (from $GOROOT) /chaincode/input/src/plugin (from $GOPATH) /opt/gopath/src/plugin " at /usr/src/app/node_modules/grpc/src/node/src/client.js:434:17 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/XYZ/vendor/github.com/hyperledger/fabric/bccsp/factory/pluginfactory.go:12:2: cannot find package "plugin" in any of: /chaincode/input/src/XYZ/vendor/plugin (vendor tree) /opt/go/src/plugin (from $GOROOT) /chaincode/input/src/plugin (from $GOPATH) /opt/gopath/src/plugin " </code></pre> <p>The fabric images that I'm using are:</p> <ul> <li>hyperledger/fabric-peer:x86_64-1.0.3</li> <li>hyperledger/fabric-ca:x86_64-1.0.3 </li> <li>hyperledger/fabric-tools:x86_64-1.0.3</li> <li>hyperledger/fabric-couchdb:x86_64-0.4.6</li> <li>hyperledger/fabric-orderer:x86_64-1.0.3</li> </ul> </div>

ltdl.h构建链码时未发现错误

<div class="post-text" itemprop="text"> <p>I am trying to build a chaincode by using <code>go build</code>. when i run Go build command its reporting </p> <pre><code>.\hyperledger\fabric\vendor\github.com\miekg\pkcs11\pkcs11.g‌​o:29:18: fatal error:ltdl.h: No such file or directory compilation terminated </code></pre> <p>I installed libtools from this <a href="http://gnuwin32.sourceforge.net/packages/libtool.htm" rel="noreferrer">link</a>. But I am getting the same error</p> </div>

运行Chaincode程序时出错

<div class="post-text" itemprop="text"> <p>I am writing chaincode program in GO on my MacOS. Following is the code:</p> <pre><code>package main import ( "encoding/json" "fmt" "github.com/hyperledger/fabric/core/chaincode/shim" sc "github.com/hyperledger/fabric/protos/peer" ) //Init and Invoke type SmartContract struct { } type SomeDocument struct { DocumentID string `json:"docid"` CreatorID string `json:"uid"` DocHolder string `json:"doc_holder"` Location string `json:"location"` DocumentType string `json:"doc_type"` Content string `json:"doc_content"` } func (s *SmartContract) Init(APIstub shim.ChaincodeStubInterface) sc.Response { return shim.Success(nil) } func (s *SmartContract) Invoke(APIstub shim.ChaincodeStubInterface) sc.Response { return shim.Success(nil) } func main() { first_doc := SomeDocument{"1001", "123456789012", "ABCD EFGH", "New Delhi", "School Form", "I want to enroll in this school"} theJson, _ := json.Marshal(first_doc) //returns JSON encoding of first_stamp fmt.Printf("%+v ", string(theJson)) err := shim.Start(new(SmartContract)) if err != nil { fmt.Printf("Error creating new Smart Document: %s", err) } else { fmt.Println("Success") } } </code></pre> <p>It is showing the following error due to this line, shim.Start(new(SmartContract)):</p> <pre><code>{"docid":"1001","uid":"123456789012","doc_holder":"ABCD EFGH","location":"New Delhi","doc_type":"School Form","doc_content":"I want to enroll in this school"} 2018-04-10 23:34:41.598 IST [shim] SetupChaincodeLogging -&gt; INFO 001 Chaincode log level not provided; defaulting to: INFO 2018-04-10 23:34:41.598 IST [shim] SetupChaincodeLogging -&gt; INFO 002 Chaincode (build level: ) starting up ... Error creating new Smart Document: error chaincode id not provided% </code></pre> <p>I cannot find any solution. </p> <p>Is it possible to specify the limit on the length of struct attributes?. For example DocumentID should be length 10.</p> </div>

GobEncoder用于通过RPC传递匿名函数

<div class="post-text" itemprop="text"> <p>I'm trying to build a system that will execute a function on multiple machines, passing the function anonymously via RPC to each worker machine (a la MapReduce) to execute on some subset of data. Gob doesn't support encoding functions, though the <a href="http://golang.org/pkg/encoding/gob/#GobEncoder" rel="nofollow">docs</a> for GobEncoder say that "A type that implements GobEncoder and GobDecoder has complete control over the representation of its data and may therefore contain things such as private fields, channels, and functions, which are not usually transmissible in gob streams" so it seems possible.</p> <p>Any examples of how this might work? I don't know much about how this encoding/decoding should be done with Gob.</p> </div>

Hyperledger Fabric registerChaincodeEvent()方法未从链码获取事件

<div class="post-text" itemprop="text"> <p>After deploying my chaincode successfully and being able to perform some get from its data (all data returned are correct), I am not able to check if an event is emitted. The function inside <code>Invoke()</code> is <code>queryAllMachines()</code> and if I call just this function it returns a set of machines (the set of machine insert in the method InitLedger())</p> <p>I follow the documentation and my chaincode (in go) should emit an event in this code line inside its <code>queryAllMachines()</code> function:</p> <pre><code>func (s *testContract) queryAllMachines(APIstub shim.ChaincodeStubInterface) sc.Response { fmt.Println("inside queryAllMachines ") ... err = APIstub.SetEvent("evtsender", []byte("adadsads")) if err != nil { return shim.Error("event not set") } fmt.Printf("No errors ") } </code></pre> <p>This code always prints "no errors", so I suppose the events is emitted rightly.</p> <p>Then in my .js file for query i have the request:</p> <pre><code>let request = { chaincodeId: 'oraclize-test-integration', fcn: 'queryAllMachines', args: [''], txId: tx_object }; </code></pre> <p>Then this is the part of my .js file where I have the problem and where I want to launch <code>registerChaincodeEvent()</code>:</p> <pre><code>let event_monitor = new Promise((resolve, reject) =&gt; { let regid = null; let handle = setTimeout(() =&gt; { if (regid) { // might need to do the clean up this listener channel_event_hub.unregisterChaincodeEvent(regid); console.log('Timeout - Failed to receive the chaincode event'); } reject(new Error('Timed out waiting for chaincode event')); }, 20000); regid = channel_event_hub.registerChaincodeEvent('oraclize-test-integration', 'evtsender', (event, block_num, txnid, status) =&gt; { // This callback will be called when there is a chaincode event name // within a block that will match on the second parameter in the registration // from the chaincode with the ID of the first parameter. console.log('Successfully got a chaincode event with transid:' + txnid + ' with status:' + status); // might be good to store the block number to be able to resume if offline storeBlockNumForLater(block_num); // to see the event payload, the channel_event_hub must be connected(true) let event_payload = event.payload.toString('utf8'); if (event_payload.indexOf('CHAINCODE') &gt; -1) { clearTimeout(handle); // Chaincode event listeners are meant to run continuously // Therefore the default to automatically unregister is false // So in this case we want to shutdown the event listener once // we see the event with the correct payload channel_event_hub.unregisterChaincodeEvent(regid); console.log('Successfully received the chaincode event on block number ' + block_num); resolve('RECEIVED'); } else { console.log('Successfully got chaincode event ... just not the one we are looking for on block number ' + block_num); } }, (error) =&gt; { clearTimeout(handle); console.log('Failed to receive the chaincode event ::' + error); reject(error); } // no options specified // startBlock will default to latest // endBlock will default to MAX // unregister will default to false // disconnect will default to false ); }); // build the promise to send the proposals to the orderer let send_trans = channel.sendTransaction({ proposalResponses: query_responses[0], proposal: query_responses[1] }); // now that we have two promises all set to go... execute them return Promise.all([event_monitor, send_trans]); </code></pre> <p>The error that appears is: </p> <blockquote> <p>Timeout - Failed to receive the chaincode event (node:9180) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: Timed out waiting for chaincode event (node:9180) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with anon-zero exit code.</p> </blockquote> <p>So the functions times out in this part of the code, even if I launch another .js file that execute successfully the call to <code>queryAllMachines()</code> function: </p> <pre><code>let handle = setTimeout(() =&gt; { if (regid) { // might need to do the clean up this listener channel_event_hub.unregisterChaincodeEvent(regid); console.log('Timeout - Failed to receive the chaincode event'); } reject(new Error('Timed out waiting for chaincode event')); }, 20000); </code></pre> </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)

找不到在Windows 7上运行的自定义链码路径Hyperledger Fabric V1.0本地网络

<div class="post-text" itemprop="text"> <p>I am trying to install my custom chain code in my local Hyperledger Fabric v1.0 environment. </p> <p>For this I have followed the documentation <a href="http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html" rel="nofollow noreferrer">build your first network</a> and I am using first network sample with in the <a href="https://github.com/hyperledger/fabric-samples" rel="nofollow noreferrer">github</a> project. No it is up and running with <code>./byfn.sh -m up</code> and executing all the scripts for channel creating, chain code installation and instantiation and all by running script.sh file.</p> <p>Now I have changed the following to tryout my custom chaincode </p> <pre><code>peer chaincode install -n mycc -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02&gt;&amp;log.txt </code></pre> <p>this I have changed to </p> <pre><code>peer chaincode install -n mycc -v 1.0 -p github.com/myuserId/fabrcicV1_chaincodes/mychaincode &gt;&amp;log.txt </code></pre> <p>Now by running <code>./byfn.sh -m up</code> getting the exception </p> <pre><code>2017-08-22 11:01:17.048 UTC [msp] GetDefaultSigningIdentity -&gt; DEBU 002 Obtaining default signing identity 2017-08-22 11:01:17.048 UTC [chaincodeCmd] checkChaincodeCmdParams -&gt; INFO 003 Using default escc 2017-08-22 11:01:17.048 UTC [chaincodeCmd] checkChaincodeCmdParams -&gt; INFO 004 Using default vscc Error: Error getting chaincode code chaincode: path to chaincode does not exist: github.com/myuserId/fabrcicV1_chaincodes/mychaincode Usage: peer chaincode install [flags] Flags: -c, --ctor string Constructor message for the chaincode in JSON format (default "{}") -l, --lang string Language the chaincode is written in (default "golang") -n, --name string Name of the chaincode -p, --path string Path to chaincode -v, --version string Version of the chaincode specified in install/instantiate/upgrade commands Global Flags: --cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoi --logging-level string Default logging level and overrides, see core.yaml for full syntax -o, --orderer string Ordering service endpoint --test.coverprofile string Done (default "coverage.cov") --tls Use TLS when communicating with the orderer endpoint !!!!!!!!!!!!!!! Chaincode installation on remote peer PEER0 has Failed !!!!!!!!!!!!!!!! ========= ERROR !!! FAILED to execute End-2-End Scenario =========== </code></pre> <p>I have the repository there in <a href="https://github.com/" rel="nofollow noreferrer">github</a>, then why it is not showing <strong>does not exit</strong>? </p> <p>I have <em>cloned</em> the same to <strong>Windows 7</strong> machine under the path $GOPATH/src/github.com/ and given local path, then also I am getting the same error. I am running all the commands through docker quick start terminal for <strong>windows 7</strong>.</p> <p>Please suggest where I am doing wrong.</p> <p>Also in some of the network log I have found a location <code>/opt/gopath/src/github.com/....</code> and where it is pointing to. In my windows path gopath is <code>/c/users/public/fabricv1</code>. </p> <p>Since I am not much familiar with the tool, please comment on this also.</p> <blockquote> <p>After doing some analysis from my side, it seems like the chain code is reading from some pre-mounted directories <strong><em>sacc/, fabcar/, /marble02 , chaincode_example_02, hyperledger/</em></strong> under the path <strong><em><code>root@7785f8b27559:/opt/gopath/src/chaincodedev/chaincode#</code></em></strong> and chaincode also pre-loaded at the time of making the network up using docker image. There it seems <strong><em>no effect by adding chaincode in windows folder</em></strong> and it is from the above said virtual machine path.</p> <p>So what can I do now to continue my work? is there any way to install my custom chaincode to the local network. I tried with my githhub path and local path but no use. please somebody help :(</p> </blockquote> </div>

类实例化过程报错找不到符号

![图片说明](https://img-ask.csdn.net/upload/201707/30/1501423516_544330.png)![图片说明](https://img-ask.csdn.net/upload/201707/30/1501423525_287294.png)

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

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

再不跳槽,应届毕业生拿的都比我多了!

跳槽几乎是每个人职业生涯的一部分,很多HR说“三年两跳”已经是一个跳槽频繁与否的阈值了,可为什么市面上有很多程序员不到一年就跳槽呢?他们不担心影响履历吗? PayScale之前发布的**《员工最短任期公司排行榜》中,两家码农大厂Amazon和Google**,以1年和1.1年的员工任期中位数分列第二、第四名。 PayScale:员工最短任期公司排行榜 意外的是,任期中位数极小的这两家公司,薪资...

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

数据结构与算法思维导图

数据库——玩转SQL语句(以MySQL为例)

一、前言 照着大学的SQL server来学

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

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

华为初面+综合面试(Java技术面)附上面试题

华为面试整体流程大致分为笔试,性格测试,面试,综合面试,回学校等结果。笔试来说,华为的难度较中等,选择题难度和网易腾讯差不多。最后的代码题,相比下来就简单很多,一共3道题目,前2题很容易就AC,题目已经记不太清楚,不过难度确实不大。最后一题最后提交的代码过了75%的样例,一直没有发现剩下的25%可能存在什么坑。 笔试部分太久远,我就不怎么回忆了。直接将面试。 面试 如果说腾讯的面试是挥金如土...

和黑客斗争的 6 天!

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

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

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

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

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

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

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

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

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

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

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

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

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

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

程序员写出这样的代码,能不挨骂吗?

当你换槽填坑时,面对一个新的环境。能够快速熟练,上手实现业务需求是关键。但是,哪些因素会影响你快速上手呢?是原有代码写的不够好?还是注释写的不够好?昨夜...

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

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

HTTP与HTTPS的区别

面试官问HTTP与HTTPS的区别,我这样回答让他竖起大拇指!

程序员毕业去大公司好还是小公司好?

虽然大公司并不是人人都能进,但我仍建议还未毕业的同学,尽力地通过校招向大公司挤,但凡挤进去,你这一生会容易很多。 大公司哪里好?没能进大公司怎么办?答案都在这里了,记得帮我点赞哦。 目录: 技术氛围 内部晋升与跳槽 啥也没学会,公司倒闭了? 不同的人脉圈,注定会有不同的结果 没能去大厂怎么办? 一、技术氛围 纵观整个程序员技术领域,哪个在行业有所名气的大牛,不是在大厂? 而且众所...

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

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

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

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

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

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

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

终于懂了TCP和UDP协议区别

终于懂了TCP和UDP协议区别

无代码时代来临,程序员如何保住饭碗?

编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

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

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

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

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

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

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

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

01、Java入门(Getting Started);02、集成开发环境(IDE);03、项目结构(Eclipse JavaProject);04、类和对象(Classes and Objects);05:词法结构(Lexical Structure);06:数据类型和变量(Data Type and Variables);07:运算符(Operators);08:控制流程语句(Control Flow Statements);

Java岗开发3年,公司临时抽查算法,离职后这几题我记一辈子

前几天我们公司做了一件蠢事,非常非常愚蠢的事情。我原以为从学校出来之后,除了找工作有测试外,不会有任何与考试有关的事儿。 但是,天有不测风云,公司技术总监、人事总监两位大佬突然降临到我们事业线,叫上我老大,给我们组织了一场别开生面的“考试”。 那是一个风和日丽的下午,我翘着二郎腿,左手端着一杯卡布奇诺,右手抓着我的罗技鼠标,滚动着轮轴,穿梭在头条热点之间。 “淡黄的长裙~蓬松的头发...

大牛都会用的IDEA调试技巧!!!

导读 前天面试了一个985高校的实习生,问了他平时用什么开发工具,他想也没想的说IDEA,于是我抛砖引玉的问了一下IDEA的调试用过吧,你说说怎么设置断点...

立即提问
相关内容推荐