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

empty database directory causing database startup errors #72

Closed
ghost opened this issue Mar 3, 2015 · 5 comments
Closed

empty database directory causing database startup errors #72

ghost opened this issue Mar 3, 2015 · 5 comments

Comments

@ghost
Copy link

ghost commented Mar 3, 2015

I am having trouble deploying to a custom directory /opt/data1

$ cat /etc/lsb-release ; uname -a
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"
Linux postgesql-1 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:36:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

TASK: [PostgreSQL | Restart PostgreSQL] ***************************************
failed: [postgres_1] => {"failed": true}
msg: * Stopping PostgreSQL 9.3 database server

  • Error: pid file is invalid, please manually kill the stale server process.
    ...fail!
  • Starting PostgreSQL 9.3 database server
  • Error: Port conflict: another instance is already running on /var/run/postgresql with port 5432
    ...fail!

FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
to retry, use: --limit @/home/mark/postgres.retry

postgres_1 : ok=9 changed=8 unreachable=0 failed=1

so I removed the .pid and now postgres won't start

TASK: [PostgreSQL | Ensure PostgreSQL is running] *****************************
failed: [postgres_1] => {"failed": true}
msg: * Starting PostgreSQL 9.3 database server

  • The PostgreSQL server failed to start. Please check the log output:
    2015-03-03 05:21:20 UTC FATAL: "/opt/data1/9.3/main" is not a valid data directory
    2015-03-03 05:21:20 UTC DETAIL: File "/opt/data1/9.3/main/PG_VERSION" is missing.
    ...fail!

FATAL: all hosts have already failed -- aborting


I looked at /opt/data1/9.3/main and the directory is empty.

@ghost
Copy link
Author

ghost commented Mar 3, 2015

this problem only occurs if I change the data directory in the defaults/main.yml to /opt/data1.

@ghost
Copy link
Author

ghost commented Mar 3, 2015

Duplicate of: Errors when defining postgresql_pg_hba_default and postgresql_data_directory #42

@aoyawale
Copy link
Contributor

Is this still an issue?

@aoyawale
Copy link
Contributor

This can be closed as it has been addressed in other tickets.

@ghost
Copy link
Author

ghost commented Mar 29, 2018

I don't know. I am able to move data directories fine so you can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants