Using a RabbitMQ service to test NPM package #25895
-
Hiya folks! Has anyone had any luck using a RabbitMQ service? I’ve tried a few different ways but can’t seem to be able to connect to the instance; I always get an ENOTFOUND error. Here’s a smattering of snippets I’ve tried thus far, with REMIT_URL being the RabbitMQ address to connect to: Using a container:
Using a VM:
Both VM and container methods (adjusting between localhost and rabbitmq accordingly), while also using health checks:
Both VM and container methods (adjusting between localhost and rabbitmq accordingly), while also using ufoscout/docker-compose-wait to wait for the RabbitMQ instance to be available (the check times out waiting):
Am I missing something obvious? I don’t have too much experience with compose files so I may well be making a rookie error here, but if that’s not the case then what’s the best way to proceed debugging this? Thanks folks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Upon further investigation, it seems I’m just struggling to get the rabbitmq container to run. I can get it working locally and the health checks pass okay, but it just never seems to boot inside a GHA VM. What’s the best way of debugging the container that’s failing to start healthily here? |
Beta Was this translation helpful? Give feedback.
-
Following @dentarg’s example in actions/example-services#3, I now have it working, so I guess I’ll post this as the solution. The config that finally seemed to work was using a VM (so not utilising container > image ) and the following services block:
Alongside accessing the instance using:
As mentioned in the issue, I’m not really sure whether this is a meaningful change or whether something was fixed behind the scenes, but it works now! Thanks for the fantastic work! |
Beta Was this translation helpful? Give feedback.
Following @dentarg’s example in actions/example-services#3, I now have it working, so I guess I’ll post this as the solution.
The config that finally seemed to work was using a VM (so not utilising container > image ) and the following services block:
Alongside accessing the instance using:
As mentioned in the issue, I’m not really sure whether this is a meaningful change or whether something was fixed behind the scenes, but it works …