Issue with changing default port for Airbyte PostgreSQL database

Summary

The user is facing issues after changing the default port of the Airbyte PostgreSQL database from 5432 to 5433. The database seems to be still trying to listen on port 5432 despite the configuration change.


Question

Hi everyone, I installed airbyte using the below instructions:

https://docs.airbyte.com/deploying-airbyte/docker-compose

The default port of postgres (5432) force stopped the default postgres port which was already running. So I changed the default port of aibyte-db from 5432 to 5433 like below:

DATABASE

Airbyte Internal Job Database, see https://docs.airbyte.io/operator-guides/configuring-airbyte-db

DATABASE_USER=docker
DATABASE_PASSWORD=docker
DATABASE_HOST=db
DATABASE_PORT=5433
DATABASE_DB=airbyte

translate manually DATABASE_URL=jdbc:postgresql://${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB} (do not include the username or password here)

DATABASE_URL=jdbc:postgresql://db:5433/airbyte
JOBS_DATABASE_MINIMUM_FLYWAY_MIGRATION_VERSION=0.40.26.001

When I restart with the following commands:
docker compose down
./run-ab-platform.sh

Now I get:

airbyte-db | PostgreSQL Database directory appears to contain a database; Skipping initialization
airbyte-db |
airbyte-db | 2024-08-13 05:41:02.199 UTC [1] LOG: starting PostgreSQL 13.15 on x86_64-pc-linux-musl, compiled by gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309, 64-bit
airbyte-db | 2024-08-13 05:41:02.200 UTC [1] LOG: listening on IPv4 address “0.0.0.0”, port 5432
airbyte-db | 2024-08-13 05:41:02.200 UTC [1] LOG: listening on IPv6 address “::”, port 5432

airbyte-temporal | Waiting for PostgreSQL to startup.
airbyte-temporal | Waiting for PostgreSQL to startup.
airbyte-temporal | Waiting for PostgreSQL to startup.
airbyte-temporal | Waiting for PostgreSQL to startup.
airbyte-temporal | Waiting for PostgreSQL to startup.
airbyte-temporal | Waiting for PostgreSQL to startup.
airbyte-temporal | Waiting for PostgreSQL to startup.
airbyte-temporal | Waiting for PostgreSQL to startup.
airbyte-temporal | Waiting for PostgreSQL to startup.
airbyte-bootloader | 2024-08-13 05:41:16 WARN i.m.s.r.u.Loggers$Slf4JLogger(warn):299 - [4a349a9b, L:/127.0.0.1:48219 - R:localhost/127.0.0.1:8125] An exception has been observed post termination, use DEBUG level to see the full stack: java.net.PortUnreachableException: recvAddress(…) failed: Connection refused

I am not sure if I am missing something here. Request assistance here



This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. Click here if you want
to access the original thread.

Join the conversation on Slack

["airbyte", "postgres", "database", "port-change", "docker-compose"]

docker compose is deprecated method, I recommend using abctl https://docs.airbyte.com/using-airbyte/getting-started/oss-quickstart

I see this too. I get the errors.http.badGateway then sometimes a few minutes later it lets me log in. Sometimes I think restarting the control plane in docker desktop helps, but other times, it just starts working without any action from me.

Thanks a lot <@U05JENRCF7C> I’m gonna redirect that page to abctl

<@U05JENRCF7C> I used abctl to install airbyte. Now I am facing Airbyte is temporarily unavailable. Please try again. (HTTP 502)

{
“url”: “http://localhost:8000/login”,
“airbyteVersion”: “0.63.18”,
“errorType”: “HttpError”,
“errorConstructor”: “md”,
“error”: {
“i18nKey”: “errors.http.badGateway”,
“i18nParams”: {
“status”: 502
},
“name”: “HttpError”,
“requestId”: “k2aCA5F2LGCbR44Z74tcdn”,
“request”: {
“url”: “/api/v1/instance_configuration”,
“method”: “get”
},
“status”: 502,
“response”: “\n<html>\n<head>\n<title>Error</title>\n<style>\nhtml { color-scheme: light dark; }\nbody { width: 35em; margin: 0 auto;\nfont-family: Tahoma, Verdana, Arial, sans-serif; }\n</style>\n</head>\n<body>\n<h1>An error occurred.</h1>\n<p>Sorry, the page you are looking for is currently unavailable.<br/>\nPlease try again later.</p>\n<p>If you are the system administrator of this resource then you should check\nthe error log for details.</p>\n<p><em>Faithfully yours, nginx.</em></p>\n</body>\n</html>\n”
},
“stacktrace”: “HttpError: errors.http.badGateway\n at Cve (http://localhost:8000/assets/core-ifmp44c8rf.js:119:10478)”,
“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36”,
“featureFlags”: {}
}

Sometimes it logs me in but is very slow to respond. Then after sometime it logs me out and then throws this error. I am not sure why I am facing this suddenly because I have been using airbyte for a POC to migrate data and it has been smooth until now. Could you please suggest what could be the reasons for this behaviour?