Skip to content

Instantly share code, notes, and snippets.

@jjdevbiz
Created January 8, 2015 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjdevbiz/d22d33b99182d7be8cb6 to your computer and use it in GitHub Desktop.
Save jjdevbiz/d22d33b99182d7be8cb6 to your computer and use it in GitHub Desktop.
chef-server-core-12.0.0-1.el6.x86_64.rpm chef-server-ctl reconfigure
* execute[bifrost_schema] action run
================================================================================
Error executing action `run` on resource 'execute[bifrost_schema]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0, 1], but received '127'
---- Begin output of sqitch --engine pg --db-name bifrost --top-dir /opt/opscode/embedded/service/oc_bifrost/db deploy --verify ----
STDOUT:
STDERR: Use of uninitialized value $mask in vec at /usr/share/perl5/warnings.pm line 347.
/opt/opscode/embedded/bin/perl: symbol lookup error: /usr/lib64/perl5/auto/Fcntl/Fcntl.so: undefined symbol: Perl_Istack_sp_ptr
---- End output of sqitch --engine pg --db-name bifrost --top-dir /opt/opscode/embedded/service/oc_bifrost/db deploy --verify ----
Ran sqitch --engine pg --db-name bifrost --top-dir /opt/opscode/embedded/service/oc_bifrost/db deploy --verify returned 127
Resource Declaration:
---------------------
# In /opt/opscode/embedded/cookbooks/private-chef/recipes/bifrost_database.rb
34: execute "bifrost_schema" do
35: # The version of the schema to be deployed will the the maximum
36: # available in the oc_bifrost repository. This will be the same
37: # version needed by the code that is deployed here. If we ever
38: # split bifrost's code and schema into separate repositories,
39: # we'll need to deploy to a specific schema tag
40: command <<-EOM.gsub(/\s+/," ").strip!
41: sqitch --engine pg
42: --db-name bifrost
43: --top-dir /opt/opscode/embedded/service/oc_bifrost/db
44: deploy --verify
45: EOM
46: user node['private_chef']['postgresql']['username']
47: # If sqitch is deploying the first time, it'll return 0 on
48: # success. If it's running a second time and ends up deploying
49: # nothing (since we've already deployed all changesets), it'll
50: # return 1. Both scenarios should be considered successful.
51: returns [0,1]
52: end
53:
Compiled Resource:
------------------
# Declared in /opt/opscode/embedded/cookbooks/private-chef/recipes/bifrost_database.rb:34:in `from_file'
execute("bifrost_schema") do
action "run"
retries 0
retry_delay 2
guard_interpreter :default
command "sqitch --engine pg --db-name bifrost --top-dir /opt/opscode/embedded/service/oc_bifrost/db deploy --verify"
backup 5
returns [0, 1]
user "opscode-pgsql"
cookbook_name :"private-chef"
recipe_name "bifrost_database"
end
Running handlers:
[2015-01-08T15:04:05-06:00] ERROR: Running exception handlers
Running handlers complete
[2015-01-08T15:04:05-06:00] ERROR: Exception handlers complete
[2015-01-08T15:04:05-06:00] FATAL: Stacktrace dumped to /opt/opscode/embedded/cookbooks/cache/chef-stacktrace.out
Chef Client failed. 13 resources updated in 10.895089401 seconds
[2015-01-08T15:04:05-06:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: execute[bifrost_schema] (private-chef::bifrost_database line 34) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0, 1], but received '127'
---- Begin output of sqitch --engine pg --db-name bifrost --top-dir /opt/opscode/embedded/service/oc_bifrost/db deploy --verify ----
STDOUT:
STDERR: Use of uninitialized value $mask in vec at /usr/share/perl5/warnings.pm line 347.
/opt/opscode/embedded/bin/perl: symbol lookup error: /usr/lib64/perl5/auto/Fcntl/Fcntl.so: undefined symbol: Perl_Istack_sp_ptr
---- End output of sqitch --engine pg --db-name bifrost --top-dir /opt/opscode/embedded/service/oc_bifrost/db deploy --verify ----
Ran sqitch --engine pg --db-name bifrost --top-dir /opt/opscode/embedded/service/oc_bifrost/db deploy --verify returned 127
Compiled Resource:
------------------
# Declared in /opt/opscode/embedded/cookbooks/private-chef/recipes/bifrost_database.rb:34:in `from_file'
execute("bifrost_schema") do
action "run"
retries 0
retry_delay 2
guard_interpreter :default
command "sqitch --engine pg --db-name bifrost --top-dir /opt/opscode/embedded/service/oc_bifrost/db deploy --verify"
backup 5
returns [0, 1]
@jjdevbiz
Copy link
Author

