Re: could not build chaincode: docker build failed: docker image inspection failed:


k.clements@soasecure.com <k.clements@...>
 

Got it working again! I turned off Kubernetes (though I think it will work again with Kubernetes and will turn it on shortly - know there are plenty of working versions with that obviously). I also unchecked the box in Docker Desktop for Mac OS for 'Use gRPC FUSE for file sharing - Switch off to use the legacy osxfs file sharing instead.’  I think this preference for gRPC FUSE was the issue, but will determine if it’s both changes that did the trick or just one or other.

mac-os:test-network kpc$ peer chaincode query -C mychannel -n basic -c '{"Args":["getAllAssets"]}'
[{"ID":"asset1","color":"blue","size":5,"owner":"Tomoko","appraisedValue":300},{"ID":"asset2","color":"red","size":5,"owner":"Brad","appraisedValue":400},{"ID":"asset3","color":"green","size":10,"owner":"Jin Soo","appraisedValue":500},{"ID":"asset4","color":"yellow","size":10,"owner":"Max","appraisedValue":600},{"ID":"asset5","color":"black","size":15,"owner":"Adriana","appraisedValue":700},{"ID":"asset6","color":"white","size":15,"owner":"Michel","appraisedValue":800}]
mac-os:test-network kpc$ 

On Oct 1, 2020, at 7:26 AM, k.clements@... wrote:

Just did clean install of the Docker Edge release, new pull of the fabric-samples from github, same error on ‘deployCC’:

Chaincode is packaged on peer0.org1
Installing chaincode on peer0.org1...
Using organization 1
+ peer lifecycle chaincode install basic.tar.gz
+ res=1
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image inspection failed: Get "http://unix.sock/images/dev-peer0.org1.example.com-basic_1.0-4ec191e793b27e953ff2ede5a8bcc63152cecb1e4c3f301a26e22692c61967ad-42f57faac8360472e47cbbbf3940e81bba83439702d085878d148089a1b213ca/json": dial unix /host/var/run/docker.sock: connect: no such file or directory
Chaincode installation on peer0.org1 has failed
Deploying chaincode failed
mac-os:test-network kpc$ 

Going to post to docker and see what they say - thanks for everyone’s help. Weird it was deployed and working yesterday morning prior to any updates. Maybe I need to change a mounted volume in docker, will check.

On Oct 1, 2020, at 6:31 AM, k.clements@... wrote:

Np, thanks Gari.  Looking back at the release notes of this new version ‘Docker Desktop for Mac OS’ ver 2.4.0.0 , I noticed that it is stated this, but that was way back in 2016:

