Peer Log Messages - Start Environment

Q

How to verify peer node log messages to ensure my Hyperledger Composer developer environment is started correctly?

✍: FYIcenter.com

A

You can follow this tutorial to verify peer node log messages generated during the Hyperledger Composer developer environment start up process.

1. Stop the environment:

$ cd fabric-dev-servers/
$ ./stopFabric.sh
...
Stopping peer0.org1.example.com ... done
Stopping ca.org1.example.com    ... done
Stopping couchdb                ... done
Stopping orderer.example.com    ... done

2. Note down the date and time and start the environment:

$ date
Apr  1 23:26:37 UTC 2019

$ ./startFabric.sh
...
Creating ca.org1.example.com ... done
Creating couchdb             ... done
Creating orderer.example.com ... done
Creating peer0.org1.example.com ... done
sleeping for 15 seconds to wait for fabric to complete start up

3. Fetch peer node log messages for the start up process:

$ docker ps | grep peer
6bc4e52f82d0        hyperledger/fabric-peer:x86_64-1.2.0   ... 

$ docker logs --since 2019-04-01T23:26:37 6bc4e52f82d0 2> peer.log

4. Review peer node log messages:

$ more peer.log

# Peer node started with the "viperutil" module dumping 001 to 01a debug messages
... [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} ...
... [viperutil] getKeysRecursively -> DEBU 002 Found map[string]interface{} ...
... [viperutil] unmarshalJSON -> DEBU 003 Unmarshal JSON: value is not a str...
...
... [viperutil] EnhancedExactUnmarshalKey -> DEBU 01a map[peer.BCCSP:map[PKC...

# It continued with "bccsp_sw" and "msp" modules
... [bccsp_sw] openKeyStore -> DEBU 01b KeyStoreopened at [/etc/hyperledger/...
... [bccsp] initBCCSP -> DEBU 01c Initialize BCCSP [SW]
... [msp] getPemMaterialFromDir -> DEBU 01d Reading directory /etc/hyperledg...
... [msp] getPemMaterialFromDir -> DEBU 01e Inspecting file /etc/hyperledger...
...
... [msp] Setup -> DEBU 02f Setting up MSP instance Org1MSP

# Continued to create default identities from certificates
... [msp/identity] newIdentity -> DEBU 030 Creating identity instance for ce...
-----BEGIN CERTIFICATE-----
# ca.org1.example.com certificate... 
-----END CERTIFICATE-----
... [msp/identity] newIdentity -> DEBU 031 Creating identity instance for ce...
-----BEGIN CERTIFICATE-----
# Admin@org1.example.com certificate... 
-----END CERTIFICATE-----
... [msp/identity] newIdentity -> DEBU 032 Creating identity instance for ce...
-----BEGIN CERTIFICATE-----
# peer0.org1.example.com certificate
-----END CERTIFICATE-----
... [bccsp_sw] loadPrivateKey -> DEBU 033 Loading private key [dfb17cf51dc06...
... [msp/identity] newIdentity -> DEBU 034 Creating identity instance for ce...
-----BEGIN CERTIFICATE-----
# peer0.org1.example.com certificate
-----END CERTIFICATE-----
... [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2027-...
... [msp] Validate -> DEBU 036 MSP Org1MSP validating identity

# Continued with "flogging" 
... [flogging] setModuleLevel -> DEBU 037 Module'msp/identity' logger enable...
... [flogging] setModuleLevel -> DEBU 038 Module'msp' logger enabled for log...
...
... [flogging] setModuleLevel -> DEBU 043 Module'peer/gossip/sa' logger enab...

# Finally, started the peer
... [nodeCmd] serve -> INFO 044 Starting peer:
 Version: 1.2.1
 Commit SHA: 5017e4d
 Go version: go1.10
 OS/Arch: linux/amd64
 Experimental features: false
 Chaincode:
  Base Image Version: 0.4.10
  Base Docker Namespace: hyperledger
  Base Docker Label: org.hyperledger.fabric
  Docker Namespace: hyperledger

# Contined with "ledgermgmt", "kvledger" and "kvledger.util" modules
... [ledgermgmt] initialize -> INFO 045 Initializingledger mgmt
... [kvledger] NewProvider -> INFO 046 Initializing ledger provider
...
... [kvledger.util] CreateDirIfMissing -> DEBU 04d CreateDirIfMissing [/var/...
... [kvledger.util] logDirStatus -> DEBU 04e Before creating dir - [/var/hyp...
... [kvledger.util] logDirStatus -> DEBU 04f After creating dir - [/var/hype...

# Continued to try and wait for the Couch DB node 
... [statecouchdb] NewVersionedDBProvider -> DEBU 050 constructing CouchDB VersionedDBProvider
... [couchdb] CreateConnectionDefinition -> DEBU 051 Entering CreateConnectionDefinition()
... [couchdb] CreateConnectionDefinition -> DEBU 052 Created database configuration  URL=[http://couchdb:5984]
... [couchdb] CreateConnectionDefinition -> DEBU 053 Exiting CreateConnectionDefinition()
... [couchdb] VerifyCouchConfig -> DEBU 054 Entering VerifyCouchConfig()
... [couchdb] handleRequest -> DEBU 055 EnteringhandleRequest()  method=GET  url=http://couchdb:5984/
...
... [couchdb] handleRequest -> WARN 05f Retrying couchdb request in 2s. Attempt:5  Error:Get http://couchdb:5984/: dial tcp 192.168.224.4:5984: connect: connection refused
... [couchdb] handleRequest -> DEBU 060 HTTP Request: GET / HTTP/1.1 | Host: couchdb:5984 | User-Agent: Go-http-client/1.1 | Accept: multipart/related | Accept-Encoding: gzip |  |
... [couchdb] handleRequest -> DEBU 061 Exiting handleRequest()

... [couchdb] VerifyCouchConfig -> DEBU 062 VerifyConnection() dbResponseJSON: {"couchdb":"Welcome","version":"2.1.1","vendor":{"name":"The Apache Software Foundation"}}
... [couchdb] CreateDatabaseIfNotExist -> DEBU 063 Entering CreateDatabaseIfNotExist()
...
... [couchdb] CreateDatabaseIfNotExist -> DEBU 067 Database _users does not exist.
... [couchdb] CreateDatabaseIfNotExist -> DEBU 071 Database _replicator does not exist.
... [couchdb] CreateDatabaseIfNotExist -> DEBU 07b Database _global_changes does not exist.
... [couchdb] CreateDatabaseIfNotExist -> INFO 07f Created state database _global_changes
... [couchdb] CreateDatabaseIfNotExist -> DEBU 080 Exiting CreateDatabaseIfNotExist()
... [couchdb] VerifyCouchConfig -> DEBU 081 Exiting VerifyCouchConfig()

# Created some directories and finished some other ledger tasks
... [historyleveldb] NewHistoryDBProvider -> DEBU 082 constructing HistoryDB...
... [kvledger.util] CreateDirIfMissing -> DEBU 083 CreateDirIfMissing [/var/...
... [kvledger.util] CreateDirIfMissing -> DEBU 086 CreateDirIfMissing [/var/...
... [confighistory] newDBProvider -> DEBU 089 Opening db for config history:...
... [kvledger.util] CreateDirIfMissing -> DEBU 08a CreateDirIfMissing [/var/...
... [kvledger] NewProvider -> INFO 08d ledger provider Initialized
... [kvledger] recoverUnderConstructionLedger -> DEBU 08e Recovering under construction ledger
... [kvledger] recoverUnderConstructionLedger -> DEBU 08f No under construction ledger found. Quitting recovery
... [ledgermgmt] initialize -> INFO 090 ledger mgmt initialized

# Started to listen for inbound transactions
... [peer] func1 -> INFO 093 Auto-detected peer address: 192.168.1.5:7051
... [peer] func1 -> INFO 094 Returning peer0.org1.example.com:7051

# Worked the event hub to outbound events
... [eventhub_producer] addEventType -> DEBU 095 Registering BLOCK
... [eventhub_producer] addEventType -> DEBU 096 Registering FILTEREDBLOCK
... [eventhub_producer] start -> INFO 097 Event processor started

# Continued with preparation for chaincode 
... [nodeCmd] computeChaincodeEndpoint -> INFO 098 Entering computeChaincode...
... [nodeCmd] computeChaincodeEndpoint -> INFO 099 Exit with ccEndpoint: pee...
... [nodeCmd] createChaincodeServer -> WARN 09a peer.chaincodeListenAddress ...

# Started 3 Hyperledger Fabric system chaincodes 
... [inproccontroller] Register -> DEBU 09b Registering chaincode instance: cscc-1.2.1
... [sccapi] registerSysCC -> INFO 09c system chaincode cscc(github.com/hyperledger/fa...
... [inproccontroller] Register -> DEBU 09d Registering chaincode instance: lscc-1.2.1
... [sccapi] registerSysCC -> INFO 09e system chaincode lscc(github.com/hyperledger/fa...
... [inproccontroller] Register -> DEBU 09f Registering chaincode instance: qscc-1.2.1
... [sccapi] registerSysCC -> INFO 0a0 system chaincode qscc(github.com/hyperledger/fa...
... [nodeCmd] serve -> DEBU 0a1 Running peer

 

Hyperledger Composer Tutorials

Peer Node Log File Location

Hyperledger Composer Log Files

⇑⇑ Hyperledger Composer Tutorials

2020-12-02, 265👍, 0💬