jjdevbiz commented Jan 8, 2015

Another curious thing from the start of that run:

$ chef-server-ctl reconfigure
the ffi-yajl and yajl-ruby gems have incompatible C libyajl libs and should not be loaded in the same Ruby VM
falling back to ffi which might work (or might not, no promises)
ffi-yajl/json_gem is deprecated, these monkeypatches will be dropped shortly
the ffi-yajl and yajl-ruby gems have incompatible C libyajl libs and should not be loaded in the same Ruby VM
falling back to ffi which might work (or might not, no promises)
ffi-yajl/json_gem is deprecated, these monkeypatches will be dropped shortly
Starting Chef Client, version 11.12.2
Compiling Cookbooks...
Recipe: private-chef::default
etc etc etc....

@jjdevbiz
Copy link
Author

jjdevbiz commented Jan 8, 2015

suggestion from coderanger in #chef to unset PERL5LIB fixed that issue, but now:

================================================================================
Error executing action `run` on resource 'execute[bootstrap-platform]'
================================================================================


Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /opt/opscode/embedded/bin/bundle exec ./bin/bootstrap-platform ./bootstrapper-config/config.rb ./bootstrapper-config/pivotal.yml ----
STDOUT:
STDERR: /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:211:in `async_exec': PG::UndefinedTable: ERROR:  relation "users" does not exist (Sequel::DatabaseError)
LINE 1: INSERT INTO "users" ("username", "email", "public_key", "ser...
                    ^
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:211:in `block in execute_query'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/database/logging.rb:28:in `log_yield'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:211:in `execute_query'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:198:in `block in execute'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:177:in `check_disconnect_errors'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:198:in `execute'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:312:in `block (2 levels) in execute'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/database/connecting.rb:230:in `block in synchronize'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/connection_pool/threaded.rb:101:in `hold'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/database/connecting.rb:230:in `synchronize'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:312:in `block in execute'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:467:in `check_database_errors'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:310:in `execute'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/dataset/actions.rb:744:in `execute'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:581:in `fetch_rows'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/dataset/actions.rb:803:in `returning_fetch_rows'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/dataset/actions.rb:297:in `insert'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/shared/postgres.rb:879:in `insert'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/shared/postgres.rb:881:in `insert'
        from ./bin/bootstrap-platform:83:in `bootstrap'
        from ./bin/bootstrap-platform:120:in `<main>'
---- End output of /opt/opscode/embedded/bin/bundle exec ./bin/bootstrap-platform ./bootstrapper-config/config.rb ./bootstrapper-config/pivotal.yml ----
Ran /opt/opscode/embedded/bin/bundle exec ./bin/bootstrap-platform ./bootstrapper-config/config.rb ./bootstrapper-config/pivotal.yml returned 1


Resource Declaration:
---------------------
# In /opt/opscode/embedded/cookbooks/private-chef/recipes/bootstrap.rb

 45: execute "bootstrap-platform" do   
 46:   command "/opt/opscode/embedded/bin/bundle exec ./bin/bootstrap-platform ./bootstrapper-config/config.rb ./bootstrapper-config/pivotal.yml"
 47:   cwd opscode_test_dir
 48:   not_if { OmnibusHelper.has_been_bootstrapped? }
 49:   notifies :restart, 'service[opscode-erchef]'
 50: end
 51:



Compiled Resource:
------------------
# Declared in /opt/opscode/embedded/cookbooks/private-chef/recipes/bootstrap.rb:45:in `from_file'

