主服务器12重新配置不适用于Ubuntu 14.04

时间:2015-05-04 03:25:38

标签: postgresql ubuntu chef

我试图在Ubuntu 14.04盒子上安装Chef服务器。我已经从网站下载了.deb文件,并使用sudo dpkg -i chef-server-core_12.0.8-1_amd64.deb进行了安装,但是当我执行sudo chef-server-ctl reconfigure时,一切顺利,直到它到达postgresql部分:

Running handlers:
[2015-05-03T23:16:07-04:00] ERROR: Running exception handlers
Running handlers complete
[2015-05-03T23:16:07-04:00] ERROR: Exception handlers complete
[2015-05-03T23:16:07-04:00] FATAL: Stacktrace dumped to /opt/opscode/embedded/cookbooks/cache/chef-stacktrace.out
Chef Client failed. 44 resources updated in 198.107797872 seconds
[2015-05-03T23:16:08-04:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: private-chef_pg_database[opscode-pgsql] (private-chef::postgresql line 127) had an error: Mixlib::ShellOut::ShellCommandFailed: execute[create_database_opscode-pgsql] (/opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/providers/pg_database.rb line 13) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of createdb --template template0 --encoding UTF-8 opscode-pgsql ----
STDOUT: 
STDERR: createdb: could not connect to database template1: FATAL:  role "opscode-pgsql" does not exist
---- End output of createdb --template template0 --encoding UTF-8 opscode-pgsql ----
Ran createdb --template template0 --encoding UTF-8 opscode-pgsql returned 1

我错过任何一步吗? The installation instruction没有说明要执行的任何其他中间任务。

非常感谢您给我的任何帮助。

2 个答案:

答案 0 :(得分:1)

在RHEL6.6上安装chef-server-core-12.0.8-1.el6.x86_64.rpm时出现完全相同的错误。已经完成了https://docs.chef.io/install_server_pre.html中列出的每个pre-req步骤...最后将其归结为系统上有多个版本的Postgres。

在未安装Postgres的系统上尝试了相同的安装和重新配置命令(chef-server-ctl reconfigure)并取得了成功。

HTH。

答案 1 :(得分:0)

无法重现您的问题。厨师服务器12.0.8-1的安装在我的厨房/流浪汉设置上运行良好

实施例

├── Berksfile
├── .kitchen.yml
├── roles
    └── chef-server.json

Berksfile

source "https://supermarket.chef.io"

cookbook "chef-server"

kitchen.yml

---
driver:
  name: vagrant

provisioner:
  name: chef_zero

platforms:
  - name: ubuntu-14.04
    driver:
      network:
        - ["private_network", {ip: "192.168.38.34"}]
      customize:
        memory: 4096

suites:
  - name: default
    run_list:
      - role[chef-server]
    attributes:

角色/厨师server.json

{
  "name": "chef-server",
  "description": "Chef server",
  "run_list": [
    "recipe[chef-server]"
  ]
}