### 2016-02-16 1.10.1-11
* API proxy
  - Rewrite `docker inspect` to rewrite volumes and ports
  - Handle start requests and adjust mounts for `docker-compose` (#918, #924)
  - Add disabled, experimental flag to expose `/var/run/docker.sock` (#953)

I just tried running the command again of ‘/.network.sh deployCC’ again with same error after turning off the preference of 'Use gRPC FUSE for file sharingas it was mentioned in the release notes to possible work around, but again, some years back. 
* Known Issues
  -  There is a known issue when using `docker-compose` with named volumes and gRPC FUSE: second and subsequent calls to `docker-compose up` will fail due to the volume path having the prefix `/host_mnt`. A work around is to switch back to `osxfs` in Settings. See [docker/for-mac#4859](https://github.com/docker/for-mac/issues/4859).

Not sure if I should install the Edge Release version, or just attempt to change the /var/run setting somewhere. Starting with the experimental version, which is version 2.3.7.0 done in Sept, 2020. Apparently the new stable version of 2.4.0.0 just out days ago, so will see. Thank it’s time to go to docker support instead b/c seems to be a docker issue. I didn’t have any issues yesterday until I upgraded to the 2.4.0 version, I think that is correct at least, working yesterday, then not working after the 2.4.0.0.



On Oct 1, 2020, at 5:27 AM, Gari Singh <garis@...> wrote:

The Docker daemon listens on /var/run/docker.sock not /host/var/run/docker.sock

In the Docker Compose YAML, you'll need to change the value of CORE_VM_ENDPOINT for each peer.
For example:   https://github.com/hyperledger/fabric-samples/blob/master/test-network/docker/docker-compose-test-net.yaml#L56

-----------------------------------------
Gari Singh
Distinguished Engineer, CTO - IBM Blockchain
IBM Middleware
550 King St
Littleton, MA 01460
Cell: 978-846-7499
garis@...
-----------------------------------------

-----fabric@... wrote: -----
To: Brett T Logan <Brett.T.Logan@...>
From: "k.clements@..." 
Sent by: fabric@...
Date: 09/30/2020 10:53PM
Cc: alaskadd@..., fabric@...
Subject: [EXTERNAL] Re: [Hyperledger Fabric] could not build chaincode: docker build failed: docker image inspection failed:

                              After checking, here is the relevant /var/run info: srw-rw-rw- 1 root daemon 0 Sep...                                                                                                                                                                                                                                                                                                                                                                                                                                                          This Message Is From an External Sender                                                                                                                                      This message came from outside your organization.                                                                                                                                                                                                                              After checking, here is the relevant /var/run info:

srw-rw-rw-   1 root             daemon              0 Sep 30 20:32 com.docker.vmnetd.sock
srw-rw-rw-   1 root             daemon              0 Sep 30 20:32 com.olympus.AuthHelper2.helper.socket
srwxrwxrwx   1 root             daemon              0 Sep 30 20:32 cupsd
-rw-r--r--   1 root             daemon              3 Sep 30 20:32 diskarbitrationd.pid
drwxr-xr-x   3 _displaypolicyd  _displaypolicyd    96 Sep 30 20:32 displaypolicyd
lrwxr-xr-x   1 root             daemon             68 Sep 30 20:33 docker-cli.sock -> /Users/kpc/Library/Containers/com.docker.docker/Data/docker-cli.sock
lrwxr-xr-x   1 root             daemon             64 Sep 30 20:33 docker.sock -> /Users/kpc/Library/Containers/com.docker.docker/Data/docker.sock

I still have the default Docker setup, and removed Docker a couple of hours ago, and re-installed it from the docker site. No ‘experimental’ mode yet. Here is what I found in the Docker Dashboard under peer0 for Org1.
/HOST/VAR/RUN          /host_mnt/private/var/run

and:
CORE_VM_ENDPOINT         unix:///host/var/run/docker.sock

On Sep 30, 2020, at 9:30 PM, Brett T Logan <Brett.T.Logan@...> wrote:
For some reason your Docker socket is missing inside your chaincode container. Can you check on your Mac and make sure `/var/run/docker.sock` exists. If it does, can you exec into your peer and do an `ls /host/var/run/` and see if the docker.sock exists there. If it does not, can you see if other files in the `/var/run` directory on your Mac exist inside the peer, as we mount the entire directory across to gain access to the docker socket. 

I also see you have have the kube integration enabled for Docker, have you enabled any experimental features or overridden the config in the docker settings (possibly changing the default socket location)? 

Brett Logan 
Software Engineer, IBM Blockchain 
Phone: 1-984-242-6890 
E-mail: brett.t.logan@... 

<Image.16015185878250.png> 

 ----- Original message -----
From: "k.clements@..." <k.clements@...>
Sent by: fabric@...
To: Chris Gabriel <alaskadd@...>
Cc: fabric@...
Subject: [EXTERNAL] Re: [Hyperledger Fabric] could not build chaincode: docker build failed: docker image inspection failed:
Date: Wed, Sep 30, 2020 10:17 PM

          I blasted prior chaincode. Made sure no doubles of the ‘fabric-samples’ dir. I pulled with the curl link from tutorial again a couple hours earlier:    curl -sSL https://bit.ly/2ysbOFE | bash -s 
Currently still with the same error posted earlier. The docker ‘inspection’ failing is troublesome cause not sure what to do with that, just went and got images again. 


On Sep 30, 2020, at 9:10 PM, Chris Gabriel <alaskadd@...> wrote:   

Also, have you altered the sample chaincode or is it still in its original form?


 On Sep 30, 2020, at 9:07 PM, Chris Gabriel via lists.hyperledger.org <alaskadd=gmail.com@...> wrote:

Have you run ‘git pull’ from the fabric-samples directory to pull the latest?


 On Sep 30, 2020, at 8:56 PM, "k.clements@..." <k.clements@...> wrote:

 
Here are those commands. I did uninstall both Go versions, and just reinstalled Go to 'go version go1.15.2 darwin/amd64’  … Still same error unfortunately. All new hyperledger images, deleted the prior ones, getting those docker images from same tutorial site link. 

mac-os:test-network kpc$ ./network.sh up 
Starting nodes with CLI timeout of '5' tries and CLI delay of '3' seconds and using database 'leveldb'
LOCAL_VERSION=2.2.0 
DOCKER_IMAGE_VERSION=2.2.0 
orderer.example.com is up-to-date 
peer0.org2.example.com is up-to-date 
peer0.org1.example.com is up-to-date 
CONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS              PORTS                              NAMES 
7bde66374bcb        hyperledger/fabric-peer:latest      "peer node start"        10 minutes ago      Up 10 minutes       7051/tcp, 0.0.0.0:9051->9051/tcp   peer0.org2.example.com 
4db710a489e9        hyperledger/fabric-peer:latest      "peer node start"        10 minutes ago      Up 10 minutes       0.0.0.0:7051->7051/tcp             peer0.org1.example.com 
2252ad1696ea        hyperledger/fabric-orderer:latest   "orderer"                10 minutes ago      Up 10 minutes       0.0.0.0:7050->7050/tcp             orderer.example.com 
96b972b616ee        67da37a9a360                        "/coredns -conf /etc…"   16 minutes ago      Up 16 minutes                                          k8s_coredns_coredns-66bff467f8-rg2w8_kube-system_a818a7cf-90e6-48d7-9f37-c56ef8d1b2f6_8 
c8208cfb8c31        79da37e5a3aa                        "/kube-vpnkit-forwar…"   16 minutes ago      Up 16 minutes                                          k8s_vpnkit-controller_vpnkit-controller_kube-system_5ef5d134-5b8b-4986-9e59-0d5028a7efd3_8 
676b058e70ab        e704287ce753                        "/storage-provisione…"   16 minutes ago      Up 16 minutes                                          k8s_storage-provisioner_storage-provisioner_kube-system_16bfac77-6774-4cc2-96c4-4afb95395d91_14 
5d350545ece6        67da37a9a360                        "/coredns -conf /etc…"   16 minutes ago      Up 16 minutes                                          k8s_coredns_coredns-66bff467f8-766zz_kube-system_1ee85ce6-6260-4636-9b72-4e8ee7823050_8 
2cb895054d3f        0fb7201f92d0                        "/usr/local/bin/kube…"   16 minutes ago      Up 16 minutes                                          k8s_kube-proxy_kube-proxy-5f58b_kube-system_52ac85ee-cbf2-4a01-ba80-86e768890fad_8 
7297123b0646        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_storage-provisioner_kube-system_16bfac77-6774-4cc2-96c4-4afb95395d91_8 
225ac931d966        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_vpnkit-controller_kube-system_5ef5d134-5b8b-4986-9e59-0d5028a7efd3_8 
60af6a360e86        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_coredns-66bff467f8-rg2w8_kube-system_a818a7cf-90e6-48d7-9f37-c56ef8d1b2f6_8 
8fa87564864d        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_coredns-66bff467f8-766zz_kube-system_1ee85ce6-6260-4636-9b72-4e8ee7823050_8 
19c4cc375076        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_kube-proxy-5f58b_kube-system_52ac85ee-cbf2-4a01-ba80-86e768890fad_8 
cd1ab1a1bb53        6f7135fb47e0                        "kube-scheduler --au…"   16 minutes ago      Up 16 minutes                                          k8s_kube-scheduler_kube-scheduler-docker-desktop_kube-system_c808ba8a724ff4e00643b5c4f7fc454b_8 
a4be286a978c        6a979351fe5e                        "kube-controller-man…"   16 minutes ago      Up 16 minutes                                          k8s_kube-controller-manager_kube-controller-manager-docker-desktop_kube-system_4f20c2277b1a9bc95a8d0aefdd70ac22_8 
c0fd6452bb79        92d040a0dca7                        "kube-apiserver --ad…"   16 minutes ago      Up 16 minutes                                          k8s_kube-apiserver_kube-apiserver-docker-desktop_kube-system_04dc74f076b53c39b47cb1bf82330dfd_8 
4c4f7f2cd973        303ce5db0e90                        "etcd --advertise-cl…"   16 minutes ago      Up 16 minutes                                          k8s_etcd_etcd-docker-desktop_kube-system_d6844c5fb9714fb5465ba8579918e27e_8 
9a38814fce97        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_kube-scheduler-docker-desktop_kube-system_c808ba8a724ff4e00643b5c4f7fc454b_8 
64505ccec473        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_kube-apiserver-docker-desktop_kube-system_04dc74f076b53c39b47cb1bf82330dfd_8 
f4e7831e8c44        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_kube-controller-manager-docker-desktop_kube-system_4f20c2277b1a9bc95a8d0aefdd70ac22_8 
f4bab540dfa0        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_etcd-docker-desktop_kube-system_d6844c5fb9714fb5465ba8579918e27e_8 
mac-os:test-network kpc$ docker ps -a 
CONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS              PORTS                              NAMES 
7bde66374bcb        hyperledger/fabric-peer:latest      "peer node start"        10 minutes ago      Up 10 minutes       7051/tcp, 0.0.0.0:9051->9051/tcp   peer0.org2.example.com 
4db710a489e9        hyperledger/fabric-peer:latest      "peer node start"        10 minutes ago      Up 10 minutes       0.0.0.0:7051->7051/tcp             peer0.org1.example.com 
2252ad1696ea        hyperledger/fabric-orderer:latest   "orderer"                10 minutes ago      Up 10 minutes       0.0.0.0:7050->7050/tcp             orderer.example.com 
96b972b616ee        67da37a9a360                        "/coredns -conf /etc…"   16 minutes ago      Up 16 minutes                                          k8s_coredns_coredns-66bff467f8-rg2w8_kube-system_a818a7cf-90e6-48d7-9f37-c56ef8d1b2f6_8 
c8208cfb8c31        79da37e5a3aa                        "/kube-vpnkit-forwar…"   16 minutes ago      Up 16 minutes                                          k8s_vpnkit-controller_vpnkit-controller_kube-system_5ef5d134-5b8b-4986-9e59-0d5028a7efd3_8 
676b058e70ab        e704287ce753                        "/storage-provisione…"   16 minutes ago      Up 16 minutes                                          k8s_storage-provisioner_storage-provisioner_kube-system_16bfac77-6774-4cc2-96c4-4afb95395d91_14 
5d350545ece6        67da37a9a360                        "/coredns -conf /etc…"   16 minutes ago      Up 16 minutes                                          k8s_coredns_coredns-66bff467f8-766zz_kube-system_1ee85ce6-6260-4636-9b72-4e8ee7823050_8 
2cb895054d3f        0fb7201f92d0                        "/usr/local/bin/kube…"   16 minutes ago      Up 16 minutes                                          k8s_kube-proxy_kube-proxy-5f58b_kube-system_52ac85ee-cbf2-4a01-ba80-86e768890fad_8 
7297123b0646        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_storage-provisioner_kube-system_16bfac77-6774-4cc2-96c4-4afb95395d91_8 
225ac931d966        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_vpnkit-controller_kube-system_5ef5d134-5b8b-4986-9e59-0d5028a7efd3_8 
60af6a360e86        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_coredns-66bff467f8-rg2w8_kube-system_a818a7cf-90e6-48d7-9f37-c56ef8d1b2f6_8 
8fa87564864d        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_coredns-66bff467f8-766zz_kube-system_1ee85ce6-6260-4636-9b72-4e8ee7823050_8 
19c4cc375076        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_kube-proxy-5f58b_kube-system_52ac85ee-cbf2-4a01-ba80-86e768890fad_8 
cd1ab1a1bb53        6f7135fb47e0                        "kube-scheduler --au…"   16 minutes ago      Up 16 minutes                                          k8s_kube-scheduler_kube-scheduler-docker-desktop_kube-system_c808ba8a724ff4e00643b5c4f7fc454b_8 
a4be286a978c        6a979351fe5e                        "kube-controller-man…"   16 minutes ago      Up 16 minutes                                          k8s_kube-controller-manager_kube-controller-manager-docker-desktop_kube-system_4f20c2277b1a9bc95a8d0aefdd70ac22_8 
c0fd6452bb79        92d040a0dca7                        "kube-apiserver --ad…"   16 minutes ago      Up 16 minutes                                          k8s_kube-apiserver_kube-apiserver-docker-desktop_kube-system_04dc74f076b53c39b47cb1bf82330dfd_8 
4c4f7f2cd973        303ce5db0e90                        "etcd --advertise-cl…"   16 minutes ago      Up 16 minutes                                          k8s_etcd_etcd-docker-desktop_kube-system_d6844c5fb9714fb5465ba8579918e27e_8 
9a38814fce97        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_kube-scheduler-docker-desktop_kube-system_c808ba8a724ff4e00643b5c4f7fc454b_8 
64505ccec473        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_kube-apiserver-docker-desktop_kube-system_04dc74f076b53c39b47cb1bf82330dfd_8 
f4e7831e8c44        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_kube-controller-manager-docker-desktop_kube-system_4f20c2277b1a9bc95a8d0aefdd70ac22_8 
f4bab540dfa0        k8s.gcr.io/pause:3.2                "/pause"                 16 minutes ago      Up 16 minutes                                          k8s_POD_etcd-docker-desktop_kube-system_d6844c5fb9714fb5465ba8579918e27e_8 
mac-os:test-network kpc$

On Sep 30, 2020, at 8:45 PM, Gmail <alaskadd@...> wrote:   

Please start the test network and share the output of the command docker ps -a 


 On Sep 30, 2020, at 8:19 PM, k.clements@... wrote:

Did just notice this version difference on a 'peer version'  but not sure relevant to issue at hand, the 'Go' version difference:
mac-os:test-network kpc$ peer version
peer:
Version: 2.2.0
Commit SHA: 5ea85bc54
Go version: go1.14.4
OS/Arch: darwin/amd64
Chaincode:
 Base Docker Label: org.hyperledger.fabric
 Docker Namespace: hyperledger

mac-os:test-network kpc$ go version
go version go1.15.2 darwin/amd64
mac-os:test-network kpc$     













Join {fabric@lists.hyperledger.org to automatically receive all group messages.