Error creating hyperledger composer rest server - hyperledger

I got the following error:
"Error: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org1MSP, received ]]"
When I execute:
composer-rest-server
Similar to :
Could not deploy business network to hyperledger fabric beta using composer
But this is on rest server and I have the correct versions:
composer -v
composer-cli v0.8.0
composer-admin v0.8.0
composer-client v0.8.0
composer-common v0.8.0
composer-runtime-hlf v0.8.0
composer-runtime-hlfv1 v0.8.0
docker -v
Docker version 17.03.1-ce, build c6d412e
docker-compose -v
docker-compose version 1.13.0, build 1719ceb
npm -v
3.10.10
Hypeledger running with my model:
composer network ping -n calma-network -p hlfv1 -i admin -s adminpw
The connection to the network was successfully tested: calma-network
version: 0.8.0
participant: <no participant found>
Command succeeded

The command you entered only shows the version of the composer command line interface and doesn't include the version of the composer rest server. The composer rest server is standalone and doesn't require the composer cli to run. It is highly likely your composer rest server is older than version 0.8.0 but there is no easy way to check the version. One way is to invoke the command
npm list -g --depth=0 | grep composer-rest-server
you need to uninstall and reinstall the composer rest server to get the latest level.

Related

How to install docker correctly in ubuntu 22.04 is it possible at this time?

I am following the docker installation tutorial in ubuntu: https://docs.docker.com/desktop/linux/install/ubuntu/
And when I try this step: sudo apt install ./docker-desktop-4.8.1-amd64.deb I am getting the next error: E: Unsupported file ./docker-desktop-4.8.1-amd64.deb given on commandline
Not sure what that means or if I am missing something.
E: Unsupported file ./docker-desktop-4.8.1-amd64.deb given on commandline
I also tried with:
curl https://desktop-stage.docker.com/linux/main/amd64/74134/docker-desktop.deb --output docker-desktop.deb
sudo apt install ./docker-desktop.deb
And got the error:
E: Invalid archive signature
E: Internal error, could not locate member control.tar{.zst,.lz4,.gz,.xz,.bz2,.lzma,}
E: Could not read meta data from /home/rodolfo/docker-desktop.deb
E: The package lists or status file could not be parsed or opened.
Any ideas?
According to official documentation, and the steps I followed to install docker in Ubuntu 22.04 LTS
Visit the following site https://docs.docker.com/engine/install/ubuntu/
Scroll down until you find the Install using the convenience script section.
You will find the following commands:
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ DRY_RUN=1 sh ./get-docker.sh
the first command will install a shell script with the all needed commands and the other will run this shell script.
You can test the installation by running these commands
$ sudo docker --version
$ sudo docker info
If it looks fine, you now have docker in your machine.
Optional step is to download docker desktop for Ubuntu 22.04
https://docs.docker.com/desktop/linux/install/
MAKE SURE You already installed docker engine before installing docker desktop for Ubuntu
Try moving the DEB file to HOME folder or Change the directory in terminal to the folder where the file is downloaded
So I had the same problem and the solution was to go to the folder root that I downloaded the deb file in it wish is Downloads for me and I rerun the commend
My issue ended up being Ubuntu 22.04 was installed with wsl version 1.
wsl -l -v
NAME STATE VERSION
Ubuntu-22.04 Running 1
wsl --set-version Ubuntu-22.04 2

Can't download heroku on ubuntu for windows (wls)

Whenever I type the command to download the cli, sudo snap install --classic heroku this message appears:
error: cannot communicate with server: Post
http://localhost/v2/snaps/heroku: dial unix /run/snapd.socket:
connect: no such file or directory
And when I use this other link:
curl https://cli-assets.heroku.com/install-ubuntu.sh | shcurl
https://cli-assets.heroku.com/install-ubuntu.sh | sh
And then I type heroku create, this other message pops out:
heroku: command not found
It seems that snaps are missing on Ubuntu for Windows. However, I was able to install Heroku on the WSL through Node Package Manager. Try $ npm install -g heroku.

docker login fails on a server with no X11 installed

I am trying to deploy a docker configuration with images on a private docker registry.
Now, every time I execute docker login registry.example.com, I get the following error message:
error getting credentials - err: exit status 1, out: Cannot autolaunch D-Bus without X11 $DISPLAY
The only solution I found for non-MacOS users was to run export $(dbus-launch) first, but that did not change anything.
I am running Ubuntu Server and tried with both the Ubuntu Docker package and the Docker-CE package.
How can I log in without an X11 session?
Looks like this is because it defaults to use the secretservice executable which seems to have some sort of X11 dependency for some reason. If you install and configure pass docker will use that instead which seems to solve the problem.
In a nutshell (from https://github.com/docker/compose/issues/6023)
sudo apt install gnupg2 pass
gpg2 --full-generate-key
This generates a you a gpg2 key. After that's done you can list it with
gpg2 -k
Copy the key id (from the line labelled [uid]) and do
pass init "whatever key id you have"
Now docker login should work.
There are a couple of bugs logged on launchpad regarding this:
https://bugs.launchpad.net/ubuntu/+source/golang-github-docker-docker-credential-helpers/+bug/1794307
https://bugs.launchpad.net/ubuntu/+source/docker-compose/+bug/1796119
This works: sudo apt remove golang-docker-credential-helpers
You can remove the offending package golang-docker-credential-helpers without removing all of docker-compose.
The following worked for me on a server without X11 installed:
dpkg -r --ignore-depends=golang-docker-credential-helpers golang-docker-credential-helpers
and then
echo 'foo' | docker login mydockerrepo.com -u dockeruser --password-stdin
Source:
bug reported in debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910823#39
bug reported on ubuntu:
https://bugs.launchpad.net/ubuntu/+source/docker-compose/+bug/1796119
secretservice requires a GUI. You can use pass without a GUI.
Unfortunately, Docker's documentation on how to configure Docker Credential Helpers is quite lacking. Here's a comprehensive guide how to configure pass with Docker (tested with Ubuntu 18.04):
1. Install the Docker Credential Helper for pass
Find the url for the latest version of docker-credential-pass from https://github.com/docker/docker-credential-helpers/releases . For example:
# substitute with the latest version
url=https://github.com/docker/docker-credential-helpers/releases/download/v0.6.2/docker-credential-pass-v0.6.2-amd64.tar.gz
# download and untar the binary
wget $url
tar -xzvf $(basename $url)
# move the binary to a dir in your $PATH
sudo mv docker-credential-pass /usr/local/bin
# verify it works
docker-credential-pass list
2. Install and configure pass
apt install pass
# create a gpg2 key
gpg2 --gen-key
# if you have issues with lack of entropy, "apt install haveged" and try again
# create the password store using the gpg user id above
pass init $gpg_id
3. docker login
docker login
# You should not see any credentials stored in "auths" section.
# "credsStore": "pass" should have been automatically added.
# If the value is "secretservice", replace it with "pass".
cat ~/.docker/config.json
# verify credentials stored in `pass` store now
pass
There is a much easier answer than the ones already posted, which I found in a comment on https://github.com/docker/docker-credential-helpers/issues/105.
The solution is to rename docker-credential-secretservice out of the way
e.g: mv /usr/bin/docker-credential-secretservice /usr/bin/docker-credential-secretservice.broken
Once you do this, docker login works regardless of whether or not docker-compose is installed. No other package additions or removals are necessary.
I've resolved this issue by uninstalling docker-compose which was installed from Ubuntu repo and installing docker-compose by official instruction at https://docs.docker.com/compose/install/#install-compose
What helped me on Ubuntu 18.04 was:
Following the steps in #oberstet 's post and uninstalling the golang helper
Performing a login after the helper uninstall
Reinstalling docker via sudo apt-get install docker
Logging back in via sudo docker login

Integrating InfluxDB with ONOS

I have followed all the steps in https://wiki.onosproject.org/display/ONOS/InfluxDB+Report+and+Query+Application , but I can't integrate ONOS with InfluxDB.
After configuring all that's in the documentation, I execute "SHOW MEASUREMENTS" in InfluxDB and nothing is showing, because the database I created is empty, ONOS does not publish the metrics in it.
Is there anything any configuration file I must edit in order to run correctly?
Thank you so much for your help.
I tried the documentation, it has some missing information. Here is what i did:
My OS is Ubuntu:
yavuz#ubuntu:/opt/onos/apache-karaf-3.0.8/data/log$ uname -a
Linux ubuntu 4.4.0-83-generic #106-Ubuntu SMP Mon Jun 26 17:54:43 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
I've installed influxdb version 0.10.0
Note that ONOS supports InfluxDB up to 0.10.3. The InfluxDB which has
higher version number will not work properly with ONOS.
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/lsb-release
echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
sudo apt-get update
sudo apt-get install influxdb=0.10.0+dfsg1-1
sudo service influxdb start
sudo apt-get install influxdb-client
Create onos database on influx
yavuz#ubuntu$ influx
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
Connected to http://localhost:8086 version 0.10.0
InfluxDB shell 0.10.0
CREATE DATABASE onos
use onos
CREATE USER onos WITH PASSWORD 'onos.password' WITH ALL PRIVILEGES
Now, influxdb is ready. Then, I installed ONOS 1.10.2:
cd /opt
sudo wget -c http://downloads.onosproject.org/release/onos-1.10.2.tar.gz
sudo tar xzf onos-1.10.2.tar.gz
sudo mv onos-1.10.2 onos
sudo /opt/onos/bin/onos-service start
Be sure to run ONOS with sudo, otherwise influxdb gives permission
errors.
After getting ONOS console install influxdb feature: (this is missed in documentation)
feature:install onos-apps-influxdbmetrics
Activate application
app activate org.onosproject.influxdbmetrics
Last trick, default influxdb address is localhost and it causes parsing errors, you can set this value to 127.0.0.1
cfg set org.onosproject.influxdbmetrics.InfluxDbMetricsConfig address 127.0.0.1
You can tail the karaf.log to control if an error occurs during these steps. After few seconds, here is the query result
Hope this helps.

zsh: command not found: dcos

I tried to install DC/OS cluster on my Mac by dcos-vagrant.
Intsallation is quite smooth, no errors found.
==> m1: sudo: chmod u+x /opt/mesosphere/bin/postflight.sh
==> m1: sudo: /opt/mesosphere/bin/postflight.sh
==> boot: DC/OS Installation Complete
==> boot: Web Interface: http://m1.dcos/
but when I opne the http://m1.dcos/, doesn't show the web-ui, show the ERR_EMPTY_RESPONSE error, and cannot find the dcos command.
GET http://m1.dcos/ net::ERR_EMPTY_RESPONSE
➜ dcos-vagrant git:(master) dcos marathon app add https://dcos.io/docs/1.7/usage/nginx.json
zsh: command not found: dcos
Anyone can help me! Thanks in advance!
dcos cannot work duo to I didn't install the dcos CLI.
intallation DC/OS CLI
To install the CLI, copy and paste into your terminal:
mkdir -p dcos
cd dcos
curl -O https://downloads.dcos.io/dcos-cli/install.sh
bash ./install.sh . https://m1.dcos
source ./bin/env-setup
Empty response from http://m1.dcos/ would seem to indicate the UI service or admin router is having issues, but the CLI working means admin router is reachable and correctly proxying components like Marathon & Mesos.
You might check the admin router logs to see if it's having trouble serving the UI html/js.
Status:
systemctl status dcos-adminrouter.service
Logs:
journalctl -u dcos-adminrouter

Resources