Gitlab Webservice container has broken Postgres SQL Connection
Summary
While trying to spin up the Gitlab-webservices docker image in a local environment, the process fails with an error message indicating that the application is unable to establish a connection with Postgresql. The error message suggests that the server may not be running on the host or that it may not be accepting TCP/IP connections.
Steps to reproduce
- Set up a local environment with Docker installed.
- Pull the Gitlab-webservices docker image.
- Start the
Gitlab-webservices container using docker run -e GITLAB_WEBSERVER="PUMA" registry1.dso.mil/ironbank/gitlab/gitlab/gitlab-webservice:15.9.2
- Check the logs for any error messages.
What is the current bug behavior?
Unable to load application: ActiveRecord::ConnectionNotEstablished: connection to server at \"127.0.0.1\", port 5432 failed: Connection refused\n\tIs the server running on that host and accepting TCP/IP connections?\nconnection to server at \"::1\", port 5432 failed: Cannot assign requested address\n\tIs the server running on that host and accepting TCP/IP connections?\n"}
bundler: failed to load command: puma (/srv/gitlab/vendor/bundle/ruby/2.7.0/bin/puma)
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/postgresql_adapter.rb:83:in `rescue in new_client': connection to server at "127.0.0.1", port 5432 failed: Connection refused (ActiveRecord::ConnectionNotEstablished)
What is the expected correct behavior?
The Gitlab-webservices docker image should be able to establish a connection with Postgresql and run without any errors.
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
Tasks
-
Bug has been identified and corrected within the container
Please read the Iron Bank Documentation for more info