execute("bootstrap-platform") do
  action "run"
  retries 0
  retry_delay 2
  guard_interpreter :default
  command "/opt/opscode/embedded/bin/bundle exec ./bin/bootstrap-platform ./bootstrapper-config/config.rb ./bootstrapper-config/pivotal.yml"
  backup 5
  cwd "/opt/opscode/embedded/service/chef-server-bootstrap"
  returns 0
  cookbook_name :"private-chef"
  recipe_name "bootstrap"
  not_if { #code block }
end



Recipe: private-chef::oc_bifrost
  * runit_service[oc_bifrost] action restart
    - restart service runit_service[oc_bifrost]

  * execute[restart_oc_bifrost_log_service] action run
    - execute /opt/opscode/embedded/bin/sv restart /opt/opscode/sv/oc_bifrost/log

Recipe: private-chef::oc_id
  * runit_service[oc_id] action restart
    - restart service runit_service[oc_id]

  * execute[restart_oc_id_log_service] action run
    - execute /opt/opscode/embedded/bin/sv restart /opt/opscode/sv/oc_id/log

Recipe: private-chef::nginx
  * runit_service[nginx] action restart

@jjdevbiz
Copy link
Author

jjdevbiz commented Jan 8, 2015

Recipe: private-chef::opscode-erchef
  * runit_service[opscode-erchef] action restart
    - restart service runit_service[opscode-erchef]

  * execute[restart_opscode-erchef_log_service] action run
    - execute /opt/opscode/embedded/bin/sv restart /opt/opscode/sv/opscode-erchef/log


Running handlers:
[2015-01-08T16:28:07-06:00] ERROR: Running exception handlers
Running handlers complete

[2015-01-08T16:28:07-06:00] ERROR: Exception handlers complete
[2015-01-08T16:28:07-06:00] FATAL: Stacktrace dumped to /opt/opscode/embedded/cookbooks/cache/chef-stacktrace.out
Chef Client failed. 182 resources updated in 126.144842974 seconds
[2015-01-08T16:28:07-06:00] FATAL: Chef::Exceptions::MultipleFailures: Multiple failures occurred:
* Mixlib::ShellOut::ShellCommandFailed occurred in chef run: execute[bootstrap-platform] (private-chef::bootstrap line 45) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/opscode/embedded/bin/bundle exec ./bin/bootstrap-platform ./bootstrapper-config/config.rb ./bootstrapper-config/pivotal.yml ----
STDOUT: 
STDERR: /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:211:in `async_exec': PG::UndefinedTable: ERROR:  relation "users" does not exist (Sequel::DatabaseError)
LINE 1: INSERT INTO "users" ("username", "email", "public_key", "ser...
                    ^
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:211:in `block in execute_query'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/database/logging.rb:28:in `log_yield'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:211:in `execute_query'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:198:in `block in execute'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:177:in `check_disconnect_errors'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:198:in `execute'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:312:in `block (2 levels) in execute'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/database/connecting.rb:230:in `block in synchronize'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/connection_pool/threaded.rb:101:in `hold'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/database/connecting.rb:230:in `synchronize'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:312:in `block in execute'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:467:in `check_database_errors'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:310:in `execute'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/dataset/actions.rb:744:in `execute'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/postgres.rb:581:in `fetch_rows'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/dataset/actions.rb:803:in `returning_fetch_rows'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/dataset/actions.rb:297:in `insert'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/shared/postgres.rb:879:in `insert'
        from /opt/opscode/embedded/service/gem/ruby/1.9.1/gems/sequel-3.34.1/lib/sequel/adapters/shared/postgres.rb:881:in `insert'
        from ./bin/bootstrap-platform:83:in `bootstrap'
        from ./bin/bootstrap-platform:120:in `<main>'
---- End output of /opt/opscode/embedded/bin/bundle exec ./bin/bootstrap-platform ./bootstrapper-config/config.rb ./bootstrapper-config/pivotal.yml ----
Ran /opt/opscode/embedded/bin/bundle exec ./bin/bootstrap-platform ./bootstrapper-config/config.rb ./bootstrapper-config/pivotal.yml returned 1
* Mixlib::ShellOut::ShellCommandFailed occurred in delayed notification: runit_service[nginx] (private-chef::nginx line 36) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/opscode/embedded/bin/sv restart /opt/opscode/service/nginx ----
STDOUT: fail: /opt/opscode/service/nginx: unable to change to service directory: file does not exist
STDERR:
---- End output of /opt/opscode/embedded/bin/sv restart /opt/opscode/service/nginx ----
Ran /opt/opscode/embedded/bin/sv restart /opt/opscode/service/nginx returned 1

@jjdevbiz
Copy link
Author

jjdevbiz commented Jan 8, 2015

I had to nuke the install, and try. rm -fr /opt/opscode
The sqitch schemes needed to be reapplied

@jjdevbiz
Copy link
Author

jjdevbiz commented Jan 8, 2015

/var/opt/opscode *

@Saranya21
Copy link

Hi,

I am facing following error.

Compiled Resource:

Declared in /opt/opscode/embedded/cookbooks/private-chef/recipes/bifrost_database.rb:34:in `from_file'

execute("bifrost_schema") do
action "run"
retries 0
retry_delay 2
guard_interpreter :default
command "sqitch --engine pg --db-name bifrost --top-dir /opt/opscode/embedded/service/oc_bifrost/db deploy --verify"
backup 5
returns [0, 1]

I dont have any environment variable set 'PERL5LIB'. What is causing issue. Please help to resolve this.

Thanks.

@Saranya21
Copy link

This is the full error trace

Error executing action `run` on resource 'execute[bifrost_schema]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0, 1], but received '2'
---- Begin output of sqitch --engine pg --db-name bifrost --top-dir /opt/opscode/embedded/service/oc_bifrost/db deploy --verify ----
STDOUT:
STDERR: Cannot find cff1982f0294dabb9fd8eea1209fa43835762d78 in the plan
---- End output of sqitch --engine pg --db-name bifrost --top-dir /opt/opscode/embedded/service/oc_bifrost/db deploy --verify ----
Ran sqitch --engine pg --db-name bifrost --top-dir /opt/opscode/embedded/service/oc_bifrost/db deploy --verify returned 2

Resource Declaration:
---------------------
# In /opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/recipes/bifrost_database.rb

 34: execute "bifrost_schema" do
 35:   # The version of the schema to be deployed will the the maximum
 36:   # available in the oc_bifrost repository.  This will be the same
 37:   # version needed by the code that is deployed here.  If we ever
 38:   # split bifrost's code and schema into separate repositories,
 39:   # we'll need to deploy to a specific schema tag
 40:   command <<-EOM.gsub(/\s+/," ").strip!
 41:     sqitch --engine pg
 42:            --db-name bifrost
 43:            --top-dir /opt/opscode/embedded/service/oc_bifrost/db
 44:            deploy --verify
 45:   EOM
 46:   user node['private_chef']['postgresql']['username']
 47:   # Clear PERL5LIB to ensure sqitch only uses omnibus's perl
 48:   # installation
 49:   environment "PERL5LIB" => ""
 50:   # If sqitch is deploying the first time, it'll return 0 on
 51:   # success.  If it's running a second time and ends up deploying
 52:   # nothing (since we've already deployed all changesets), it'll
 53:   # return 1.  Both scenarios should be considered successful.
 54:   returns [0,1]
 55: end
 56:

Compiled Resource:
------------------
# Declared in /opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/recipes/bifrost_database.rb:34:in `from_file'

execute("bifrost_schema") do
  action :run
  retries 0
  retry_delay 2
  default_guard_interpreter :execute
  command "sqitch --engine pg --db-name bifrost --top-dir /opt/opscode/embedded/service/oc_bifrost/db deploy --verify"
  backup 5
  environment {"PERL5LIB"=>""}
  returns [0, 1]
  user "opscode-pgsql"
  declared_type :execute
  cookbook_name "private-chef"
  recipe_name "bifrost_database"
end

I dont have any PERL mentioned here. What might be the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment