Importing bna file: cannot get package for chaincode - hyperledger-composer

Some time ago a created a bna file based on https://github.com/johnwalicki/IoT-AssetTracking-Perishable-Network-Blockchain/tree/master/Blockchain
Now I want to import a bna file on a different server.
$ composer network install --archiveFile perishable-network.bna --card PeerAdmin#hlfv1
$ composer network start --networkName perishable-network  --networkVersion 1.0.0 --card PeerAdmin#hlfv1 --networkAdmin admin --networkAdminEnrollSecret adminpw
Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: cannot get package for chaincode (perishable-network:1.0.0)
I am aware of this other question but wouldn't know how to apply this (peer chaincode install) to my specific situation.
docker ps directly via VNC on the Ubuntu 18.04 VM where I start the composer-playground command:
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar$2Frun%2Fdocker.sock/v1.39/containers/json: dial unix /var/run/docker.sock: connect: permission denied
docker ps via SSH from my laptop (Mac):
peter#asset-tracker:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3167a355ed2d hyperledger/fabric-peer:1.2.1 "peer node start" 14 hours ago Up 14 hours 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com
75bf0cc3cdd1 hyperledger/fabric-couchdb:0.4.10 "tini -- /docker-ent…" 14 hours ago Up 14 hours 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb
33322a1d07cd hyperledger/fabric-orderer:1.2.1 "orderer" 14 hours ago Up 14 hours 0.0.0.0:7050->7050/tcp orderer.example.com
05e542111f21 hyperledger/fabric-ca:1.2.1 "sh -c 'fabric-ca-se…" 14 hours ago Up 14 hours 0.0.0.0:7054->7054/tcp ca.org1.example.com

Dealing with the first error on the composer network start command:
" Error: cannot get package for chaincode (perishable-network:1.0.0) "
This says that the network with that name and version can't be found on the Peer - so either it isn't there or there is some mismatch in the name/version.
If you run the command composer archive list -a perishable-network.bna you will see the exact details from the bna, and you will see any mismatch with your composer network start command.
If the name./version are OK could also check the file system on the Peer to see it is actually successfully installed: docker exec peer0.org1.example.com ls /var/hyperledger/production/chaincodes
If the package is not visible from the command above then you will need to re-run the composer network install ... command - then recheck the file system on the peer using the previous command.
Have you stopped or restarted the Fabric between the composer network install and composer network start commands? Please see this previous Stack Overflow posting which explains how the startFabric.sh script works.

Related

CouchDB on docker desktop for OSX fails to start

I'm trying to install CouchDB on docker desktop for OSX. I follow the following steps:
docker pull couchdb (which works)
I then start the docker image:
docker run -d --name test-couchdb couchdb:latest
The log reports this:
[notice] 2019-08-30T10:27:03.039090Z nonode#nohost <0.325.0> --------
chttpd_auth_cache changes listener died database_does_not_exist at
mem3_shards:load_shards_from_db/6(line:395) <=
mem3_shards:load_shards_from_disk/1(line:370) <=
mem3_shards:load_shards_from_disk/2(line:399) <=
mem3_shards:for_docid/3(line:86) <= fabric_doc_open:go/3(line:39) <=
chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:195) <=
chttpd_auth_cache:listen_for_changes/1(line:142) [error]
2019-08-30T10:27:03.039976Z nonode#nohost emulator -------- Error in
process <0.461.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,395}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,370}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,399}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,86}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,39}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,195}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,142}]}]}
[notice] 2019-08-30T10:27:03.065708Z nonode#nohost <0.347.0> --------
couch_replicator_clustering : cluster stable [notice]
2019-08-30T10:27:03.073623Z nonode#nohost <0.360.0> -------- Started
replicator db changes listener <0.462.0>
Seems like an Erlang error.
When I do curl http://127.0.0.1:5984 or curl localhost:5984 I get a connection refused message both times, probably because the listener is not up and running....
I'm thinking this is an incompatibility issue, but not sure
This is a simple attempt to get another container started:
Vans-MacBook-Pro:~ vw$
docker pull couchdb
Using default tag: latest
latest: Pulling from library/couchdb
Digest: sha256:7537a9047fea8960ed9e88123a2cb9cbd96db51767f9a9b3ccfcb174b11408c1
Status: Image is up to date for couchdb:latest
docker.io/library/couchdb:latest
vw$ docker run -d --name my2-couchdb couchdb
2e2e37c8fb6b63ebbdc874396ce64a22727706237cb05bdbf256e4048f3346ef
vw$ docker run -p 5984:5984 -d my2-couchdb
Unable to find image 'my2-couchdb:latest' locally
docker: Error response from daemon: pull access denied for my2-couchdb, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
I had the same problem, got it to work by including admin username/password and port, like this:
docker run -d --name couchdb -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password -p 5984:5984 couchdb:latest

Connecting to Oracle instance running on Docker

I spent more than two days on this and I ran out of ideas and I really hope someone here will be able to help.
I am running docker on my Linux Fedora laptop.
[julian#julian-hp ~]$ docker -v
Docker version 18.06.1-ce, build e68fc7a
I loaded an oracle 12c image from another laptop (running Linux Ubuntu) and ran it using the following command:
docker run --name oracle_12c_201 -p 1521:1521 -p 5500:5500
-v /opt/dev/data/oracle/o12c_201_u02/:/opt/oracle/oradata
-e ORACLE_PWD=admin 12a359cd0528
The container gets created and is displayed as healthy when running docker ps:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
544917a88b6b 12a359cd0528 "/bin/sh -c '/bin/ba…" 2 days ago Up 2 days (healthy) 0.0.0.0:1521->1521/tcp, 0.0.0.0:5500->5500/tcp oracle_12c_201
However when I try to login to my running instance I am getting ORA-01017: Invalid username/password; logon denied message
All of the HOW TOs I found on the internet say that if you do not specify a password when you create the container using docker run the the SYS password will be displayed under this line:
ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN:
There is not such a line in my logs. Note I deleted the container using all possible permutations such following internet articles such as -e "ORACLE_PWD=admin" or not specifying a password at running docker run using sudo nothing worked.
When trying to change the password using below:
docker exec oracle_12c_201 ./setPassword.sh admin
It fails with the following error mesage:
OCI runtime exec failed: exec failed: container_linux.go:348: starting container
process caused "exec: \"./setPassword.sh\": stat ./setPassword.sh:
no such file or directory": unknown
I ran out of ideas. I can see from the logs that the database is up and running but it is useless as long as I cannot connect to it. Note that the same image runs OK and I can connect to it without any problems on my other laptop running Linux Ubuntu. Unfortunately I no longer have the commands that I used to install oracle on that machine.
Thank you in advance for your help.

"Error trying to start business network. Error: No valid responses from any peers." in hyperledger-composer

Afer using hyperledger-composer for several months, now suddenly the following problem is happening:
Whenever I want to start a business network, using the command:
composer network start --networkName mynetwork --networkVersion 0.0.1 --card PeerAdmin#hlfv1 --networkAdmin admin --networkAdminEnrollSecret adminpw
... I get (after waiting for an eternity) the following error message:
Error: Error trying to start business network. Error: No valid
responses from any peers. Response from attempted peer comms was an
error: Error: REQUEST_TIMEOUT Command failed
I uninstalled the whole hyperledger-composer development environment and then reinstalled everything. I still get the same error message.
Does anybody know what the hell is going on here?
P.S.: here's the result of running "composer archive list -a mynetwork#0.0.1.bna":
Listing Business Network Archive from mynetwork#0.0.1.bna
Identifier:mynetwork#0.0.1
Name:mynetwork
Version:0.0.1
Ok, I re-installed the developer environment again AND restarted my computer. Now it works again.

docker tag image where you install packages

I'm trying to tag a local image where I installed some backages to a server and the upload it. It used to work before but for some reason, now when I need it it doesn't work anymore.
I installed the packages, exit the container with "exit" then took the name and performed this command:
docker tag 2747afcd67ee docker.awesomerepo.net/alpine_ssh_tunnel_ready
the image is in the docker ps -a logs:
2747afcd67ee 7328f6f8b418 "/bin/sh" 21 minutes ago Exited (0) 15 minutes ago priceless_galileo
Am I doing something wrong?
Thank you,
Lg.

Docker: Error while executing 'docker run hello-world' command

I have installed docker toolbox for Windows 7 64 bit system. I am getting following error while executing 'docker run hello-world' command .
Please guide me to resolve this.
Thanks in advance!
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
78445dd45222: Pulling fs layer
C:\Program Files\Docker Toolbox\docker.exe: error pulling image configuration: G
et https://dseasb33srnrn.cloudfront.net/registry-v2/docker/registry/v2/blobs/sha
256/48/48b5124b2768d2b917edcb640435044a97967015485e812545546cbed5cf0233/data?Exp
ires=1484910885&Signature=DsT7p2RzmUsymlHz2qG51UJspf9ZvTvHF2pjxJPEi1~c9SomNSk2dv
Sqn1UEpsuse3iVmkq37HKT7cEvRaPsu5vB1RlHBgUg6FJB0DGukLBIq1t2hddVPvlI4Q7lm5B5j3NzRI
vj-hYXrAYDxKAM3TX6LsIdrSrmTHlyIZJ4~1A_&Key-Pair-Id=APKAJECH5M7VWIS5YZ6Q: read tc
p 10.0.2.15:40664->52.222.190.31:443: read: connection reset by peer.
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.
Thats a connection issue. Try using a different internet connection or using a vpn or an http proxy.
Whitelisting DockerHub's IPs:
Docker Hub doesn't have static IP that can be whitelist. Docker Hub is based on Amazon ELB, so they can change any time.
You can do the following and add a subset of ips, May work for you for a short period of time.
dig +noall +answer index.docker.io
;; ANSWER SECTION:
index.docker.io. 174 IN CNAME elb-io.us-east-1.aws.dckr.io.
elb-io.us-east-1.aws.dckr.io. 465 IN CNAME us-east-1-elbio-rm5bon1qaeo4-623296237.us-east-1.elb.amazonaws.com.
us-east-1-elbio-rm5bon1qaeo4-623296237.us-east-1.elb.amazonaws.com. 174 IN A 52.200.132.201
us-east-1-elbio-rm5bon1qaeo4-623296237.us-east-1.elb.amazonaws.com. 174 IN A 52.45.107.172
us-east-1-elbio-rm5bon1qaeo4-623296237.us-east-1.elb.amazonaws.com. 174 IN A 52.22.146.88
On windows, try nslookup.

Resources