Error 111 connecting to localhost:6379. Connection refused.
Hi,
cool project!
I am trying to run the project locally and got : Error 111 connecting to localhost:6379. Connection refused.
seems that the Redis is missing from the project - can you please give a full explanation of how to run locally? (I also add some values to the database in order to find the language )
if it simply needs Redis (without ant configs) - no need to add -
but worth mention at the readme
Hey, thanks. Yeah, you need redis (or any message queue) running.
You can quickly set one up with docker:
docker run --name my-redis -d -p 6379:6379 redis redis-server --appendonly yes
Thank @areebbeigh. I added also the following confs:
CELERY_RESULT_BACKEND = "redis" CELERY_REDIS_HOST = "localhost" CELERY_REDIS_PORT = 6379 CELERY_REDIS_DB = 0
what should I add to: CELERY_BROKER_URL = 'pyamqp://'
it's seems that the sync doesn't works correctly (probably wrong setup)
Broker url would be "redis://"
@areebbeigh - I think that I am doing something wrong: I run the following components: backend + frontend + Redis
with the default configuration (python manga runserver / npm start / redis docker)
@areebbeigh - I think that I am doing something wrong: I run the following components: backend + frontend + Redis
with the default configuration (python manga runserver / npm start / redis docker)
What isn't working? Is the web app up? Run requests get created in the backend?
You also need to run the codeinterview-sandbox for actual code execution to happen.
Hi @areebbeigh, web page - UP I did not start the sandbox - did not know it's related.
so I need to build the docker image at https://github.com/areebbeigh/codeinterview-sandbox and how to run it? (celery -A run worker -l info??)
ok, now I have a different issue with the sendbox - does the send box need rabbitMQ?
Cannot connect to amqp://guest:**@127.0.0.1:5672//:
i changed the configuration to redis - the sandbox is up/
CELERY_BROKER_URL = os.environ.get('REDIS_URL')
CELERY_RESULT_BACKEND = os.environ.get('REDIS_URL')
CELERY_BROKER_URL = 'redis://'
CELERY_RESULT_BACKEND = "redis" CELERY_REDIS_HOST = "localhost" CELERY_REDIS_PORT = 6379 CELERY_REDIS_DB = 0
ok, now I have a different issue with the sendbox - does the send box need rabbitMQ?
Cannot connect to amqp://guest:**@127.0.0.1:5672//:
Yup, you have to point the sandbox workers to the same message queue the web app pushes to. You can use redis for this. amqp:// is rabbitmq
I did it! all seems to work fine but still, i have the same problem:
- sync is not working
- result is missing
the web page is up and running.
maybe I need to connect the backend to the sandbox in some way?
maybe something is missing in the database?
because I had to add manually the rows for the language.
it seems that the request sent from the webpage to the backend and dispatch celery task via dispatch_run_task.
but it's seems that the celery sandbox did not act on the task dispatch - checking why now
I think I found the problem - wsl issue...:
the code that checks if the docker image exists returns a different exception and gets unhandled -- I will build manually and fix it later.
the exception happens in self.image = self.client.images.get( settings.DOCKER_IMAGE_FULL_NAME)
getting :
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
more issues - docker runtime issue at wsl - remove secure runtime.
now it seems to be stack at the celery when I run it manually.