老师好,外部服务启动时的日志如下

来源:7-15 案例实战外部服务E

yichang

2018-09-19

$ ./application.exe
 [fabsdk/core] 2018/09/18 17:03:46 UTC - sw.getOptsByConfig -> DEBU Initialized SW cryptosuite
 [fabsdk/fab] 2018/09/18 17:03:46 UTC - sw.(*fileBasedKeyStore).createKeyStoreIfNotExists -> DEBU KeyStore path [/e/tmp/msp/keystore] missing [true]: [<clean>]
 [fabsdk/fab] 2018/09/18 17:03:46 UTC - sw.(*fileBasedKeyStore).createKeyStore -> DEBU Creating KeyStore at [/e/tmp/msp/keystore]...
 [fabsdk/fab] 2018/09/18 17:03:46 UTC - sw.(*fileBasedKeyStore).createKeyStore -> DEBU KeyStore created at [/e/tmp/msp/keystore].
 [fabsdk/fab] 2018/09/18 17:03:46 UTC - sw.(*fileBasedKeyStore).openKeyStore -> DEBU KeyStore opened at [/e/tmp/msp/keystore]...done
 [fabsdk/fab] 2018/09/18 17:03:46 UTC - fab.(*EndpointConfig).loadEndpointConfiguration -> DEBU Client is: {Organization:org1 TLSCerts:{Client:{Key:{Path:E:\codes\GitHub\Hyperledge
r/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/config/mutual_tls/client_sdk_go-key.pem Pem: bytes:[]} Cert:{Path:E:\codes\GitHub\Hyperledger/src/github.com/hyperledger/fa
bric-sdk-go/test/fixtures/config/mutual_tls/client_sdk_go.pem Pem: bytes:[]}}}}
 [fabsdk/fab] 2018/09/18 17:03:46 UTC - fab.(*EndpointConfig).loadEndpointConfiguration -> DEBU channels are: map[assetschannel:{Orderers:[orderer.imocc.com] Peers:map[peer0.org1.i
mocc.com:{EndorsingPeer:true ChaincodeQuery:true LedgerQuery:true EventSource:true} peer1.org1.imocc.com:{EndorsingPeer:true ChaincodeQuery:true LedgerQuery:true EventSource:true}]
 Policies:{QueryChannelConfig:{MinResponses:1 MaxTargets:1 RetryOpts:{Attempts:5 InitialBackoff:500ms MaxBackoff:5s BackoffFactor:2 RetryableCodes:map[]}}}}]
 [fabsdk/fab] 2018/09/18 17:03:46 UTC - fab.(*EndpointConfig).loadEndpointConfiguration -> DEBU organizations are: map[org1:{MSPID:Org1MSP CryptoPath:peerOrganizations/org1.imocc.c
om/users/{username}@org1.imocc.com/msp Users:map[] Peers:[peer0.org1.imocc.com] CertificateAuthorities:[]} ordererorg:{MSPID:OrdererMSP CryptoPath:ordererOrganizations/imocc.com/us
ers/{username}@imocc.com/msp Users:map[] Peers:[] CertificateAuthorities:[]}]
 [fabsdk/fab] 2018/09/18 17:03:46 UTC - fab.(*EndpointConfig).loadEndpointConfiguration -> DEBU orderers are: map[orderer.imocc.com:{URL:127.0.0.1:7050 GRPCOptions:map[keep-alive-t
imeout:20s keep-alive-permit:false fail-fast:false allow-insecure:true ssl-target-name-override:orderer.imocc.com keep-alive-time:0s] TLSCACerts:{Path:E:\codes\GitHub\Hyperledger/s
rc/github.com/hyperledger/fabric-sdk-go/${CRYPTOCONFIG_FIXTURES_PATH}/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem Pem: bytes:[]}}]
 [fabsdk/fab] 2018/09/18 17:03:46 UTC - fab.(*EndpointConfig).loadEndpointConfiguration -> DEBU peers are: map[peer0.org1.imocc.com:{URL:127.0.0.1:27051 EventURL:127.0.0.1:27053 GR
PCOptions:map[fail-fast:false allow-insecure:true ssl-target-name-override:peer0.org1.imocc.com keep-alive-time:0s keep-alive-timeout:20s keep-alive-permit:false] TLSCACerts:{Path:
E:\codes\GitHub\Hyperledger/src/github.com/hyperledger/fabric-sdk-go/${CRYPTOCONFIG_FIXTURES_PATH}/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem Pem: byt
es:[]}}]
 [fabsdk/fab] 2018/09/18 17:03:46 UTC - fab.(*EndpointConfig).compileMatchers -> DEBU Matchers are: {matchers:map[]}
 [fabsdk/fab] 2018/09/18 17:03:46 UTC - fab.(*EndpointConfig).compileMatchers -> DEBU Entity matchers are not configured
 [fabsdk/fab] 2018/09/18 17:03:46 UTC - fab.(*EndpointConfig).loadTLSClientCerts -> DEBU Reading pk from config, unable to retrieve from cert: Could not find matching key for SKI:
Failed getting key for SKI [[200 236 199 60 255 11 46 60 231 7 181 4 163 192 29 73 125 163 146 45 171 66 120 82 85 254 71 240 94 192 52 217]]: Key with SKI c8ecc73cff0b2e3ce707b504
a3c01d497da3922dab42785255fe47f05ec034d9 not found in /e/tmp/msp/keystore
 [fabsdk/fab] 2018/09/18 17:03:46 UTC - fab.(*EndpointConfig).loadPrivateKeyFromConfig -> DEBU pk read from config successfully
 [fabsdk/fab] 2018/09/18 17:03:46 UTC - fab.(*EndpointConfig).loadChannelOrderers -> DEBU Could not find Orderer for [orderer.imocc.com] through Entity Matchers
 [fabsdk/fab] 2018/09/18 17:03:46 UTC - fab.detectDeprecatedNetworkConfig -> WARN Getting orderers from endpoint config channels.orderer is deprecated, use entity matchers to overr
ide orderer configuration
 [fabsdk/fab] 2018/09/18 17:03:46 UTC - fab.detectDeprecatedNetworkConfig -> WARN visit https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/overrides/loca
l_entity_matchers.yaml for samples
 [fabsdk/msp] 2018/09/18 17:03:46 UTC - msp.(*IdentityConfig).loadIdentityConfigEntities -> DEBU Client is: {Organization:org1 Logging:{Level:debug} CryptoConfig:{Path:E:\codes\Git
Hub\Hyperledger\src\github.com\hyperledger\fabric\imocc\deploy\crypto-config} TLSCerts:{Client:{Key:{Path:E:\codes\GitHub\Hyperledger/src/github.com/hyperledger/fabric-sdk-go/test/
fixtures/config/mutual_tls/client_sdk_go-key.pem Pem: bytes:[]} Cert:{Path:E:\codes\GitHub\Hyperledger/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/config/mutual_tls/clie
nt_sdk_go.pem Pem: bytes:[]}}} CredentialStore:{Path:/e/tmp/state-store CryptoStore:{Path:/e/tmp/msp}}}
 [fabsdk/msp] 2018/09/18 17:03:46 UTC - msp.(*IdentityConfig).loadIdentityConfigEntities -> DEBU organizations are: map[org1:{MSPID:Org1MSP CryptoPath:peerOrganizations/org1.imocc.
com/users/{username}@org1.imocc.com/msp Users:map[] Peers:[peer0.org1.imocc.com] CertificateAuthorities:[]} ordererorg:{MSPID:OrdererMSP CryptoPath:ordererOrganizations/imocc.com/u
sers/{username}@imocc.com/msp Users:map[] Peers:[] CertificateAuthorities:[]}]
 [fabsdk/msp] 2018/09/18 17:03:46 UTC - msp.(*IdentityConfig).loadIdentityConfigEntities -> DEBU certificateAuthorities are: map[]
 [fabsdk/msp] 2018/09/18 17:03:46 UTC - msp.(*IdentityConfig).compileMatchers -> DEBU Matchers are: {matchers:map[]}
[GIN-debug] [WARNING] Now Gin requires Go 1.6 or later and Go 1.7 will be required soon.

[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.

在开发者模式下,操作都是正常的。

用到sdk之后,就无法初始下sdk, 估计是config.yaml 的问题,但我怎么都找不出来。

写回答

1回答

自游蜗牛

2018-09-19

亲,你好。

我看这些日志都还是正常的,只是有些warn。我建议你还是在linux下操作,你可以用个云主机试试,windows下我没有试过,手上没有机器。

祝你学习愉快!

0
3
Cc_E1even
已经解决,很可能是fabric或fabric-sdk-go版本问题。 我的主要问题是: Failed getting key for SKI [[200 236 199 60 255 11 46 60 231 7 181 4 163 192 29 73 125 163 146 45 171 66 120 82 85 254 71 240 94 192 52 217]]: Key with SKI c8ecc73cff0b2e3ce707b504 a3c01d497da3922dab42785255fe47f05ec034d9 not found in /tmp/msp/keystore 通过查看fabric-sdk-go源码,我的解决方法为: 将示例中$GO{ATH/src/github.com/hyperledger/fabric/imocc/deploy/crypto-config/peerOrganizations/org1.imocc.com/users/Admin@org1.imocc.com/msp/keystore下的priv_sk放入/tmp/msp/keystore下 在application/config.yamlorganization下加入 users: Admin@org1.imocc.com: key: path: ${GOPATH}/src/github.com/hyperledger/fabric/imocc/deploy/crypto-config/peerOrganizations/org1.imocc.com/users/Admin@org1.imocc.com/msp/keystore/priv_sk cert: path:${GOPATH}/src/github.com/hyperledger/fabric/imocc/deploy/crypto-config/peerOrganizations/org1.imocc.com/users/Admin@org1.imocc.com/msp/signcerts/Admin@org1.imocc.com-cert.pem
2020-03-26
共3条回复

Hyperledger Fabric实战联盟链-企业端区块链原理精讲

兼顾区块链应用层和底层 进击区块链工程师

787 学习 · 564 问题

查看课程