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

Cannot connect to amqp://guest:**@127.0.0.1:5672 #6291

Closed
inamilu opened this issue Nov 7, 2018 · 7 comments
Closed

Cannot connect to amqp://guest:**@127.0.0.1:5672 #6291

inamilu opened this issue Nov 7, 2018 · 7 comments
Labels
inactive Inactive for >= 30 days

Comments

@inamilu
Copy link

inamilu commented Nov 7, 2018

Hello everyone,

I'm trying to install the Superset on a Windows 7 machine, through Docker toolbox, as specified in the installation page:

git clone https://github.com/apache/incubator-superset/
cd incubator-superset
cp contrib/docker/{docker-build.sh,docker-compose.yml,docker-entrypoint.sh,docker-init.sh,Dockerfile} .
cp contrib/docker/superset_config.py superset/
bash -x docker-build.sh
docker-compose up -d
docker-compose exec superset bash
bash docker-init.sh

When I run bash docker-init.sh inside the superset container, the following error is thrown:
[2018-11-07 16:46:34,686: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [Errno 111] Connection refused.

Does anyone has any idea where the problem could be?

Thank you in advance!

@jnishiyama
Copy link
Contributor

jnishiyama commented Nov 7, 2018

Hey @UrimLimani we ran into the same issue today, and a lot more issues with regards to the Docker installation, but seems like there is help on the way: #5966.

This seems to happen because for whatever reason the superset/superset_config.py file isn't properly overriding the superset_config.py when docker-init.sh runs.

Check to make sure that your superset/superset_config.py file is present. If it is, then oddly enough what worked for us was "turning it on and off again", we just restarted the worker and web server (instead of calling docker-init.sh). I would also recommend not using the superset worker command, but rather something along the lines of celery -A superset worker -l info.

Sorry I don't have a specific root cause, I'm new to the repo, but I hope this helps!

@mistercrunch
Copy link
Member

For the record as far as I know none of the committers use the Docker build, that's why it's in the contrib/ folder. Help wanted!

@mistercrunch
Copy link
Member

BTW I'm surprised to see amqp:// instead of redis://, seems like Redis would be better supported, idk...

@jnishiyama
Copy link
Contributor

Not sure how you mean by "Redis would be better supported", but the Docker build does set up a Redis instance as the Celery broker. The issue is that for whatever reason, when docker-init.sh is run, the config might not get values overridden by the superset_config.py file which leaves CELERY_CONFIG as None and defaults the Celery broker to amqp://guest:**@127.0.0.1:5672.

Would love to help with the Docker build, but I'm new to the repo, and it would seem as though there are a bunch of improvements to the Docker build in a PR already!

@mistercrunch
Copy link
Member

Ah. Personally in my sandboxes I tend to create a ~/superset_pythonpath/ folder somewhere, putting my superset_config.py in there, and setting a export PYTHONPATH=~/superset_pythonpath/ in shells

@apimastery
Copy link

There are other open issues for the same problem, it seems:

Here is what worked for me:

In docker-compose.yml, comment out the volumes config - the Docker image already contains those directories and their files:

#volumes:
#  - .:/home/work/incubator-superset
#  - superset-node-modules:/home/work/incubator-superset/superset/assets/node_modules

Then execute:
docker-compose up -d
docker-compose exec superset bash

Once inside the container, edit docker-init.sh (e.g. using vim or vi) - comment out the npm run build command:
# cd superset/assets && npm run build && cd ../../
The command isn't really needed because the Docker image build runs it.

Next start the application up by executing:
bash docker-init.sh

I'm glad to see recent commits to the master branch to fix in in docker-init.sh the host (0.0.0.0) so the container is accessible from something other than localhost and port (8088) to match the port in docker-compose.yml so the health check succeeds...

HTH

@stale
Copy link

stale bot commented Apr 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive Inactive for >= 30 days label Apr 10, 2019
@stale stale bot closed this as completed Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive Inactive for >= 30 days
Projects
None yet
Development

No branches or pull requests

3 participants