配置Chef服务器时出错

时间:2015-01-13 10:09:57

标签: chef

我正在使用Linux机器。我已使用此命令rpm -Uvh chef-server-11.1.6-1.el6安装了开源厨师服务器,chef-server-11.1.6-1.el6.x86_64.rpm。 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

1 个答案:

答案 0 :(得分:1)

失败的命令是:

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

返回代码8

当我刚刚进行测试时,我收到了消息usermod: user xxx is currently used by process yyy的8,所以也许你需要停止postgres并再次尝试命令。另外,请确保以root用户身份运行chef-server-ctl进程