I have an issue running the pact-protobuf-plugin b...
# general
j
I have an issue running the pact-protobuf-plugin binary inside a Docker container. I'm using pactflow/pact-protobuf-plugin v0.1.7. When running Pact tests, the tests fail. I tracked this to the plug-in binary failing to start due to "Cannot assign requested address".
Copy code
# /root/.pact/plugins/protobuf-0.1.7/pact-protobuf-plugin
Error: Os { code: 99, kind: AddrNotAvailable, message: "Cannot assign requested address" }
This happens on the maven:3-openjdk-17-slim (and other maven images) and also on ubuntu:latest. I think there is an issue with the plug-in attempting to bind
::1
, an IPv6 address, which is not supported in containers by default. Is there a workaround for getting the pact-protobuf-plugin binary to listen on a different localhost address? I need to be able to run Pact tests inside a container as part of a build pipeline.
r
I'll have a look at what is happening. It should try an IP4 address if the IP6 one failes.
👍 1
m
Also Check your host entries. If localhost is defined for both ipvr and 6 but your network stack doesn't support it that may also be a problem. Or you could always use 127.0.0.1 instead of localhost
j
@Matt (pactflow.io / pact-js / pact-go) This happens in standard Docker containers. You can reproduce it quickly with this:
Copy code
docker run --rm -it ubuntu:latest bash
apt-get update && apt-get install -y wget
wget --quiet <https://github.com/pactflow/pact-protobuf-plugin/releases/download/v-0.1.7/install-plugin.sh>
bash install-plugin.sh
~/.pact/plugins/protobuf-0.1.7/pact-protobuf-plugin
r
I think I added a command line parameter to force IP4 addresses just for docker images.
Ah, no, I thought about adding that parameter. I'll raise a ticket for this on our backlog.
gratitude thank you 1
😆 1
🙌 2