Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Unable to resolve nip.io for local microfab environments #2878

Closed
jambonrose opened this issue Dec 17, 2020 · 14 comments
Closed

Unable to resolve nip.io for local microfab environments #2878

jambonrose opened this issue Dec 17, 2020 · 14 comments
Labels
enhancement New feature or request external

Comments

@jambonrose
Copy link

Description

I am unable to create a HLF v2 environment from scratch. This is a fresh VS Code install with a new install of the v2 extension.

Expected Behavior

I expect to be able to create a new environment based on the provided templates.

Actual Behavior

The network fails to start.

Steps to Reproduce

The only Docker image on my machine is ibmcom/ibp-microfab, as downloaded by the extension.

$ docker images -a
REPOSITORY            TAG       IMAGE ID       CREATED       SIZE
ibmcom/ibp-microfab   0.0.6     76916b09b7af   5 weeks ago   1.59GB

There are no running containers.

$ docker ps -a 
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
  • Navigate to Blockchain Extension panel
  • Navigate to "Fabric Environment" section
  • Click the plus-sign icon
  • Select "Create new from template"
  • Select the "1 Org template" option
  • Enter the name "Org1"
  • VS Code displays the following error in a modal at the bottom right of the only window.

    Failed to start Org1: Environment failed to become available. Please check the Docker container logs for more details.

Log File

The Blockchain output shows the following.

[12/16/2020 8:14:25 PM] [INFO] Starting IBM Blockchain Platform Extension
[12/16/2020 8:14:25 PM] [INFO] Clearing extension cache
[12/16/2020 8:14:25 PM] [INFO] Restoring command registry
[12/16/2020 8:14:26 PM] [INFO] Registering commands
[12/16/2020 8:14:26 PM] [INFO] Execute stored commands in the registry
[12/16/2020 8:14:26 PM] [INFO] IBM Blockchain Platform Extension activated
[12/16/2020 8:14:38 PM] [INFO] Add environment
[12/16/2020 8:14:43 PM] [YEOMAN] is_running.cmd
[12/16/2020 8:14:43 PM] [YEOMAN] is_running.sh
[12/16/2020 8:14:43 PM] [YEOMAN] kill_chaincode.cmd
[12/16/2020 8:14:43 PM] [YEOMAN] kill_chaincode.sh
[12/16/2020 8:14:43 PM] [YEOMAN] start.cmd
[12/16/2020 8:14:43 PM] [YEOMAN] start.sh
[12/16/2020 8:14:43 PM] [YEOMAN] stop.cmd
[12/16/2020 8:14:43 PM] [YEOMAN] stop.sh
[12/16/2020 8:14:43 PM] [YEOMAN] teardown.cmd
[12/16/2020 8:14:43 PM] [YEOMAN] teardown.sh
[12/16/2020 8:14:43 PM] [INFO] startFabricRuntime
[12/16/2020 8:14:43 PM] [INFO] CONTAINER=$(docker ps -f label=fabric-environment-name="Org1" -q -a)
[12/16/2020 8:14:43 PM] [INFO] docker ps -f label=fabric-environment-name="Org1" -q -a
[12/16/2020 8:14:43 PM] [INFO] if [ -z "$CONTAINER" ]
[12/16/2020 8:14:43 PM] [INFO] then
[12/16/2020 8:14:43 PM] [INFO]     export MICROFAB_CONFIG='{"port":8080, "endorsing_organizations": [{"name": "Org1"}],"channels": [{"name": "mychannel","endorsing_organizations": ["Org1"]}]}'
[12/16/2020 8:14:43 PM] [INFO]     docker run -e MICROFAB_CONFIG --label fabric-environment-name="Org1" -d -p 8080:8080 ibmcom/ibp-microfab:0.0.6
[12/16/2020 8:14:43 PM] [INFO] else
[12/16/2020 8:14:43 PM] [INFO]     docker start ${CONTAINER}
[12/16/2020 8:14:43 PM] [INFO] fi
[12/16/2020 8:14:43 PM] [INFO] 741b3391a71ed2bf200bb717dc1bf5b82336798f69472861fbc41febd87daa10
[12/16/2020 8:14:44 PM] [INFO] sleep 2
[12/16/2020 8:14:46 PM] [INFO] exit 0
[12/16/2020 8:15:07 PM] [ERROR] Failed to start Org1: Error: Environment failed to become available. Please check the Docker container logs for more details.
[12/16/2020 8:15:09 PM] [SUCCESS] Successfully added a new environment

Using the ID above, I am able to get logs from the container.

docker logs 741b3391a71e
[       microfabd] 2020/12/17 01:14:44 Starting Microfab ...
[       microfabd] 2020/12/17 01:14:44 Creating endorsing organization Org1 ...
[       microfabd] 2020/12/17 01:14:44 Creating ordering organization Orderer ...
[       microfabd] 2020/12/17 01:14:44 Created endorsing organization Org1
[       microfabd] 2020/12/17 01:14:44 Created ordering organization Orderer
[       microfabd] 2020/12/17 01:14:44 Waiting for CouchDB to start ...
[       microfabd] 2020/12/17 01:14:45 CouchDB has started
[       microfabd] 2020/12/17 01:14:45 Creating and starting CA for endorsing organization Org1 ...
[       microfabd] 2020/12/17 01:14:45 Creating and starting orderer for ordering organization Orderer ...
[       microfabd] 2020/12/17 01:14:45 Creating and starting peer for endorsing organization Org1 ...
[       microfabd] 2020/12/17 01:14:45 Creating and starting CouchDB proxy for endorsing organization Org1 ...
[        org1peer] 2020-12-17 01:14:45.575 UTC [nodeCmd] serve -> INFO 001 Starting peer:
[        org1peer]  Version: 2.2.1
[        org1peer]  Commit SHA: 344fda602
[        org1peer]  Go version: go1.14.4
[        org1peer]  OS/Arch: linux/amd64
[        org1peer]  Chaincode:
[        org1peer]   Base Docker Label: org.hyperledger.fabric
[        org1peer]   Docker Namespace: hyperledger
[          org1ca] 2020/12/17 01:14:45 [INFO] Created default configuration file at /opt/microfab/data/ca-org1/fabric-ca-server-config.yaml
[         orderer] 2020-12-17 01:14:45.577 UTC [localconfig] completeInitialization -> INFO 001 Kafka.Version unset, setting to 0.10.2.0
[         orderer] 2020-12-17 01:14:45.581 UTC [orderer.common.server] prettyPrintStruct -> INFO 002 Orderer config values:
[         orderer] 	General.ListenAddress = "0.0.0.0"
[         orderer] 	General.ListenPort = 2002
[         orderer] 	General.TLS.Enabled = false
[         orderer] 	General.TLS.PrivateKey = "/opt/fabric/config/tls/server.key"
[         orderer] 	General.TLS.Certificate = "/opt/fabric/config/tls/server.crt"
[         orderer] 	General.TLS.RootCAs = [/opt/fabric/config/tls/ca.crt]
[         orderer] 	General.TLS.ClientAuthRequired = false
[         orderer] 	General.TLS.ClientRootCAs = []
[         orderer] 	General.TLS.TLSHandshakeTimeShift = 0s
[         orderer] 	General.Cluster.ListenAddress = ""
[         orderer] 	General.Cluster.ListenPort = 0
[         orderer] 	General.Cluster.ServerCertificate = ""
[         orderer] 	General.Cluster.ServerPrivateKey = ""
[         orderer] 	General.Cluster.ClientCertificate = ""
[         orderer] 	General.Cluster.ClientPrivateKey = ""
[         orderer] 	General.Cluster.RootCAs = []
[         orderer] 	General.Cluster.DialTimeout = 5s
[         orderer] 	General.Cluster.RPCTimeout = 7s
[         orderer] 	General.Cluster.ReplicationBufferSize = 20971520
[         orderer] 	General.Cluster.ReplicationPullTimeout = 5s
[         orderer] 	General.Cluster.ReplicationRetryTimeout = 5s
[         orderer] 	General.Cluster.ReplicationBackgroundRefreshInterval = 5m0s
[         orderer] 	General.Cluster.ReplicationMaxRetries = 12
[         orderer] 	General.Cluster.SendBufferSize = 10
[         orderer] 	General.Cluster.CertExpirationWarningThreshold = 168h0m0s
[         orderer] 	General.Cluster.TLSHandshakeTimeShift = 0s
[         orderer] 	General.Keepalive.ServerMinInterval = 1m0s
[         orderer] 	General.Keepalive.ServerInterval = 2h0m0s
[         orderer] 	General.Keepalive.ServerTimeout = 20s
[         orderer] 	General.ConnectionTimeout = 0s
[         orderer] 	General.GenesisMethod = ""
[         orderer] 	General.GenesisFile = ""
[         orderer] 	General.BootstrapMethod = "file"
[         orderer] 	General.BootstrapFile = "/opt/microfab/data/orderer/config/genesisblock"
[         orderer] 	General.Profile.Enabled = false
[         orderer] 	General.Profile.Address = "0.0.0.0:6060"
[         orderer] 	General.LocalMSPDir = "/opt/microfab/data/orderer/msp"
[         orderer] 	General.LocalMSPID = "OrdererMSP"
[         orderer] 	General.BCCSP.ProviderName = "SW"
[         orderer] 	General.BCCSP.SwOpts.SecLevel = 256
[         orderer] 	General.BCCSP.SwOpts.HashFamily = "SHA2"
[         orderer] 	General.BCCSP.SwOpts.Ephemeral = true
[         orderer] 	General.BCCSP.SwOpts.FileKeystore.KeyStorePath = ""
[         orderer] 	General.BCCSP.SwOpts.DummyKeystore =
[         orderer] 	General.BCCSP.SwOpts.InmemKeystore =
[         orderer] 	General.Authentication.TimeWindow = 15m0s
[         orderer] 	General.Authentication.NoExpirationChecks = false
[         orderer] 	FileLedger.Location = "/opt/microfab/data/orderer/data"
[         orderer] 	FileLedger.Prefix = "hyperledger-fabric-ordererledger"
[         orderer] 	Kafka.Retry.ShortInterval = 5s
[         orderer] 	Kafka.Retry.ShortTotal = 10m0s
[         orderer] 	Kafka.Retry.LongInterval = 5m0s
[         orderer] 	Kafka.Retry.LongTotal = 12h0m0s
[         orderer] 	Kafka.Retry.NetworkTimeouts.DialTimeout = 10s
[         orderer] 	Kafka.Retry.NetworkTimeouts.ReadTimeout = 10s
[         orderer] 	Kafka.Retry.NetworkTimeouts.WriteTimeout = 10s
[         orderer] 	Kafka.Retry.Metadata.RetryMax = 3
[         orderer] 	Kafka.Retry.Metadata.RetryBackoff = 250ms
[         orderer] 	Kafka.Retry.Producer.RetryMax = 3
[         orderer] 	Kafka.Retry.Producer.RetryBackoff = 100ms
[         orderer] 	Kafka.Retry.Consumer.RetryBackoff = 2s
[         orderer] 	Kafka.Verbose = false
[         orderer] 	Kafka.Version = 0.10.2.0
[         orderer] 	Kafka.TLS.Enabled = false
[         orderer] 	Kafka.TLS.PrivateKey = ""
[         orderer] 	Kafka.TLS.Certificate = ""
[         orderer] 	Kafka.TLS.RootCAs = []
[         orderer] 	Kafka.TLS.ClientAuthRequired = false
[         orderer] 	Kafka.TLS.ClientRootCAs = []
[         orderer] 	Kafka.TLS.TLSHandshakeTimeShift = 0s
[         orderer] 	Kafka.SASLPlain.Enabled = false
[         orderer] 	Kafka.SASLPlain.User = ""
[         orderer] 	Kafka.SASLPlain.Password = ""
[         orderer] 	Kafka.Topic.ReplicationFactor = 3
[         orderer] 	Debug.BroadcastTraceDir = ""
[         orderer] 	Debug.DeliverTraceDir = ""
[         orderer] 	Consensus = map[SnapDir:/opt/microfab/data/orderer/data/etcdraft/snapshot WALDir:/opt/microfab/data/orderer/data/etcdraft/wal]
[         orderer] 	Operations.ListenAddress = "0.0.0.0:2003"
[         orderer] 	Operations.TLS.Enabled = false
[         orderer] 	Operations.TLS.PrivateKey = ""
[         orderer] 	Operations.TLS.Certificate = ""
[         orderer] 	Operations.TLS.RootCAs = []
[         orderer] 	Operations.TLS.ClientAuthRequired = false
[         orderer] 	Operations.TLS.ClientRootCAs = []
[         orderer] 	Operations.TLS.TLSHandshakeTimeShift = 0s
[         orderer] 	Metrics.Provider = "prometheus"
[         orderer] 	Metrics.Statsd.Network = "udp"
[         orderer] 	Metrics.Statsd.Address = "127.0.0.1:8125"
[         orderer] 	Metrics.Statsd.WriteInterval = 30s
[         orderer] 	Metrics.Statsd.Prefix = ""
[         orderer] 	ChannelParticipation.Enabled = false
[         orderer] 	ChannelParticipation.RemoveStorage = false
[        org1peer] 2020-12-17 01:14:45.576 UTC [peer] getLocalAddress -> INFO 002 Auto-detected peer address: 172.17.0.2:2004
[        org1peer] 2020-12-17 01:14:45.581 UTC [peer] getLocalAddress -> INFO 003 Host is 0.0.0.0 , falling back to auto-detected address: 172.17.0.2:2004
[        org1peer] 2020-12-17 01:14:45.590 UTC [nodeCmd] initGrpcSemaphores -> INFO 004 concurrency limit for endorser service is 2500
[        org1peer] 2020-12-17 01:14:45.590 UTC [nodeCmd] initGrpcSemaphores -> INFO 005 concurrency limit for deliver service is 2500
[          org1ca] 2020/12/17 01:14:45 [INFO] Starting server in home directory: /opt/microfab/data/ca-org1
[          org1ca] 2020/12/17 01:14:45 [INFO] Server Version: 1.4.9
[          org1ca] 2020/12/17 01:14:45 [INFO] Server Levels: &{Identity:2 Affiliation:1 Certificate:1 Credential:1 RAInfo:1 Nonce:1}
[          org1ca] 2020/12/17 01:14:45 [INFO] The CA key and certificate files already exist
[          org1ca] 2020/12/17 01:14:45 [INFO] Key file location: /opt/microfab/data/ca-org1/ca-key.pem
[          org1ca] 2020/12/17 01:14:45 [INFO] Certificate file location: /opt/microfab/data/ca-org1/ca-cert.pem
[        org1peer] 2020-12-17 01:14:45.610 UTC [certmonitor] trackCertExpiration -> INFO 006 The enrollment certificate will expire on 2030-12-15 01:09:45 +0000 UTC
[        org1peer] 2020-12-17 01:14:45.612 UTC [ledgermgmt] NewLedgerMgr -> INFO 007 Initializing LedgerMgr
[         orderer] 2020-12-17 01:14:45.614 UTC [blkstorage] NewProvider -> INFO 003 Creating new file ledger directory at /opt/microfab/data/orderer/data/chains
[         orderer] 2020-12-17 01:14:45.618 UTC [orderer.common.server] Main -> INFO 004 Bootstrapping the system channel
[         orderer] 2020-12-17 01:14:45.619 UTC [blkstorage] newBlockfileMgr -> INFO 005 Getting block information from block storage
[         orderer] 2020-12-17 01:14:45.625 UTC [orderer.common.server] selectClusterBootBlock -> INFO 006 Cluster boot block is bootstrap (genesis) block; Blocks Header.Number system-channel=0, bootstrap=0
[         orderer] 2020-12-17 01:14:45.626 UTC [orderer.common.server] Main -> INFO 007 Starting with system channel: testchainid, consensus type: solo
[         orderer] 2020-12-17 01:14:45.627 UTC [certmonitor] trackCertExpiration -> INFO 008 The enrollment certificate will expire on 2030-12-15 01:09:45 +0000 UTC
[        org1peer] 2020-12-17 01:14:45.630 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 008 DB is empty Setting db format as 2.0
[         orderer] 2020-12-17 01:14:45.631 UTC [orderer.consensus.solo] HandleChain -> WARN 009 Use of the Solo orderer is deprecated and remains only for use in test environments but may be removed in the future.
[         orderer] 2020-12-17 01:14:45.631 UTC [orderer.commmon.multichannel] Initialize -> INFO 00a Starting system channel 'testchainid' with genesis block hash 0c45830716781cdf7be4bce536910450083a4e02690e4a1da5020ac8b2833cf2 and orderer type solo
[         orderer] 2020-12-17 01:14:45.631 UTC [orderer.common.server] Main -> INFO 00b Starting orderer:
[         orderer]  Version: 2.2.1
[         orderer]  Commit SHA: 344fda602
[         orderer]  Go version: go1.14.4
[         orderer]  OS/Arch: linux/amd64
[        org1peer] 2020-12-17 01:14:45.632 UTC [blkstorage] NewProvider -> INFO 009 Creating new file ledger directory at /opt/microfab/data/peer-org1/data/ledgersData/chains/chains
[         orderer] 2020-12-17 01:14:45.634 UTC [orderer.common.server] Main -> INFO 00c Beginning to serve requests
[        org1peer] 2020-12-17 01:14:45.640 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 00a DB is empty Setting db format as 2.0
[          org1ca] 2020/12/17 01:14:45 [INFO] Initialized sqlite3 database at /opt/microfab/data/ca-org1/fabric-ca-server.db
[          org1ca] 2020/12/17 01:14:45 [INFO] The issuer key was successfully stored. The public key is at: /opt/microfab/data/ca-org1/IssuerPublicKey, secret key is at: /opt/microfab/data/ca-org1/msp/keystore/IssuerSecretKey
[       microfabd] 2020/12/17 01:14:45 Created and started orderer for ordering organization Orderer
[          org1ca] 2020/12/17 01:14:45 [INFO] Idemix issuer revocation public and secret keys were generated for CA ''
[          org1ca] 2020/12/17 01:14:45 [INFO] The revocation key was successfully stored. The public key is at: /opt/microfab/data/ca-org1/IssuerRevocationPublicKey, private key is at: /opt/microfab/data/ca-org1/msp/keystore/IssuerRevocationPrivateKey
[        org1peer] 2020-12-17 01:14:45.767 UTC [couchdb] createDatabaseIfNotExist -> INFO 00b Created state database fabric__internal
[          org1ca] 2020/12/17 01:14:45 [INFO] Home directory for default CA: /opt/microfab/data/ca-org1
[          org1ca] 2020/12/17 01:14:45 [INFO] Operation Server Listening on [::]:2001
[          org1ca] 2020/12/17 01:14:45 [INFO] Listening on http://0.0.0.0:2000
[        org1peer] 2020-12-17 01:14:45.807 UTC [ledgermgmt] NewLedgerMgr -> INFO 00c Initialized LedgerMgr
[        org1peer] 2020-12-17 01:14:45.814 UTC [gossip.service] New -> INFO 00d Initialize gossip with endpoint org1peer-api.127-0-0-1.nip.io:8080
[        org1peer] 2020-12-17 01:14:45.822 UTC [gossip.gossip] New -> INFO 00e Creating gossip service with self membership of Endpoint: org1peer-api.127-0-0-1.nip.io:8080, InternalEndpoint: org1peer-api.127-0-0-1.nip.io:8080, PKI-ID: ebfd51bea8ab9aa62653357a361a51719ff281448d76c42f07aae405bdc4ed5d, Metadata: 
[        org1peer] 2020-12-17 01:14:45.823 UTC [gossip.gossip] start -> INFO 00f Gossip instance org1peer-api.127-0-0-1.nip.io:8080 started
[        org1peer] 2020-12-17 01:14:45.823 UTC [lifecycle] InitializeLocalChaincodes -> INFO 010 Initialized lifecycle cache with 0 already installed chaincodes
[        org1peer] 2020-12-17 01:14:45.824 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 011 Entering computeChaincodeEndpoint with peerHostname: 172.17.0.2
[        org1peer] 2020-12-17 01:14:45.824 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 012 Exit with ccEndpoint: 172.17.0.2:2005
[        org1peer] 2020-12-17 01:14:45.828 UTC [sccapi] DeploySysCC -> INFO 013 deploying system chaincode 'lscc'
[        org1peer] 2020-12-17 01:14:45.828 UTC [sccapi] DeploySysCC -> INFO 014 deploying system chaincode 'cscc'
[        org1peer] 2020-12-17 01:14:45.828 UTC [sccapi] DeploySysCC -> INFO 015 deploying system chaincode 'qscc'
[        org1peer] 2020-12-17 01:14:45.828 UTC [sccapi] DeploySysCC -> INFO 016 deploying system chaincode '_lifecycle'
[        org1peer] 2020-12-17 01:14:45.829 UTC [nodeCmd] serve -> INFO 017 Deployed system chaincodes
[        org1peer] 2020-12-17 01:14:45.829 UTC [discovery] NewService -> INFO 018 Created with config TLS: false, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000
[        org1peer] 2020-12-17 01:14:45.829 UTC [nodeCmd] registerDiscoveryService -> INFO 019 Discovery service activated
[        org1peer] 2020-12-17 01:14:45.829 UTC [nodeCmd] serve -> INFO 01a Starting peer with ID=[org1peer], network ID=[dev], address=[172.17.0.2:2004]
[        org1peer] 2020-12-17 01:14:45.829 UTC [nodeCmd] serve -> INFO 01b Started peer with ID=[org1peer], network ID=[dev], address=[172.17.0.2:2004]
[        org1peer] 2020-12-17 01:14:45.830 UTC [kvledger] LoadPreResetHeight -> INFO 01c Loading prereset height from path [/opt/microfab/data/peer-org1/data/ledgersData/chains]
[        org1peer] 2020-12-17 01:14:45.830 UTC [blkstorage] preResetHtFiles -> INFO 01d No active channels passed
[        org1peer] 2020-12-17 01:14:46.016 UTC [endorser] callChaincode -> INFO 01e finished chaincode: cscc duration: 0ms channel= txID=2fb2650b
[        org1peer] 2020-12-17 01:14:46.018 UTC [comm.grpc.server] 1 -> INFO 01f unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.request_deadline=2020-12-17T01:15:16.014Z grpc.peer_address=127.0.0.1:33084 grpc.code=OK grpc.call_duration=2.6965ms
[       microfabd] 2020/12/17 01:14:46 Created and started peer for endorsing organization Org1
[          org1ca] 2020/12/17 01:14:46 [INFO] signed certificate with serial number 236068847302636401685262521565137235074983152620
[          org1ca] 2020/12/17 01:14:46 [INFO] 127.0.0.1:55902 POST /enroll 201 0 "OK"
[       microfabd] 2020/12/17 01:14:46 Created and started CA for endorsing organization Org1
[       microfabd] 2020/12/17 01:14:46 Creating and joining channel mychannel ...
[       microfabd] 2020/12/17 01:14:46 Creating channel mychannel ...
[         orderer] 2020-12-17 01:14:46.089 UTC [comm.grpc.server] 1 -> INFO 00d streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.request_deadline=2020-12-17T01:15:16.077Z grpc.peer_address=127.0.0.1:44220 grpc.code=OK grpc.call_duration=12.8063ms
[         orderer] 2020-12-17 01:14:46.092 UTC [blkstorage] newBlockfileMgr -> INFO 00e Getting block information from block storage
[         orderer] 2020-12-17 01:14:46.096 UTC [orderer.consensus.solo] HandleChain -> WARN 00f Use of the Solo orderer is deprecated and remains only for use in test environments but may be removed in the future.
[         orderer] 2020-12-17 01:14:46.097 UTC [orderer.commmon.multichannel] newChain -> INFO 010 Created and starting new channel mychannel
[         orderer] 2020-12-17 01:14:46.098 UTC [comm.grpc.server] 1 -> INFO 011 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.request_deadline=2020-12-17T01:15:16.092Z grpc.peer_address=127.0.0.1:44220 grpc.code=OK grpc.call_duration=5.371ms
[         orderer] 2020-12-17 01:14:46.099 UTC [comm.grpc.server] 1 -> INFO 012 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.request_deadline=2020-12-17T01:15:16.098Z grpc.peer_address=127.0.0.1:44220 grpc.code=OK grpc.call_duration=588.2µs
[         orderer] 2020-12-17 01:14:46.100 UTC [comm.grpc.server] 1 -> INFO 013 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.request_deadline=2020-12-17T01:15:16.1Z grpc.peer_address=127.0.0.1:44220 grpc.code=OK grpc.call_duration=514µs
[         orderer] 2020-12-17 01:14:46.107 UTC [comm.grpc.server] 1 -> INFO 014 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.request_deadline=2020-12-17T01:15:16.101Z grpc.peer_address=127.0.0.1:44220 grpc.code=OK grpc.call_duration=5.4219ms
[       microfabd] 2020/12/17 01:14:46 Created channel mychannel
[       microfabd] 2020/12/17 01:14:46 Joining channel mychannel on peer for endorsing organization Org1 ...
[        org1peer] 2020-12-17 01:14:46.112 UTC [ledgermgmt] CreateLedger -> INFO 020 Creating ledger [mychannel] with genesis block
[        org1peer] 2020-12-17 01:14:46.113 UTC [blkstorage] newBlockfileMgr -> INFO 021 Getting block information from block storage
[        org1peer] 2020-12-17 01:14:46.131 UTC [couchdb] createDatabaseIfNotExist -> INFO 022 Created state database mychannel_
[        org1peer] 2020-12-17 01:14:46.161 UTC [couchdb] createDatabaseIfNotExist -> INFO 023 Created state database mychannel__lifecycle
[        org1peer] 2020-12-17 01:14:46.227 UTC [kvledger] CommitLegacy -> INFO 024 [mychannel] Committed block [0] with 1 transaction(s) in 58ms (state_validation=0ms block_and_pvtdata_commit=2ms state_commit=55ms) commitHash=[]
[        org1peer] 2020-12-17 01:14:46.228 UTC [ledgermgmt] CreateLedger -> INFO 025 Created ledger [mychannel] with genesis block
[        org1peer] 2020-12-17 01:14:46.244 UTC [gossip.gossip] JoinChan -> INFO 026 Joining gossip network of channel mychannel with 1 organizations
[        org1peer] 2020-12-17 01:14:46.244 UTC [gossip.gossip] learnAnchorPeers -> INFO 027 No configured anchor peers of Org1MSP for channel mychannel to learn about
[        org1peer] 2020-12-17 01:14:46.248 UTC [gossip.state] NewGossipStateProvider -> INFO 028 Updating metadata information for channel mychannel, current ledger sequence is at = 0, next expected block is = 1
[        org1peer] 2020-12-17 01:14:46.248 UTC [deliveryClient] StartDeliverForChannel -> INFO 029 This peer will retrieve blocks from ordering service and disseminate to other peers in the organization for channel mychannel
[        org1peer] 2020-12-17 01:14:46.248 UTC [endorser] callChaincode -> INFO 02a finished chaincode: cscc duration: 139ms channel= txID=a292371e
[        org1peer] 2020-12-17 01:14:46.248 UTC [comm.grpc.server] 1 -> INFO 02b unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.request_deadline=2020-12-17T01:15:16.108Z grpc.peer_address=127.0.0.1:33088 grpc.code=OK grpc.call_duration=140.345ms
[       microfabd] 2020/12/17 01:14:46 Joined channel mychannel on peer for endorsing organization Org1
[       microfabd] 2020/12/17 01:14:46 Created and joined channel mychannel
[       microfabd] 2020/12/17 01:14:46 Microfab started in 1912ms
[        org1peer] 2020-12-17 01:14:46.279 UTC [peer.blocksprovider] DeliverBlocks -> WARN 02c Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:46.405 UTC [peer.blocksprovider] DeliverBlocks -> WARN 02d Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:46.531 UTC [peer.blocksprovider] DeliverBlocks -> WARN 02e Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:46.683 UTC [peer.blocksprovider] DeliverBlocks -> WARN 02f Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:46.859 UTC [peer.blocksprovider] DeliverBlocks -> WARN 030 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:47.074 UTC [peer.blocksprovider] DeliverBlocks -> WARN 031 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:47.333 UTC [peer.blocksprovider] DeliverBlocks -> WARN 032 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:47.637 UTC [peer.blocksprovider] DeliverBlocks -> WARN 033 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:48.001 UTC [peer.blocksprovider] DeliverBlocks -> WARN 034 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:48.434 UTC [peer.blocksprovider] DeliverBlocks -> WARN 035 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:48.956 UTC [peer.blocksprovider] DeliverBlocks -> WARN 036 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:49.580 UTC [peer.blocksprovider] DeliverBlocks -> WARN 037 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:50.328 UTC [peer.blocksprovider] DeliverBlocks -> WARN 038 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:51.223 UTC [peer.blocksprovider] DeliverBlocks -> WARN 039 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:52.297 UTC [peer.blocksprovider] DeliverBlocks -> WARN 03a Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:53.585 UTC [peer.blocksprovider] DeliverBlocks -> WARN 03b Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:55.131 UTC [peer.blocksprovider] DeliverBlocks -> WARN 03c Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:56.984 UTC [peer.blocksprovider] DeliverBlocks -> WARN 03d Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:14:59.172 UTC [peer.blocksprovider] DeliverBlocks -> WARN 03e Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:15:01.840 UTC [peer.blocksprovider] DeliverBlocks -> WARN 03f Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:15:05.042 UTC [peer.blocksprovider] DeliverBlocks -> WARN 040 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:15:08.880 UTC [peer.blocksprovider] DeliverBlocks -> WARN 041 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:15:13.483 UTC [peer.blocksprovider] DeliverBlocks -> WARN 042 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:15:19.011 UTC [peer.blocksprovider] DeliverBlocks -> WARN 043 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:15:25.640 UTC [peer.blocksprovider] DeliverBlocks -> WARN 044 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:15:33.560 UTC [peer.blocksprovider] DeliverBlocks -> WARN 045 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:15:43.107 UTC [peer.blocksprovider] DeliverBlocks -> WARN 046 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:15:54.560 UTC [peer.blocksprovider] DeliverBlocks -> WARN 047 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:16:08.438 UTC [peer.blocksprovider] DeliverBlocks -> WARN 048 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel
[        org1peer] 2020-12-17 01:16:24.925 UTC [peer.blocksprovider] DeliverBlocks -> WARN 049 Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel

Your Environment

  • IBM Extension v2.0.0-beta.10
  • VS Code 1.52.0
  • Node.js listed by VS Code: 12.14.1
  • Terminal Node.js: v12.19.0
  • Terminal NPM: 6.14.8
  • macOS 10.15.7 (19H2)
@jambonrose
Copy link
Author

For clarity: I've uninstalled v2.0.0-beta.10 and installed v2.0.0-beta.9 and I am able to start a HLFv2 network. This is perhaps not surprising given that the microfab was introduce in v2.0.0-beta.10.

@Jakeeyturner
Copy link
Contributor

Hi @jambonrose,

Would you be able run the following and post the results here:

nslookup 127-0-0-1.nip.io
nslookup orderer.127-0-0-1.nip.io
nslookup 127-0-0-1.xip.io
docker network ls

Thanks.

Note: @sstone1

@Salikutluk
Copy link

Salikutluk commented Jan 24, 2021

Hi @Jakeeyturner,

I've exactly the same issue. I installed the extension for VSCode from scratch for the first time. While trying to start the local "1 Org local template" one container starts 'ibmcom/ibp-microfab:0.0.7' in the logs of the container I can see the following entry 'Could not connect to ordering service: could not dial endpoint 'orderer-api.127-0-0-1.nip.io:8080': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer-api.127-0-0-1.nip.io on 192.168.65.1:53: no such host" channel=mychannel'.

nslookup 127-0-0-1.nip.io:

Server: 192.168.178.1
Address: 192.168.178.1#53

Non-authoritative answer:
*** Can't find 127-0-0-1.nip.io: No answer

nslookup orderer.127-0-0-1.nip.io:

Server: 192.168.178.1
Address: 192.168.178.1#53

Non-authoritative answer:
*** Can't find orderer.127-0-0-1.nip.io: No answer

nslookup 127-0-0-1.xip.io:

Server: 192.168.178.1
Address: 192.168.178.1#53

** server can't find 127-0-0-1.xip.io: NXDOMAIN

docker network ls:

NETWORK ID NAME DRIVER SCOPE
1dc8fa8dc4e5 bridge bridge local
3a7210ce9607 host host local
74dd714fa727 none null local

The environment:
mac os: Big Sur 11.1
VS Code Version: 1.52.1
Node: v14.15.4
npm: 6.14.10
Docker: 20.10.2

@Salikutluk
Copy link

@jambonrose @Jakeeyturner I figured out, that it must be a network issue. When I am connected to the internet through a mobile hotspot device everything works fine. So it can be a configuration on my router.

@Jakeeyturner Jakeeyturner changed the title v2.0.0-beta.10 cannot create a new HLFv2 environment Unable to resolve nip.io for local microfab environments Jan 27, 2021
@Jakeeyturner Jakeeyturner added the enhancement New feature or request label Jan 27, 2021
@bernarddk
Copy link

