is there a way to change the pact broker port ?
# pact-js
c
is there a way to change the pact broker port ?
t
Yes?
for pact-js, just put it in the url
or are you asking about something else?
m
c
this is the error I get if I use a central broker
ERROR: Error making request - Errno::ECONNREFUSED Failed to open TCP connection to meufavcpy3.execute-api.eu-west-2.amazonaws.com:80 (Connection refused - connect(2) for "meufavcpy3.execute-api.eu-west-2.amazonaws.com" port 80) /Users/sguttarlapalli/IPV/di-ipv-spot/node-functions/messages/node_modules/@pact-foundation/pact-core/standalone/darwin-1.91.0/pact/lib/vendor/ruby/2.4.0/gems/pact_broker-client-1.65.0/lib/pact_broker/client/hal/http_client.rb79in `block in perform_request', attempt 1 of 5
t
Is your broker actually there and listening on that port?
c
yes
t
What happens if you go to it in a browser?
c
I can log in ok in a browser
but when I run publish from the folder I get this error
t
Well, I get connection refused when I click that link
c
that may be because its secure to our local env
are u accesing from outside uk?
t
What happens if you click that link?
Have you misspelt it?
Does your browser have a proxy?
c
it asks for username and password
t
I suspect there is something different between your browser and the command line
try doing a curl of that url
c
outside of the country it may not work as its our secure aws environment , due to our restrictions
t
Or have a look in your AWS logs
c
seems the broker is down , let me get it up
this seems to be working
t
So, if it’s working in your browser but not on the command line, my question would be - what is different between the command line and the browser?
c
I presume pact only allows 9292 for broker
is there a way we can tell it to look at a new port
t
Why do you think it only allows 9292?
c
on pacs docs it says u need permissions to run on a port below 1024
t
yes, that’s an operating system thing
c
here it says default
how do I Amend it to look at 80?
t
If you’re able to access the broker at that url, then you’re already running it on port 80
☝️ 1
c
it works in browser only
t
As I said above, if you can access it in the browser but not on the command line, then something is different between the two. I can’t help you any more than that, I’m sorry
c
ok thanks
m
I can access that URL here in Australia, from my laptop (both CLI and browser) That tells me (and as Tim has stated) there is something about your network or environment that's different. It could be proxy settings (you either need them or you need to exclude them) or routing is different. You need to discuss that with your network/ops team
This page may have some tips if it is proxy related: https://docs.pact.io/implementation_guides/ssl