配置厨师服务器期间出错

Error during configure the chef server

我正在使用 Linux machine.I 已经安装了开源 Chef 服务器,chef-server-11.1.6-1.el6。x86_64.rpm 使用此命令 rpm -Uvh chef-服务器-11.1.6-1.el6.x86_64.rpm。 在下一步中,当我尝试通过 chef-server-ctl reconfigure 命令对其进行配置时,它卡在了 here.I 上,因此进行了很多搜索。还是不明白这里出了什么问题? 有任何想法吗?关于这个错误?还是我做错了什么?

Recipe: chef-server::postgresql

              * user[opscode-pgsql] action create
    ================================================================================
    Error executing action `create` on resource 'user[opscode-pgsql]'
    ================================================================================


    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '8'
    ---- Begin output of ["usermod", "-d", "/var/opt/chef-server/postgresql", "opscode-pgsql"] ----
    STDOUT: 
    STDERR: usermod: user opscode-pgsql is currently logged in
    ---- End output of ["usermod", "-d", "/var/opt/chef-server/postgresql", "opscode-pgsql"] ----
    Ran ["usermod", "-d", "/var/opt/chef-server/postgresql", "opscode-pgsql"] returned 8


    Resource Declaration:
    ---------------------
    # In /opt/chef-server/embedded/cookbooks/chef-server/recipes/postgresql.rb

     24: user node['chef_server']['postgresql']['username'] do
     25:   system true
     26:   shell node['chef_server']['postgresql']['shell']
     27:   home node['chef_server']['postgresql']['home']
     28: end
     29: 



    Compiled Resource:
    ------------------
    # Declared in /opt/chef-server/embedded/cookbooks/chef-server/recipes/postgresql.rb:24:in `from_file'

    user("opscode-pgsql") do
      action :create
      supports {:manage_home=>false, :non_unique=>false}
      retries 0
      retry_delay 2
      guard_interpreter :default
      username "opscode-pgsql"
      home "/var/opt/chef-server/postgresql"
      shell "/bin/sh"
      system true
      cookbook_name :"chef-server"
      recipe_name "postgresql"
    end




    Running handlers:
    [2015-01-13T15:18:19+05:30] ERROR: Running exception handlers
    Running handlers complete

    [2015-01-13T15:18:19+05:30] ERROR: Exception handlers complete
    [2015-01-13T15:18:19+05:30] FATAL: Stacktrace dumped to /opt/chef-server/embedded/cookbooks/cache/chef-stacktrace.out
    Chef Client failed. 25 resources updated in 12.988322931 seconds
    [2015-01-13T15:18:19+05:30] ERROR: user[opscode-pgsql] (chef-server::postgresql line 24) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '8'
    ---- Begin output of ["usermod", "-d", "/var/opt/chef-server/postgresql", "opscode-pgsql"] ----
    STDOUT: 
    STDERR: usermod: user opscode-pgsql is currently logged in
    ---- End output of ["usermod", "-d", "/var/opt/chef-server/postgresql", "opscode-pgsql"] ----
    Ran ["usermod", "-d", "/var/opt/chef-server/postgresql", "opscode-pgsql"] returned 8

失败的命令是:

usermod -d /var/opt/chef-server/postgresql opscode-pgsql

其返回码8

当我刚刚进行测试时,当消息 usermod: user xxx is currently used by process yyy 时我得到了 8,所以也许您需要停止 postgres 并再次尝试该命令。还要确保你是 运行 chef-server-ctl 进程作为 root 用户