Had the same issue, can confirm swapping to mobile hotspot worked

@sstone1
Copy link
Contributor

sstone1 commented Mar 24, 2021

The likely cause of this is something called DNS rebind protection that stops DNS servers such as those behind nip.io returning private IP addresses.

See https://en.wikipedia.org/wiki/DNS_rebinding for more information.

It looks like you configure dnsmasq to add nip.io to an allow list: https://forum.openwrt.org/t/nip-io-doesnt-work-for-local-network-behind-lede-solved-dns-rebind-protection/7766

@munapower
Copy link

I am running into the same issue. This is my environment:
Docker version 20.10.5, build 55c4c88
IBP extension 2.0.2
go version go1.15.7 darwin/amd64
openjdk version "15" 2020-09-15
node v10.17.0
npm 6.11.3
Visual Studio Code v1.55.2
macOS Catalina 10.15.7

Can't find where to consigure dnsmasq as proposed.

@davidkel
Copy link

davidkel commented May 1, 2021

@munapower It will depend totally on the network you are connected to and how dns services are being provided. For example if your router is running openwrt then it uses dnsmasq to provide dns proxy and dhcp services, so you would have to configure your router appropriately. Another example is Google Nest Wifi which has an option in it's UI to disable rebinding protection as it uses a DNS Proxy. You will need to investigate how your specific network setup manages DNS and find a way to disable DNS rebind protection, if that is the issue in your case.

