VijayVishnu
VijayVishnu

Reputation: 537

Error during configure the chef server

I am using Linux machine.I have installed Open Source chef server, chef-server-11.1.6-1.el6.x86_64.rpm with this command rpm -Uvh chef-server-11.1.6-1.el6.x86_64.rpm. In the next step, When I am trying to configure it by chef-server-ctl reconfigure command It stuck with here.I searched a lot with this. Still cant get what is wrong here? Any ideas? about this error? or Am I doing anything wrong?

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

Upvotes: 0

Views: 891

Answers (1)

arco444
arco444

Reputation: 22861

The command that is failing is:

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

Its returning code 8

When I just did a test I got an 8 when the message usermod: user xxx is currently used by process yyy, so maybe you need to stop postgres and try the command again. Also make sure you're running the chef-server-ctl process as the root user

Upvotes: 1

Related Questions