2015-06-26 179 views
0

sudo的厨师服务器-CTL重新配置失败 运行失败与folloing错误厨师服务器安装在RHEL

STDERR: createdb: could not connect to database template1: could not connect to server: No such file or directory 
 
    \t Is the server running locally and accepting 
 
    \t connections on Unix domain socket "/tmp/.s.PGSQL.5432"? 
 
    ---- End output of createdb --template template0 --encoding UTF-8 opscode-pgsql ---- 
 
    Ran createdb --template template0 --encoding UTF-8 opscode-pgsql returned 1

I have tried multiple options suggested in other posts like: 
1) chmod 777 /tmp 
2) $ sudo mkdir /var/pgsql_socket/ 
3) Ensure localhost entry is present under /etc/hosts 

However, I do not see any socket definition in /tmp 
or 
/usr/local/var/postgres/postgresql.conf 
+0

情侣问题的价值,你运行的是什么版本的厨师?你还在运行什么版本的Redhat。这是干净的安装还是升级? –

+0

这实际上是Oracle Linux 6.6,它基于RHEL映像。厨师服务器的版本是12.1.0 ...我以前曾经安装过以前版本的Chef Server。我没有升级,但做了全新的干净安装 – sjn

回答

0

终于找到了问题:

Check the Log file at: /var/log/opscode/postgresql/9.2/current

这是由于以下错误:

could not create shared memory segment: Invalid argument 
2015-06-29_21:06:45.92874 DETAIL: Failed system call was shmget(key=5432001, size=2012045312, 03600). 

你需要编辑/etc/sysctl.conf并加入适合于以下行大小错误:

kernel.shmmax = 3022045312

然后运行:

sudo sysctl -p

或者,您也可以编辑/etc/postgresql//main/postgresql.conf和减少参数shared_buffers

0

如果我猜的话,我会说你可能在Redhat 7上,目前不支持。

+0

这实际上是Oracle Linux 6.6,它基于RHEL映像。厨师服务器的版本是12.1.0 ...我以前曾经安装过以前版本的Chef Server。我不是升级,而是进行全新的全新安装 – sjn