@munapower
Copy link

thanks @davidkel. so I looked in my cable/modem box for any sort of setting and couldn't find any ... BUT what I did find was this recipe that I followed and it worked!!!!
https://www.stevenrombauts.be/2018/01/use-dnsmasq-instead-of-etc-hosts/
So for nip.io I point to 127.0.0.1 and wala!!!! My IBP environment starts successfully. =D
The file that he says to create in the resolver directory, I just called it io ... since in nip.io the last domain is io. I also went with the 2nd option he mentions "Send only DNS queries for *.test and *.box domains."

@o7g8
Copy link

o7g8 commented Jul 24, 2021

I had issues with the deployment of a smart contract also getting the error contacting the ordered node. I've disabled my Wi-Fi. switched off the Fabric environment, switched on the Wi-Fi, and started the fabric environment again. After that, the deployment worked.

@danbamitale
Copy link

I had issues with the deployment of a smart contract also getting the error contacting the ordered node. I've disabled my Wi-Fi. switched off the Fabric environment, switched on the Wi-Fi, and started the fabric environment again. After that, the deployment worked.

This definitely fixed it for me - twice

@o7g8
Copy link

o7g8 commented Jul 30, 2021

I use an Ubuntu-derived distro with systemd-resolved resolver and the snippet below added to /etc/systemd/resolved.conf has permanently solved the issue:

[Resolve]
DNS=8.8.8.8
Domains=~nip.io.

Needed to restart the service afterwards sudo service systemd-resolved restart
So all queries to nip.io are resolved by Google DNS, which apparently doesn't have the DNS rebind protection.

@danbamitale
Copy link

I use an Ubuntu-derived distro with systemd-resolved resolver and the snippet below added to /etc/systemd/resolved.conf has permanently solved the issue:

[Resolve]
DNS=8.8.8.8
Domains=~nip.io.

Needed to restart the service afterwards sudo service systemd-resolved restart
So all queries to nip.io are resolved by Google DNS, which apparently doesn't have the DNS rebind protection.

This is definitely the best solution. Following this solution, by adding the DNS and domain in Network Settings according to this guide https://support.apple.com/en-gb/guide/mac-help/mh14127/mac , fixed it on Mac.

@jt-nti
Copy link
Contributor

jt-nti commented Dec 13, 2022

This issue is related to microfab. While the vscode extension is no longer active - see #3183 - there is a Hyperledger lab proposal for microfab.

@jt-nti jt-nti closed this as completed Dec 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request external
Projects
None yet
Development

No branches or pull requests