Hey there, i'm using the pact cli tools docker ima...
# pact-broker
f
Hey there, i'm using the pact cli tools docker image, and i'm getting the following error:
Copy code
bundler: failed to load command: /pact/bin/pact (/pact/bin/pact)
/usr/lib/ruby/2.7.0/net/http.rb:960:in `initialize': execution expired (Net::OpenTimeout)
        from /usr/lib/ruby/2.7.0/net/http.rb:960:in `open'
        from /usr/lib/ruby/2.7.0/net/http.rb:960:in `block in connect'
        from /usr/lib/ruby/2.7.0/timeout.rb:105:in `timeout'
        from /usr/lib/ruby/2.7.0/net/http.rb:958:in `connect'
        from /usr/lib/ruby/2.7.0/net/http.rb:943:in `do_start'
        from /usr/lib/ruby/2.7.0/net/http.rb:932:in `start'
        from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/hal/http_client.rb:79:in `block in perform_request'
        from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/hal/http_client.rb:93:in `until_truthy_or_max_times'
        from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/hal/http_client.rb:64:in `perform_request'
        from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/hal/http_client.rb:25:in `get'
        from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/hal/link.rb:41:in `get'
        from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/hal/link.rb:45:in `get!'
        from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/hal_client_methods.rb:20:in `index_resource'
        from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/publish_pacts.rb:31:in `call'
        from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/publish_pacts.rb:14:in `call'
        from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/cli/broker.rb:157:in `publish_pacts'
        from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/cli/broker.rb:42:in `publish'
        from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
        from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/cli/custom_thor.rb:15:in `start'
        from /pact/lib/pact/cli.rb:40:in `broker'
        from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
        from /pact/bin/pact:15:in `<top (required)>'
        from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:63:in `load'
        from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:63:in `kernel_load'
        from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:28:in `run'
        from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli.rb:474:in `exec'
        from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
        from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli.rb:30:in `dispatch'
        from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
        from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli.rb:24:in `start'
        from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/exe/bundle:49:in `block in <top (required)>'
        from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
        from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/exe/bundle:37:in `<top (required)>'
        from /usr/bin/bundle:25:in `load'
        from /usr/bin/bundle:25:in `<main>'
using the following command on linux:
Copy code
docker run --rm -w ${PWD} -v ${PWD}:${PWD} -e PACT_BROKER_BASE_URL -e PACT_BROKER_TOKEN pactfoundation/pact-cli:latest broker publish ${PWD} --consumer-app-version "POC1" c:\pacts\*.json --broker-base-url PACT_BROKER_BASE_URL  --broker-token PACT_BROKER_TOKEN
For context, this is a poc for other team that is trying to do the initial consumer tests.
m
Are you sure it accepts a * in the path?
What does the verbose logging say if you enable it?
b
Try just giving it the directory without the "*.json"
f
problem solved. it was just a problem between windows and wsl communication. we were using docker inside wsl
🤔 1