Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker is not working #656

Closed
tsanyqudsi opened this issue Dec 28, 2015 · 13 comments
Closed

Docker is not working #656

tsanyqudsi opened this issue Dec 28, 2015 · 13 comments

Comments

@tsanyqudsi
Copy link

Hi,

apparently i'm having a problem with Docker installation of Mist.io, i did the installation procedure on http://docs.mist.io/article/39-installation but it seems that i'm having the same problem with #342

mind telling me where did i go wrong ?

@mgogoulos
Copy link

Hi,
there's an issue with the mist.io docker image and we need a few more days to check it out. I will inform you once this is done.

Sorry for the trouble,
Markos

@tsanyqudsi
Copy link
Author

Will do :) thanks for the feedback

Sent From Sony Z1 Compact
On Dec 28, 2015 8:01 PM, "Markos Gogoulos" notifications@github.com wrote:

Hi,
there's an issue with the mist.io docker image and we need a few more
days to check it out. I will inform you once this is done.

Sorry for the trouble,
Markos


Reply to this email directly or view it on GitHub
#656 (comment).

@gisjedi
Copy link

gisjedi commented Jan 2, 2016

There are issues with the way RabbitMQ is configured within the image. It endlessly loops attempting to start. I was able to just get up and running by linking in a clean RabbitMQ container from Docker Hub and updating the appropriate settings.

If you place the docker-compose.yml and settings.py below into a directory and run the following command you should be up and running:

docker-compose up -d

docker-compose.yml

mist:
  image: mist/mistio
  ports:
  - 8000:8000
  volumes:
  - ./settings.py:/home/mist/mist.io/settings.py
  environment:
  - BRANCH=staging
  links:
  - rabbitmq
rabbitmq:
  image: rabbitmq

settings.py

JS_BUILD = True
CSS_BUILD = True
SSL_VERIFY = False
AMQP_URI='rabbitmq:5672'
BROKER_URL='amqp://guest:guest@rabbitmq:5672/'

@tsanyqudsi
Copy link
Author

@mgogoulos , maybe this is the answer.

@gisjedi thanks, btw u don't play guitar do u ?

@mgogoulos
Copy link

Hi @gisjedi thanks for this! Indeed rabbitmq creates the issue, we are going to fix the image in the next few days.

On the meanwhile, these are some instructions on how to make all mist.io services running on a mist.io container image:

  1. Pull the image and start a container through it:
user@Docker:~$  docker pull mist/mistio
usert@Docker:~$ docker run -d -p 8000:8000 mist/mistio;
87aca7cd2826bc4c1f563634cd5c06337f0da826e262041707b2c0b00da9913a
  1. Make sure the container is running, then bash into it
user@Docker:~$ docker ps
CONTAINER ID        IMAGE               COMMAND                 CREATED             STATUS              PORTS                    NAMES
87aca7cd2826        mist/mistio         "/bin/sh -c /init.sh"   8 minutes ago       Up 8 minutes        0.0.0.0:8000->8000/tcp   happy_bohr

notice the id of the container, which is 87aca7cd2826 in my case. Replace it with the one the command 'docker ps' returns for you and run the following commands:

user@Docker:~$ docker exec -it 87aca7cd2826 bash
root@87aca7cd2826:/home/mist/mist.io# su mist
mist@87aca7cd2826:~/mist.io$ ./bin/supervisorctl shutdown ; sleep 20;  kill -9 `ps aux|grep epmd|grep daemon|awk '{print $2}'` ; epmd -daemon; ./bin/supervisord   
Shut down
mist@87aca7cd2826:~/mist.io$ ./bin/supervisorctl status
celery                           RUNNING   pid 538, uptime 0:07:32
haproxy                          RUNNING   pid 534, uptime 0:07:32
hub-shell                        RUNNING   pid 540, uptime 0:07:32
memcache                         RUNNING   pid 539, uptime 0:07:32
rabbitmq                         RUNNING   pid 537, uptime 0:07:32
sockjs                           RUNNING   pid 535, uptime 0:07:32
uwsgi                            RUNNING   pid 536, uptime 0:07:32
mist@87aca7cd2826:~/mist.io$ exit
root@87aca7cd2826:/home/mist/mist.io# exit

After you make sure all services are RUNNING, you can visit mist.io on http://docker_ip:8000

Hope this helps,
Markos

@mgogoulos
Copy link

We have updated the image, and it can now be used without that problem with epmd and rabbitmq! It is now based on Debian (previous has been based on Ubuntu)

In order to use it pull it (or update it) and start a container:

docker pull mist/mistio
Pulling repository mist/mistio
...
docker run -d -p 8000:8000 mist/mistio
8da5cc47bca22a5d1da729c4b23382c90ae0aaec50bcc2d608e9bea783b5b8a3

then mist.io will be exported on port 8000, so to see it visit http://docker_ip:8000

Sorry for the trouble.

Cheers

@tsanyqudsi
Copy link
Author

HAIL MIST.IO

Sent From Sony Z1 Compact
On Jan 5, 2016 9:51 PM, "Markos Gogoulos" notifications@github.com wrote:

We have updated the image, and it can now be used without that problem
with epmd and rabbitmq! It is now based on Debian (previous has been based
on Ubuntu)

In order to use it pull it (or update it) and start a container:

docker pull mist/mistio
Pulling repository mist/mistio
...
docker run -d -p 8000:8000 mist/mistio
8da5cc47bca22a5d1da729c4b23382c90ae0aaec50bcc2d608e9bea783b5b8a3

then mist.io will be exported on port 8000, so to see it visit
http://docker_ip:8000

Sorry for the trouble.

Cheers


Reply to this email directly or view it on GitHub
#656 (comment).

@cunninghamb505
Copy link

I tried bashing into the container and restart and all ,but still have pid's in starting mode. Any idea if this is fixed running in ubuntu docker

@mgogoulos
Copy link

Are you using the latest image? Please update the image and try to start a new container out of it!

@cunninghamb505
Copy link

yes latest image , error below
mportError Traceback (most recent call last)
/home/mist/mist.io/src/mist/io/hub/shell.py in ()
8
9 import mist.io.exceptions
---> 10 import mist.io.shell
11 import mist.io.hub.main
12

/home/mist/mist.io/src/mist/io/shell.py in ()
16 import ssl
17 import tempfile
---> 18 import mongoengine as me
19
20 from mist.io.exceptions import CloudNotFoundError, KeypairNotFoundError

ImportError: No module named mongoengine

@mgogoulos
Copy link

Let me have a look...

@mgogoulos
Copy link

This looks strange. Did you change the branch? Plese bash in to the container, do a git branch followed by a git log and let me know about the output

user@Docker:~$ docker exec -it 87aca7cd2826 bash
root@87aca7cd2826:/home/mist/mist.io# su mist
mist@87aca7cd2826:~/mist.io$ git branch
mist@87aca7cd2826:~/mist.io$ git log

In any case you should make sure you are on the master branch and up to date, and restart the services

mist@87aca7cd2826:~/mist.io$ git pull ; ./bin/supervisorctl shutdown ; sleep 20;  kill -9 `ps aux|grep epmd|grep daemon|awk '{print $2}'` ; epmd -daemon; ./bin/supervisord   

@jurajhrib
Copy link

jurajhrib commented Apr 14, 2016

I had the same problem, I have taken a look at the branch and it is indeed switched to staging. I had not chosen this branch during this installation, so it's weird, that I am not on the master by default.

Switching the branch and restarting helped. But you should take a look at why it checks out different branch then master. Thanks for the help! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants