Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abctl install fails with postgres permissions error #41063

Closed
sunboy opened this issue Jul 9, 2024 · 6 comments
Closed

abctl install fails with postgres permissions error #41063

sunboy opened this issue Jul 9, 2024 · 6 comments
Labels
area/abctl Issues with the abctl quickstart cli community proj/abctl team/deployments type/bug Something isn't working

Comments

@sunboy
Copy link

sunboy commented Jul 9, 2024

What happened?

On MacOS, running abctl localinstall fails with the error below:

2024-07-09 15:09:34.187 UTC [47] FATAL: data directory "/var/lib/postgresql/data/pgdata" has wrong ownership
2024-07-09 15:09:34.187 UTC [47] HINT: The server must be started by the user that owns the data directory.
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data/pgdata"
running bootstrap script ...
ERROR Failed to install airbyte/airbyte Helm Chart
ERROR Unable to install Airbyte locally
ERROR could not install airbyte chart: could not install helm: pre-upgrade hooks failed: 1 error occurred:
* pod airbyte-abctl-airbyte-bootloader failed

What did you expect to happen?

abctl was supposed to finish installation without errors

Abctl Version

$ abctl version
# (version: v0.6.0)

Docker Version

$ docker version
# Client:
 Version:           26.1.0-rd
 API version:       1.44 (downgraded from 1.45)
 Go version:        go1.21.9
 Git commit:        cca8e72
 Built:             Tue Apr 23 16:25:03 2024
 OS/Arch:           darwin/arm64
 Context:           default

Server:
 Engine:
  Version:          25.0.5
  API version:      1.44 (minimum version 1.24)
  Go version:       go1.21.10
  Git commit:       e63daec8672d77ac0b2b5c262ef525c7cf17fd20
  Built:            Sun May 12 07:25:43 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          v1.7.10
  GitCommit:        4e1fe7492b9df85914c389d1f15a3ceedbb280ac
 runc:
  Version:          1.1.12
  GitCommit:        51d5e94601ceffbbd85688df1c928ecccbfa4685
 docker-init:
  Version:          0.19.0
  GitCommit:        

OS Version

# On Mac:
$ uname -a
# Darwin J173XPRX1N 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:13:18 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6030 arm64


@techieshark
Copy link
Contributor

I'm seeing this as well.

FATAL:  data directory "/var/lib/postgresql/data/pgdata" has wrong ownership
HINT:  The server must be started by the user that owns the data directory.

abctl:

abctl version
version: v0.14.2

Docker (actually using colima too, version 0.7.5):

Client: Docker Engine - Community
 Version:           27.2.0
 API version:       1.46 (downgraded from 1.47)
 Go version:        go1.23.0
 Git commit:        3ab4256958
 Built:             Tue Aug 27 14:08:11 2024
 OS/Arch:           darwin/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          27.1.1
  API version:      1.46 (minimum version 1.24)
  Go version:       go1.21.12
  Git commit:       cc13f95
  Built:            Tue Jul 23 19:57:14 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.19
  GitCommit:        2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41
 runc:
  Version:          1.7.19
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

OS:

Darwin machinename.hub 22.6.0 Darwin Kernel Version 22.6.0: Mon Jun 24 01:25:37 PDT 2024; root:xnu-8796.141.3.706.2~1/RELEASE_X86_64 x86_64

Output snippet:

