При попытке запустить PostgreSQL я получаю это «пустое» сообщение об ошибке:
root@mountain-lion:/home/ubuntu# service postgresql start
* Starting PostgreSQL 9.1 database server
* Error: could not exec /usr/lib/postgresql/9.1/bin/pg_ctl /usr/lib/postgresql/9.1/bin/pg_ctl start -D /vol/postgres -l /var/log/postgresql/postgresql-9.1-main.log -s -o -c config_file="/etc/postgresql/9.1/main/postgresql.conf" :
Это недавно установленный сервер Ubuntu 11.10 (на EC2 / Scalarium) с postgresql-9.1
только что установлен через apt-get
.
В postgresql.conf есть одно значение конфигурации изменения:
data_directory = '/vol/postgres'
/vol/postgres
выглядит так
drwx------ 5 postgres postgres 38 2012-05-18 15:13 base
drwx------ 2 postgres postgres 4096 2012-05-18 15:13 global
drwx------ 2 postgres postgres 17 2012-05-18 15:12 pg_clog
drwx------ 4 postgres postgres 34 2012-05-18 15:12 pg_multixact
drwx------ 2 postgres postgres 17 2012-05-18 15:13 pg_notify
drwx------ 2 postgres postgres 6 2012-05-18 15:12 pg_serial
drwx------ 2 postgres postgres 24 2012-05-18 15:13 pg_stat_tmp
drwx------ 2 postgres postgres 17 2012-05-18 15:12 pg_subtrans
drwx------ 2 postgres postgres 6 2012-05-18 15:12 pg_tblspc
drwx------ 2 postgres postgres 6 2012-05-18 15:12 pg_twophase
-rw------- 1 postgres postgres 4 2012-05-18 15:12 PG_VERSION
drwx------ 3 postgres postgres 58 2012-05-18 15:12 pg_xlog
-rw------- 1 postgres postgres 133 2012-05-18 15:13 postmaster.opts
lrwxrwxrwx 1 root root 36 2012-05-18 15:13 server.crt -> /etc/ssl/certs/ssl-cert-snakeoil.pem
lrwxrwxrwx 1 root root 38 2012-05-18 15:13 server.key -> /etc/ssl/private/ssl-cert-snakeoil.key
Любая идея?
Обновить: Когда я установил data_directory
по умолчанию (/var/lib/postgresql/9.1/main
) он работает нормально, значит, в этом конкретном изменении должно быть что-то не так.
Исправлена. Сначала я сменил владельца /vol/postgres
к postgres
(после комментариев по вопросу). Это привело к следующей понятной ошибке:
* The PostgreSQL server failed to start. Please check the log output:
2012-05-25 07:50:13 GMT FATAL: data directory "/vol/postgres" has group or world access
2012-05-25 07:50:13 GMT DETAIL: Permissions should be u=rwx (0700).
Итак, я сделал то, что он сказал, и теперь оно начинается.