2015-06-26 181 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