WARNING  Encountered an issue deploying Airbyte:
            Pod: airbyte-db-0.17f3c79e133a25d2
            Reason: BackOff
            Message: Back-off restarting failed container airbyte-db-container in pod airbyte-db-0_airbyte-abctl(745de8a1-69c8-42a9-9a6b-41f8f600ce05)
            Count: 163
            Logs: The files belonging to this database system will be owned by user "postgres".
          This user must also own the server process.

          The database cluster will be initialized with locale "en_US.utf8".
          The default database encoding has accordingly been set to "UTF8".
          The default text search configuration will be set to "english".

          Data page checksums are disabled.

          fixing permissions on existing directory /var/lib/postgresql/data/pgdata ... ok
          creating subdirectories ... ok
          selecting dynamic shared memory implementation ... posix
          selecting default max_connections ... 20
          selecting default shared_buffers ... 400kB
          selecting default time zone ... UTC
          creating configuration files ... ok
          2024-09-10 09:51:21.562 UTC [47] FATAL:  data directory "/var/lib/postgresql/data/pgdata" has wrong ownership
          2024-09-10 09:51:21.562 UTC [47] HINT:  The server must be started by the user that owns the data directory.
          child process exited with exit code 1
          initdb: removing contents of data directory "/var/lib/postgresql/data/pgdata"
          running bootstrap script ...
  DEBUG   Encountered an issue deploying Airbyte:
            Pod: airbyte-db-0.17f3c79e133a25d2
            Reason: BackOff
            Message: Back-off restarting failed container airbyte-db-container in pod airbyte-db-0_airbyte-abctl(745de8a1-69c8-42a9-9a6b-41f8f600ce05)
            Count: 186
            Logs: The files belonging to this database system will be owned by user "postgres".
          This user must also own the server process.

          The database cluster will be initialized with locale "en_US.utf8".
          The default database encoding has accordingly been set to "UTF8".
          The default text search configuration will be set to "english".

          Data page checksums are disabled.

          fixing permissions on existing directory /var/lib/postgresql/data/pgdata ... ok
          creating subdirectories ... ok
          selecting dynamic shared memory implementation ... posix
          selecting default max_connections ... 20
          selecting default shared_buffers ... 400kB
          selecting default time zone ... UTC
          creating configuration files ... ok
          2024-09-10 09:56:36.453 UTC [48] FATAL:  data directory "/var/lib/postgresql/data/pgdata" has wrong ownership
          2024-09-10 09:56:36.453 UTC [48] HINT:  The server must be started by the user that owns the data directory.
          child process exited with exit code 1
          initdb: removing contents of data directory "/var/lib/postgresql/data/pgdata"
          running bootstrap script ...
 WARNING  Encountered an issue deploying Airbyte:
            Pod: airbyte-db-0.17f3c79e133a25d2
            Reason: BackOff
            Message: Back-off restarting failed container airbyte-db-container in pod airbyte-db-0_airbyte-abctl(745de8a1-69c8-42a9-9a6b-41f8f600ce05)
            Count: 186
            Logs: The files belonging to this database system will be owned by user "postgres".
          This user must also own the server process.

          The database cluster will be initialized with locale "en_US.utf8".
          The default database encoding has accordingly been set to "UTF8".
          The default text search configuration will be set to "english".

          Data page checksums are disabled.

          fixing permissions on existing directory /var/lib/postgresql/data/pgdata ... ok
          creating subdirectories ... ok
          selecting dynamic shared memory implementation ... posix
          selecting default max_connections ... 20
          selecting default shared_buffers ... 400kB
          selecting default time zone ... UTC
          creating configuration files ... ok
          2024-09-10 09:56:36.453 UTC [48] FATAL:  data directory "/var/lib/postgresql/data/pgdata" has wrong ownership
          2024-09-10 09:56:36.453 UTC [48] HINT:  The server must be started by the user that owns the data directory.
          child process exited with exit code 1
          initdb: removing contents of data directory "/var/lib/postgresql/data/pgdata"
          running bootstrap script ...
  DEBUG   helm - DEBUG: Add/Modify event for airbyte-abctl-airbyte-bootloader: MODIFIED
  DEBUG   helm - DEBUG: Pod airbyte-abctl-airbyte-bootloader running
  DEBUG   helm - DEBUG: Add/Modify event for airbyte-abctl-airbyte-bootloader: MODIFIED
  DEBUG   helm - DEBUG: warning: Upgrade "airbyte-abctl" failed: pre-upgrade hooks failed: 1 error occurred:
          	* pod airbyte-abctl-airbyte-bootloader failed
  DEBUG   helm - DEBUG: release upgrade failed: pre-upgrade hooks failed: 1 error occurred:
          	* pod airbyte-abctl-airbyte-bootloader failed
  ERROR   Failed to install airbyte/airbyte Helm Chart
  ERROR   Unable to install Airbyte locally
  ERROR   unable to install airbyte chart: unable to install helm: pre-upgrade hooks failed: 1 error occurred:
          	* pod airbyte-abctl-airbyte-bootloader failed

@abuchanan-airbyte
Copy link
Contributor

abuchanan-airbyte commented Sep 10, 2024

We think this could be caused by the latest version of Docker Desktop: docker/for-mac#7415

When I downgraded to docker desktop (for mac) 4.33, that solved this. Alternatively, you can switch to the "grpcfuse" file sharing implementation.

edit: that would help @techieshark at least. The original issue was on an older version of abctl and docker.

@techieshark
Copy link
Contributor

Confirming the downgrade to Docker 4.33 worked for me

@vietpm
Copy link

vietpm commented Sep 27, 2024

I got the same issue on Windows. Downgrade Docker Desktop to 4.33 doesn't work.

@bgroff
Copy link
Contributor

bgroff commented Sep 30, 2024

This has been fixed in the latest release of abctl.

@bgroff bgroff closed this as completed Sep 30, 2024
@vietpm
Copy link

vietpm commented Oct 25, 2024

Looks like it hasn't been fixed on Windows. I upgrade abctl to 0.19 version but it doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/abctl Issues with the abctl quickstart cli community proj/abctl team/deployments type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants