I want to start this project https://github.com/hyperledger/education-sawtooth-simple-supply
My environment is Ubuntu 18.04.6 LTS , docker-compose version 1.17.1, Docker version 20.10.17, when i follow the instruction it pulls the container but in the end it stops with the error
Warning: apt-key output should not be parsed (stdout is not a terminal)
curl: (6) Could not resolve host: p80.pool.sks-keyservers.net
gpg: no valid OpenPGP data found.
ERROR: Service 'simple-supply-shell' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y -q curl gnupg && curl -sSL 'http://p80.pool.sks-keyservers.net/pks/lookup?op=get&search=0x8AA7AF1F1091A5FD' | apt-key add - && echo 'deb [arch=amd64] http://repo.sawtooth.me/ubuntu/chime/stable bionic universe' >> /etc/apt/sources.list && apt-get update' returned a non-zero code: 2
Your quick assistance is highly appreciated.
The only solution was that i changed the network option to Bridge Adapter in a virtual machine and it got worked im answering this because i have dont this if someone has resolved other way then post an answer here.
Related
I'm running on a Ubuntu 14,04 ('trusty') with no possibility to upgrade (a complex website-management platform is dependant upon it), but I'd like to install the latest version of postgresql in parallel... are there any compatibility issues?
Yes, I tried it just now, I followed the guide here: https://gist.github.com/alistairewj/8aaea0261fe4015333ddf8bed5fe91f8
# add postgresql to apt repository
sudo add-apt-repository 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main'
# get the signing key and update
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
# install postgresql
sudo apt-get install postgresql-11
# ensure that the server is started by switching to the postgres user
sudo su - postgres
# I didn't do this part since the database was started during install
# and I checked via `psql`
# /usr/lib/postgresql/11/bin/pg_ctl -D /var/lib/postgresql/11/main -l logfile start
I am installing Minikube on Ubuntu 16.04 LTS (instructions available below). It is working fine when I run each command manually. However, if I put these in a script file install.sh it will fail at the last step giving me an error:
Error
Starting VM...
E0710 20:42:00.618251 20443 start.go:168] Error starting host: Error getting state for host: getting connection: looking up domain: virError(Code=42, Domain=10, Message='Domain not found: no domain with matching name 'minikube'').
Retrying.
E0710 20:42:00.618595 20443 start.go:174] Error starting host: Error getting state for host: getting connection: looking up domain: virError(Code=42, Domain=10, Message='Domain not found: no domain with matching name 'minikube'')
================================================================================
An error has occurred. Would you like to opt in to sending anonymized crash
information to minikube to help prevent future errors?
To opt out of these messages, run the command:
minikube config set WantReportErrorPrompt false
================================================================================
Please enter your response [Y/n]:
Instructions
sudo apt-get -y update
sudo apt-get -y upgrade
#Make sure no prior copy of minikube exists.
sudo rm -rf .minikube/
#Install minikube. Make sure to check for latest version (e.g. current version is 0.28.0)
curl -Lo minikube https://storage.googleapis.com/minikube/releases/$MINIKUBE_VERSION/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
#Install kvm2
curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 && chmod +x docker-machine-driver-kvm2 && sudo mv docker-machine-driver-kvm2 /usr/bin/
sudo apt install -y libvirt-bin qemu-kvm
sudo usermod -a -G libvirtd $(whoami)
#Check to ensure libvirtd service is running.
systemctl status libvirtd
minikube start --vm-driver kvm2
Also, when the script fails if I re-run the following command I get the minikube working fine. Just don't know why it fails originally when running within the script.
sudo rm -rf .minikube/
minikube start --vm-driver kvm2
If you're running this script not for the first time, sudo rm -rf .minikube/ will not be enough.
You should also run the below command:
minikube delete
And, just in case, add a shebang to the top of the script:
#!/bin/bash
Having challenges running Eclipse Che multiuser mode on Google Cloud computer engine instance.
Environment
(che cli): 6.1.0 - using docker 17.03.2-ce / native
Input:
docker run -it -e CHE_MULTIUSER=true -e CHE_HOST={server-ip} -v /var/run/docker.sock:/var/run/d
ocker.sock -v {localuserfolder}:/data eclipse/che start
Output:
INFO: (che start): Starting containers...
docker_compose --file="/data/instance/docker-compose-container.yml" -p="che" up -d >> "/data/cli.log" 2>&1
che_postgres_1 is up-to-date
ERROR: for che Container "4a245b40b556" is unhealthy.
ERROR: for keycloak Container "4a245b40b556" is unhealthy.
Encountered errors while bringing up the project.
ERROR: Error during 'compose up' - printing 30 line tail of {localuserfolder}/cli.log:
Noticed issue has something do to with postgres not having permission to run some scripts:
docker container logs che_postgres_1
/usr/bin/container-entrypoint: line 3: exec: /var/lib/pgsql/init-che-user-and-run.sh: cannot execute: Permission denied
/usr/bin/container-entrypoint: line 3: /var/lib/pgsql/init-che-user-and-run.sh: Permission denied
Documented fix doesn't work, :/data is already mounted to read/writable directory.
Probably Google Cloud overrides file system permissions somehow. Have you tried mounting different dirs into :/data?
I've tested your command and it works in my case by using a GCP instance with Debian 9 and docker 17.12, here is the steps that I've followed:
1) install docker
$ sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
$ curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add -
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable"
$ sudo apt-get install docker-ce
2) run che, I've used as a directory the /tmp, I recommend you to create another directory to store the files
$ sudo docker run -it -e CHE_MULTIUSER=true -e CHE_HOST=INTERNAL-IP -v /var/run/docker.sock:/var/run/docker.sock -v /DIRECTORY_WITH_PERMISSIONS:/data eclipse/che start
I use Homestead Version 1.0.1 and Laravel version 5.4.16. I setup the Laravel dusk by reading the documentation.
But, when I run php artisan dusk by ssh to my homestead. I got an error like the following
PHPUnit 5.7.17 by Sebastian Bergmann and contributors.
E 1
/ 1 (100%)
Time: 2.52 minutes, Memory: 10.00MB
There was 1 error:
1) Tests\Browser\ExampleTest::testBasicExample
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown
for http POST to /session with params:
{"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"binary":"","args":["no-first-run"]}}}
Operation timed out after 30001 milliseconds with 0 bytes received
Is there anyway to fix this 😊?
Yes, it can be found on the github pages of Dusk. It is a known issue and they are working to update the next homestead box.
The basic issue is that the homestead box has no visual interface and
that dusk runs a real browser, so you have to install a chromedriver
if you want to use it.
But for now this worked for me:
https://github.com/laravel/dusk/issues/50#issuecomment-275155974
Not included in that post but necessary for me:
make sure you have following permission set cd vendor/laravel/dusk/bin; chmod 775 *
Steps from the github post:
First of all, google-chrome is requried to be installed in guest OS:
$ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
$ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
$ sudo apt-get update && sudo apt-get install -y google-chrome-stable
Next thing is xvfb:
$ sudo apt-get install -y xvfb
Try to start ./vendor/laravel/dusk/bin/chromedriver-linux --port=8888. If you have some errors about loading libraries (libnss3.so, libgconf-2.so.4), try this:
$ sudo apt-get install -y libnss3-dev libxi6 libgconf-2-4
When you see
$ ./vendor/laravel/dusk/bin/chromedriver-linux --port=8888
Starting ChromeDriver 2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e) on port 8888
Only local connections are allowed.
this means ChromeDriver can be started (so SupportsChrome trait should be able to start it too). You can stop this process for now (Ctrl+C).
Run
$ Xvfb :0 -screen 0 1280x960x24 &
in a separate terminal window.
Also you may want to add your dev domain in guest's /etc/hosts file:
127.0.0.1 domain.dev.
This issue is to add the chromedriver to homestead by default and will
be solved mid April. https://github.com/laravel/homestead/issues/516
I have a project on github, that contains a .travis.yml file with a before_install hook to do things that require sudo. To move the project to container type infrastructure I have to remove the sudo dependency of the project. Question is - how?
On this page of Travis CI documentation, in the before_install section they're providing scripts to run in this hook:
http://docs.travis-ci.com/user/installing-dependencies/
However those scripts depend on sudo which I'm trying to get rid of. What are possible workaround for this? I still need to have the scripts run, but they won't without sudo.
Thanks.
Edit:
Had to replace most of the data with Xs, but you can still get the idea os what's happening in the code:
- "sudo apt-key adv --keyserver hkp://xxxxxxxx.ubuntu.com:XX --recv XXXXXX"
- "echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist XXgen' | sudo tee /etc/apt/sources.list.x/xxx.list"
- "sudo apt-get update"
- "sudo apt-get install mongodb-org-server"
- curl -O https://download.xxxxxx.org/xxxxxx/xxxxxx/xxxxxx-X.X.X.deb && sudo dpkg -i --force-confnew xxxxxx-X.X.X.deb
- sudo service xxxxxx start && sleep 10
As you can see, there are multiple sudo calls that need to be cleared up.
Edit:
I need to install ElasticSearch 1.7 and MongoDB 2.6