You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have already (please mark the applicable with an x):
Confirmed this is the right place to raise the issue - only issues related to the Dockerization of the Pact Broker should be raised here. Issues related to the Pact Broker application itself should be raised in the Pact Broker project.
Upgraded to the latest Pact Broker Docker image OR
Checked the [CHANGELOG] (/CHANGELOG.md) to see if the issue I am about to raise has been fixed
pact broker client details: eg. pact-ruby-standalone CLI v 1.23.0
Expected behaviour
Works locally in Docker as expected. When deployed, should act simillarly
Actual behaviour
Fails to start pact-broker app instance due the following error in k8s:
/pact_broker/vendor/bundle/ruby/3.2.0/gems/pg-1.5.5/lib/pg/connection.rb:696:in async_connect_or_reset': PG::ConnectionBad: connection to server at "10.168.3.100", port 5432 failed: server closed the connection unexpectedly (Sequel::DatabaseConnectionError)`
Steps to reproduce
Provide a repository, gist or reproducable code snippet so that we can test the problem.
/pact_broker/vendor/bundle/ruby/3.2.0/gems/pg-1.5.5/lib/pg/connection.rb:696:in async_connect_or_reset': PG::ConnectionBad: connection to server at "10.168.3.100", port 5432 failed: server closed the connection unexpectedly (Sequel::DatabaseConnectionError)
from /pact_broker/vendor/bundle/ruby/3.2.0/gems/pg-1.5.5/lib/pg/connection.rb:824:in `connect_to_hosts'
Please ensure you set logging to DEBUG and attach any relevant log files here (or link from a gist).
The text was updated successfully, but these errors were encountered:
xxxsemyonxxx
changed the title
Facing a problem establishing a connection from k8s
Facing a problem establishing a connection with Postgres from k8s
Apr 25, 2024
I would imagine this to be a network configuration issue, where your database is not accessible to the network your pact broker application is running on. This is out of scope for support I am afraid!
Pre issue-raising checklist
I have already (please mark the applicable with an
x
):Software versions
Expected behaviour
Works locally in Docker as expected. When deployed, should act simillarly
Actual behaviour
Fails to start pact-broker app instance due the following error in k8s:
/pact_broker/vendor/bundle/ruby/3.2.0/gems/pg-1.5.5/lib/pg/connection.rb:696:in
async_connect_or_reset': PG::ConnectionBad: connection to server at "10.168.3.100", port 5432 failed: server closed the connection unexpectedly (Sequel::DatabaseConnectionError)`Steps to reproduce
Provide a repository, gist or reproducable code snippet so that we can test the problem.
`FROM pactfoundation/pact-broker:latest
ENV PACT_BROKER_PORT_ENVIRONMENT_VARIABLE_NAME=PACT_BROKER_APPLICATION_PORT
ENV PACT_BROKER_PORT=9292
ENV PACT_BROKER_DATABASE_ADAPTER="postgres"
ENV PACT_BROKER_LOG_LEVEL="DEBUG"
ENV PACT_BROKER_SQL_LOG_LEVEL="DEBUG"
ENV PACT_BROKER_DATABASE_USERNAME="pact_broker"
ENV PACT_BROKER_DATABASE_PASSWORD="xxxxxxxxxxx"
ENV PACT_BROKER_DATABASE_HOST="pact-broker.xxxxxxxxxxxx.us-east-1.rds.amazonaws.com"
ENV PACT_BROKER_DATABASE_NAME="pact_broker"
ENV PACT_BROKER_PUBLIC_HEARTBEAT=true`
Relevent log files
/pact_broker/vendor/bundle/ruby/3.2.0/gems/pg-1.5.5/lib/pg/connection.rb:696:in
async_connect_or_reset': PG::ConnectionBad: connection to server at "10.168.3.100", port 5432 failed: server closed the connection unexpectedly (Sequel::DatabaseConnectionError).......
2024-04-25 20:56:33.389634 I [7:3280] pact-broker -- Connecting to database: -- {:adapter=>"postgres", :user=>"pact_broker", :password=>"*****", :host=>"pact-broker.xxxxxxx.us-east-1.rds.amazonaws.com", :database=>"pact_broker", :encoding=>"utf8", :sql_log_level=>:debug, :enable_caller_logging=>false, :log_warn_duration=>5.0, :pool_timeout=>5, :driver_options=>{:options=>"-c statement_timeout=15s"}, :connect_max_retries=>0}
`
Please ensure you set logging to
DEBUG
and attach any relevant log files here (or link from a gist).The text was updated successfully, but these errors were encountered: