{"action":"closed","issue":{"url":"https://api.github.com/repos/chef/chef-server/issues/82","labels_url":"https://api.github.com/repos/chef/chef-server/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/chef/chef-server/issues/82/comments","events_url":"https://api.github.com/repos/chef/chef-server/issues/82/events","html_url":"https://github.com/chef/chef-server/issues/82","id":56597218,"number":82,"title":"Upgrade from Chef 12.0.1 to 12.0.2 errors on upgrade","user":{"login":"Tech356","id":446219,"avatar_url":"https://avatars.githubusercontent.com/u/446219?v=3","gravatar_id":"","url":"https://api.github.com/users/Tech356","html_url":"https://github.com/Tech356","followers_url":"https://api.github.com/users/Tech356/followers","following_url":"https://api.github.com/users/Tech356/following{/other_user}","gists_url":"https://api.github.com/users/Tech356/gists{/gist_id}","starred_url":"https://api.github.com/users/Tech356/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tech356/subscriptions","organizations_url":"https://api.github.com/users/Tech356/orgs","repos_url":"https://api.github.com/users/Tech356/repos","events_url":"https://api.github.com/users/Tech356/events{/privacy}","received_events_url":"https://api.github.com/users/Tech356/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-04T22:24:12Z","updated_at":"2015-02-13T15:20:55Z","closed_at":"2015-02-13T15:20:55Z","body":"When trying to run the `sudo chef-server-ctl upgrade` I get the following error. \r\n\r\n    usermod: user opscode-pgsql is currently used by process ####\r\n\r\nIt happens even if I kill the process before starting the upgrade.\r\n\r\n    [user@server ~]$ sudo chef-server-ctl upgrade\r\n    ok: down: bookshelf: 119s\r\n    ok: down: chef-expander: 118s\r\n    ok: down: chef-server-webui: 118s\r\n    ok: down: chef-solr: 114s\r\n    ok: down: erchef: 114s\r\n    ok: down: nginx: 114s\r\n    ok: down: postgresql: 77s\r\n    ok: down: rabbitmq: 112s, normally up\r\n    Starting Chef Client, version 11.12.2\r\n    Compiling Cookbooks...\r\n    Converging 8 resources\r\n    Recipe: chef-server::pre_11.1_upgrade_setup\r\n      * execute[pkill -9 -f epmd] action run\r\n        - execute pkill -9 -f epmd\r\n\r\n      * execute[/opt/chef-server/bin/chef-server-ctl start postgresql] action run\r\n        - execute /opt/chef-server/bin/chef-server-ctl start postgresql\r\n\r\n      * ruby_block[check-for-sqitch] action run (skipped due to only_if)\r\n      * execute[apply-widen-cookbook-version] action nothing (skipped due to action :nothing)\r\n      * execute[sqitchfy_database] action nothing (skipped due to action :nothing)\r\n      * execute[migrate_database] action nothing (skipped due to action :nothing)\r\n      * execute[/opt/chef-server/bin/chef-server-ctl stop postgresql] action run\r\n        - execute /opt/chef-server/bin/chef-server-ctl stop postgresql\r\n\r\n      * ruby_block[sleep 5] action run\r\n        - execute the ruby block sleep 5\r\n\r\n\r\n    Running handlers:\r\n    Running handlers complete\r\n\r\n    Chef Client finished, 4/4 resources updated in 9.822390922 seconds\r\n    [2015-02-04T17:13:51-05:00] WARN:\r\n    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\r\n    SSL validation of HTTPS requests is disabled. HTTPS connections are still\r\n    encrypted, but chef is not able to detect forged replies or man in the middle\r\n    attacks.\r\n\r\n    To fix this issue add an entry like this to your configuration file:\r\n\r\n    ```\r\n      # Verify all HTTPS connections (recommended)\r\n      ssl_verify_mode :verify_peer\r\n\r\n      # OR, Verify only connections to chef-server\r\n      verify_api_cert true\r\n    ```\r\n\r\n    To check your SSL configuration, or troubleshoot errors, you can use the\r\n    `knife ssl check` command like so:\r\n\r\n    ```\r\n      knife ssl check -c /opt/chef-server/embedded/cookbooks/solo.rb\r\n    ```\r\n\r\n    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\r\n\r\n    Starting Chef Client, version 11.12.2\r\n    Compiling Cookbooks...\r\n    Recipe: chef-server::default\r\n      * directory[/etc/chef-server] action create (up to date)\r\n    [2015-02-04T17:13:56-05:00] WARN: Cloning resource attributes for directory[/var/opt/chef-server/chef-server-webui/etc] from prior resource (CHEF-3694)\r\n    [2015-02-04T17:13:56-05:00] WARN: Previous directory[/var/opt/chef-server/chef-server-webui/etc]: /opt/chef-server/embedded/cookbooks/chef-server/recipes/chef-server-webui.rb:31:in `block in from_file'\r\n    [2015-02-04T17:13:56-05:00] WARN: Current  directory[/var/opt/chef-server/chef-server-webui/etc]: /opt/chef-server/embedded/cookbooks/chef-server/definitions/unicorn_config.rb:21:in `block in from_file'\r\n    Converging 197 resources\r\n      * directory[/etc/chef-server] action nothing (skipped due to action :nothing)\r\n    Recipe: chef-server::users\r\n      * user[chef_server] action create (up to date)\r\n      * group[chef_server] action create (up to date)\r\n    Recipe: chef-server::default\r\n      * directory[/etc/chef] action create (up to date)\r\n      * directory[/var/opt/chef-server] action create (up to date)\r\n    Recipe: runit::upstart\r\n      * execute[initctl stop opscode-runsvdir] action run (skipped due to only_if)\r\n      * file[/etc/init/opscode-runsvdir.conf] action delete (up to date)\r\n      * cookbook_file[/etc/init/chef-server-runsvdir.conf] action create (up to date)\r\n      * execute[initctl status chef-server-runsvdir] action run\r\n        - execute initctl status chef-server-runsvdir\r\n\r\n      * execute[initctl start chef-server-runsvdir] action run (skipped due to only_if)\r\n    Recipe: chef-server::sysctl-updates\r\n      * execute[sysctl-reload] action nothing (skipped due to action :nothing)\r\n      * bash[dual ip4/ip6 portbind] action run (skipped due to only_if)\r\n    Recipe: chef-server::rabbitmq\r\n      * directory[/var/opt/chef-server/rabbitmq] action create (up to date)\r\n      * directory[/var/opt/chef-server/rabbitmq/etc] action create (up to date)\r\n      * directory[/var/opt/chef-server/rabbitmq/db] action create (up to date)\r\n      * directory[/var/log/chef-server/rabbitmq] action create (up to date)\r\n      * link[/var/opt/chef-server/rabbitmq/db] action create (skipped due to not_if)\r\n      * link[/opt/chef-server/embedded/bin/rabbitmqctl] action create (up to date)\r\n      * link[/opt/chef-server/embedded/bin/rabbitmq-env] action create (up to date)\r\n      * link[/opt/chef-server/embedded/bin/rabbitmq-multi] action create (up to date)\r\n      * link[/opt/chef-server/embedded/bin/rabbitmq-server] action create (up to date)\r\n      * template[/opt/chef-server/embedded/service/rabbitmq/sbin/rabbitmq-env] action create (up to date)\r\n      * template[/var/opt/chef-server/rabbitmq/etc/rabbitmq.conf] action create (up to date)\r\n      * directory[/opt/chef-server/sv/rabbitmq] action create (up to date)\r\n      * directory[/opt/chef-server/sv/rabbitmq/log] action create (up to date)\r\n      * directory[/opt/chef-server/sv/rabbitmq/log/main] action create (up to date)\r\n      * template[/opt/chef-server/sv/rabbitmq/run] action create (up to date)\r\n      * template[/opt/chef-server/sv/rabbitmq/log/run] action create (up to date)\r\n      * file[/opt/chef-server/sv/rabbitmq/down] action delete (up to date)\r\n      * link[/opt/chef-server/init/rabbitmq] action create (up to date)\r\n      * link[/opt/chef-server/service/rabbitmq] action create (up to date)\r\n      * ruby_block[supervise_rabbitmq_sleep] action run (skipped due to not_if)\r\n      * service[rabbitmq] action nothing (skipped due to action :nothing)\r\n    Recipe: chef-server::postgresql\r\n      * user[opscode-pgsql] action create\r\n    ================================================================================\r\n    Error executing action `create` on resource 'user[opscode-pgsql]'\r\n    ================================================================================\r\n\r\n\r\n    Mixlib::ShellOut::ShellCommandFailed\r\n    ------------------------------------\r\n    Expected process to exit with [0], but received '8'\r\n    ---- Begin output of [\"usermod\", \"-d\", \"/var/opt/chef-server/postgresql\", \"opscode-pgsql\"] ----\r\n    STDOUT:\r\n    STDERR: usermod: user opscode-pgsql is currently used by process 1750\r\n    ---- End output of [\"usermod\", \"-d\", \"/var/opt/chef-server/postgresql\", \"opscode-pgsql\"] ----\r\n    Ran [\"usermod\", \"-d\", \"/var/opt/chef-server/postgresql\", \"opscode-pgsql\"] returned 8\r\n\r\n\r\n    Resource Declaration:\r\n    ---------------------\r\n    # In /opt/chef-server/embedded/cookbooks/chef-server/recipes/postgresql.rb\r\n\r\n     24: user node['chef_server']['postgresql']['username'] do\r\n     25:   system true\r\n     26:   shell node['chef_server']['postgresql']['shell']\r\n     27:   home node['chef_server']['postgresql']['home']\r\n     28: end\r\n     29:\r\n\r\n\r\n\r\n    Compiled Resource:\r\n    ------------------\r\n    # Declared in /opt/chef-server/embedded/cookbooks/chef-server/recipes/postgresql.rb:24:in `from_file'\r\n\r\n    user(\"opscode-pgsql\") do\r\n      action :create\r\n      supports {:manage_home=>false, :non_unique=>false}\r\n      retries 0\r\n      retry_delay 2\r\n      guard_interpreter :default\r\n      username \"opscode-pgsql\"\r\n      home \"/var/opt/chef-server/postgresql\"\r\n      shell \"/bin/sh\"\r\n      system true\r\n      cookbook_name :\"chef-server\"\r\n      recipe_name \"postgresql\"\r\n    end\r\n\r\n\r\n\r\n\r\n    Running handlers:\r\n    [2015-02-04T17:13:57-05:00] ERROR: Running exception handlers\r\n    Running handlers complete\r\n\r\n    [2015-02-04T17:13:57-05:00] ERROR: Exception handlers complete\r\n    [2015-02-04T17:13:57-05:00] FATAL: Stacktrace dumped to /opt/chef-server/embedded/cookbooks/cache/chef-stacktrace.out\r\n    Chef Client failed. 1 resources updated in 5.779168325 seconds\r\n    [2015-02-04T17:13:57-05:00] ERROR: user[opscode-pgsql] (chef-server::postgresql line 24) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '8'\r\n    ---- Begin output of [\"usermod\", \"-d\", \"/var/opt/chef-server/postgresql\", \"opscode-pgsql\"] ----\r\n    STDOUT:\r\n    STDERR: usermod: user opscode-pgsql is currently used by process 1750\r\n    ---- End output of [\"usermod\", \"-d\", \"/var/opt/chef-server/postgresql\", \"opscode-pgsql\"] ----\r\n    Ran [\"usermod\", \"-d\", \"/var/opt/chef-server/postgresql\", \"opscode-pgsql\"] returned 8\r\n    [2015-02-04T17:13:57-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)\r\n"}}