I’ve been building on Travis-CI and testing with RabbitMQ for 6 months and today it stopped working with “Connection refused.”
Caused by: java.net.ConnectException: Connection refused (Connection refused)
I am using all the defaults per documentation:
- localhost and port -1 (choose best default; was previously working)
- 127.0.0.1 and port 5672 (fails)
Ideas?
We are switching the default Ubuntu release from Trusty to Xenial
The database services no longer starts by default, so you’ll need to explicitly instruct them to start.
@BanzaiMan Thanks! Is there any plan for Xenial to support RabbitMQ tests?
For readers, I added the following to the .travis.yml
and testing with RabbitMQ now works:
os: linux
dist: trusty
Best,
Vaughn
Ah, right. RabbitMQ is not pre-installed. https://docs.travis-ci.com/user/reference/xenial#databases-and-services
What you need is:
dist: xenial
addons:
packages:
- rabbitmq-server
services:
- rabbitmq
@BanzaiMan Strangely that didn’t work. The tests fail when attempting to install rabbitmq-server
.
Thanks, your example worked. Your previous post was missing one of the keys (apt:
) and I don’t know the config well enough to have recognized it.
dist: xenial
addons:
apt:
packages:
- rabbitmq-server
services:
- rabbitmq
Thanks again.
Best,
Vaughn
1 Like
Ooops! Thanks for spotting my mistake!