docker-magento: onelinesetup - Could not connect to Amqp Server on WSL2
I’m trying to run onelinesetup on a Windows 10 machine with WSL2 as the docker backend. I’m getting the following error after the containers are bounced following running Composer:
+ bin/setup magento.test
Stopping new-project_app_1 ...
Stopping new-project_phpfpm_1 ...
Stopping new-project_redis_1 ...
Stopping new-project_db_1 ...
Stopping new-project_elasticsearch_1 ...
Stopping new-project_rabbitmq_1 ...
Stopping new-project_redis_1 ... done
Stopping new-project_elasticsearch_1 ... done
Stopping new-project_rabbitmq_1 ... done
Stopping new-project_app_1 ... done
Stopping new-project_phpfpm_1 ... done
Stopping new-project_db_1 ... done
Starting new-project_rabbitmq_1 ...
Starting new-project_db_1 ...
Starting new-project_elasticsearch_1 ...
Starting new-project_redis_1 ...
Starting new-project_redis_1 ... done
Starting new-project_db_1 ... done
Starting new-project_phpfpm_1 ...
Starting new-project_elasticsearch_1 ... done
Starting new-project_rabbitmq_1 ... done
Starting new-project_phpfpm_1 ... done
Starting new-project_app_1 ...
Starting new-project_app_1 ... done
Waiting for connection to Elasticsearch...
.Could not connect to the Amqp Server.
When I had a look at the logs for the rabbitmq container (which appears to be starting and running), I see:
2021-03-09 16:55:02.653 [info] <0.9.0> Server startup complete; 3 plugins started.
* rabbitmq_management
* rabbitmq_management_agent
* rabbitmq_web_dispatch
2021-03-09 16:55:07.557 [info] <0.624.0> accepting AMQP connection <0.624.0> (172.23.0.6:36534 -> 172.23.0.4:5672)
2021-03-09 16:55:07.563 [error] <0.624.0> Error on AMQP connection <0.624.0> (172.23.0.6:36534 -> 172.23.0.4:5672, user: 'guest', state: opening): vhost C:/Program Files/Git/ not found
2021-03-09 16:55:07.563 [info] <0.624.0> closing AMQP connection <0.624.0> (172.23.0.6:36534 -> 172.23.0.4:5672, vhost: 'none', user: 'guest')
So it’s trying to run GIT to pull something, but it’s looking for a DOS directory path. I do have GIT installed in C:/Program Files/Git/, but I’m wondering if mount points are confused that it’s looking for a DOS path.
Is the fact that I’m using WSL2 the problem here? Has anyone else got this to work?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 38 (18 by maintainers)
Commits related to this issue
- Fix VM mem limits on RabbitMQ #426 — committed to markshust/docker-magento by markshust 3 years ago
- Added sleep to prevent connecting to Elasticsearch too quickly #426 — committed to markshust/docker-magento by markshust 3 years ago
- Increase RabbitMQ sleep timeout to 10 #426 — committed to markshust/docker-magento by markshust 3 years ago
- Fix RabbitMQ connection issues on Windows #426 — committed to markshust/docker-magento by markshust 3 years ago
+1 on this error. And yes I have git installed.
I was able to get it fixed by changing the bin/setup command
And also added the environment configuration in the docker image
I’m not sure if the error was because we used a guest account, or it’s because we used the default (no) vhost. Anyhow, try the solution I wrote above if you’re getting the same error.
same error here!
Win 10 Docker version 20.10.7, build f0df350 docker-compose version 1.29.2, build 5becea4c
That worked for me! 😄
@Inbary-s sorry about this! Can you try again now?
I’ll re-open for visibility… is anyone else getting this error?