Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

error when trying to Launch irohad #1129

Closed
jjacquet opened this issue Mar 25, 2018 · 8 comments
Closed

error when trying to Launch irohad #1129

jjacquet opened this issue Mar 25, 2018 · 8 comments
Labels
needs-reproduction bug/defect that need to be reproduced

Comments

@jjacquet
Copy link

jjacquet commented Mar 25, 2018

I am following the document to launch iroha https://hyperledger.github.io/iroha-api/?protobuf#prepare-configuration-file

It begins to run and then I get the following error:

[th: 3182][error] [StorageImpl:initConnection] << Connection localhost:6379 with Redis broken
[th: 3182][info] [IROHAD] << [Init] => storage
[th: 3182][error] [MAIN] << Failed to initialize storage

I'm wondering if this is coming from an initial problem when I run ./run-iroha-dev.sh I get this error:

adduser: Only root may add a user or group to the system.
chown: changing ownership of '/tmp/ccache': Operation not permitted

or is it that the port in the config file doesn't represent the port that my instance is running locally?

@Hatchi-San
Copy link

try sudo

@jjacquet
Copy link
Author

jjacquet commented Mar 25, 2018

once I'm in the iroha instance and I try to run: sudo irohad --config example/config.sample --genesis_block example/genesis.block --keypair_name example/node0

I get sudo: command not found

@l4l l4l added the needs-reproduction bug/defect that need to be reproduced label Mar 26, 2018
@l4l
Copy link
Contributor

l4l commented Mar 26, 2018

Don't ever use sudo with irohad

May you specify the steps that you've done, like iroha's branch, container name pulled from dockerhub, building steps, etc. Anything that might be useful for reproduction

@ghost
Copy link

ghost commented Mar 29, 2018

@l4l I did use sudo at some point in the install, but now I have a new problem where the install stops at around 20%.

Here's what I did on a new Ubuntu instance in AWS without using sudo

Add docker user to group for socket communication:
sudo usermod -a -G docker $USER (could this be a problem?)

cmake -H. -Bbuild;
cmake --build build -- -j$(nproc)

**Install stops at 20% **
Created 8 gig swap file

sudo swapon --show shows the 1.5gb of the swap is being used however still stuck at 20%

@l4l
Copy link
Contributor

l4l commented Mar 29, 2018

@jacquetring not sure that the adding a group may cause a problem at the build (though it might be a security issue)
I may guess that you don't have enough disk space, the only build may require nearly 10gb or even more. I am not able to say a lot based on your description, consider attaching building log (or some other related info)

@ghost
Copy link

ghost commented Mar 30, 2018

@l4l Ok, I terminated the instance and started Ubuntu with 4CPUs, 16gb ram and 100gb drive to avoid space and cpu limitations. As I was reinstalling all the dependancies I think I may have found where sudo was keeping me from launching properly. When I go to run run-iroha-dev.sh I get the following:

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.37/containers/json?filters=%7B%22name%22%3A%7B%22iroha1000_node_1%22%3Atrue%7D%7D: dial unix /var/run/docker.sock: connect: permission denied ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?

If its at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

Iroha is mapped to host port 50051 Debugger is mapped to host port 20000

ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?

If its at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

If I list out groups $USER I don't see docker as a user in the group. If I try to add docker to the group with out sudo using usermod -aG docker ${USER} I get usermod: Permission denied.

@l4l
Copy link
Contributor

l4l commented Mar 30, 2018

@jacquetring well, I was saying that sudo shouldn't be used for iroha launching blindly, docker obviously should use root privileges (or docker group). So either docker daemon should be started with root, or even simplier use sudo for your last usermod command

@l4l
Copy link
Contributor

l4l commented May 30, 2018

Topic issue was outdated as long as there is no redis usage now, moreover the docker images available at docker hub. Feel free opening a new issue if you still have problems with docker image building

@l4l l4l closed this as completed May 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-reproduction bug/defect that need to be reproduced
Development

No branches or pull requests

3 participants