Cannot install foreman1.6 in rhel6 OS

Hi,

I cannot install foreman 1.6 in my redhat 1.6 x86_64 os, with
postgresql8.4.20 as database. I have tried foreman-installer and rpm
installation as well. the Puppet master , puppet agent, foreman and
foreman-proxy seems has been installed, however, the backend postgresql db
goes wrong with no data schema created. After database.yaml configured, I
tries to run "foreman-rake db:migrate" or "sudo -u foreman
/usr/share/foreman/extras/dbmigrate" manually, both get following error:

[root@msgmshl1 foreman]# foreman-rake db:migrate -t
rake aborted!
cannot load such file – apipie/middleware/checksum_in_headers
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in
require' /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:inrequire'
/usr/share/foreman/config/application.rb:2:in <top (required)>' /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:inrequire'
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in
require&#39; /usr/share/foreman/Rakefile:1:in<top (required)>'
/usr/local/lib/ruby/1.9.1/rake/rake_module.rb:25:in load&#39; /usr/local/lib/ruby/1.9.1/rake/rake_module.rb:25:inload_rakefile'
/usr/local/lib/ruby/1.9.1/rake/application.rb:501:in raw_load_rakefile&#39; /usr/local/lib/ruby/1.9.1/rake/application.rb:82:inblock in load_rakefile'
/usr/local/lib/ruby/1.9.1/rake/application.rb:133:in
standard_exception_handling&#39; /usr/local/lib/ruby/1.9.1/rake/application.rb:81:inload_rakefile'
/usr/local/lib/ruby/1.9.1/rake/application.rb:65:in block in run&#39; /usr/local/lib/ruby/1.9.1/rake/application.rb:133:instandard_exception_handling'
/usr/local/lib/ruby/1.9.1/rake/application.rb:63:in run&#39; /usr/bin/ruby193-rake:32:in<main>'

I have installed "ruby193-rubygem-apipie-rails" RPM for this "missing"
checksum_in_headers file and currently can find this file under
'/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/middleware',
but the error still there after re-exec the "foreman-rake db:migrate" or "sudo
-u foreman /usr/share/foreman/extras/dbmigrate"

I am stuck by this issue for several days and hope anybody can help me.

Thanks!

These paths look suspicious, it seems that you have an additional
version of Ruby installed on there which might be taking precedence over
RHSCL.

On a RHEL 6 system you should have:

rpm -q ruby => ruby-1.8.7.352-13.el6.x86_64
rpm -q ruby193-ruby => ruby193-ruby-1.9.3.484-49.el6.x86_64

And:

ruby --version => ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
scl enable ruby193 "ruby --version" => ruby 1.9.3p484 (2013-11-22
revision 43786) [x86_64-linux]

If you can remove whatever additional Ruby installation's in /usr/local,
you might have better luck.

··· On 06/10/14 15:37, lastsongwl@gmail.com wrote: > I cannot install foreman 1.6 in my redhat 1.6 x86_64 os, with > postgresql8.4.20 as database. I have tried foreman-installer and rpm > installation as well. the Puppet master , puppet agent, foreman and > foreman-proxy seems has been installed, however, the backend postgresql > db goes wrong with no data schema created. After database.yaml > configured, I tries to run "foreman-rake db:migrate" or "sudo -u foreman > /usr/share/foreman/extras/dbmigrate" manually, both get following error: > > [root@msgmshl1 foreman]# foreman-rake db:migrate -t > rake aborted! > cannot load such file -- apipie/middleware/checksum_in_headers > /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in > `require' > /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in > `require'


Dominic Cleal
Red Hat Engineering

hi Cleal

here is the ruby info in my host, and seems a bit different from the
version you mentioned.

[root@msgmshl1 foreman]# rpm -q ruby
ruby-1.8.7.352-13.el6.x86_64
[root@msgmshl1 foreman]# rpm -q ruby193-ruby
ruby193-ruby-1.9.3.327-27.el6.x86_64
[root@msgmshl1 foreman]# ruby --version
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
[root@msgmshl1 foreman]# scl enable ruby193 "ruby --version"
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]

Are these 2 version of ruby correct for foreman installation? When i run
ruby manually, 1.8.7 is the default one. When run foreman rake, seems
foreman seeks the 1.9.3 one (guess).

You might be right and I am totally confused by the different version of
ruby, rubygems, rake… installed on this host, could you please give some
more instructions on how to solve it.

Many thanks!

在 2014年10月6日星期一UTC+8下午10时43分42秒,Dominic Cleal写道:

··· > > On 06/10/14 15:37, lastsongwl@gmail.com wrote: > > I cannot install foreman 1.6 in my redhat 1.6 x86_64 os, with > > postgresql8.4.20 as database. I have tried foreman-installer and rpm > > installation as well. the Puppet master , puppet agent, foreman and > > foreman-proxy seems has been installed, however, the backend postgresql > > db goes wrong with no data schema created. After database.yaml > > configured, I tries to run "foreman-rake db:migrate" or "sudo -u foreman > > /usr/share/foreman/extras/dbmigrate" manually, both get following error: > > > > [root@msgmshl1 foreman]# foreman-rake db:migrate -t > > rake aborted! > > cannot load such file -- apipie/middleware/checksum_in_headers > > > /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in > > > `require' > > > /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in > > > `require' > > These paths look suspicious, it seems that you have an additional > version of Ruby installed on there which might be taking precedence over > RHSCL. > > On a RHEL 6 system you should have: > > rpm -q ruby => ruby-1.8.7.352-13.el6.x86_64 > rpm -q ruby193-ruby => ruby193-ruby-1.9.3.484-49.el6.x86_64 > > And: > > ruby --version => ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] > scl enable ruby193 "ruby --version" => ruby 1.9.3p484 (2013-11-22 > revision 43786) [x86_64-linux] > > If you can remove whatever additional Ruby installation's in /usr/local, > you might have better luck. > > -- > Dominic Cleal > Red Hat Engineering >

> Are these 2 version of ruby correct for foreman installation? When i run
> ruby manually, 1.8.7 is the default one. When run foreman rake, seems
> foreman seeks the 1.9.3 one (guess).

These two guys (1.8.7 and 1.9.3) are correct and expected.

But what Dominic refers to is the Ruby 1.9.1 which you obviously have
installed. This is not supported version, we haven't tested Foreman on
this kind of configuration.

I'd recommend to reserve a clean host/vm for the Foreman, or make sure
your environment is clean when you deploy it.

> You might be right and I am totally confused by the different version of
> ruby, rubygems, rake… installed on this host, could you please give some
> more instructions on how to solve it.

I am afraid you need to find out what is wrong with your Rubies on that
box. I'd start with which ruby. With a clean CentOS 6, if you follow
our instructions in the manual, Foreman installs just fine.

··· -- Later, Lukas #lzap Zapletal

Hi Guys

Thanks for your suggestions on the ruby, and I found this is my wrong to
link usr/bin/ruby193-rake to another version of rake command

After that I run the foreman-rake db:migration again and it shows that
/usr/bin/ruby193-rake not found, which seems I still missing some files
with ruby193?

Therefore if I choose this RPM installation approach, what should I do with
this ruby193-rake.

Meanwhile, I also tried the Foreman Installer approach but failed again. No
more error info on DB migration but I cannot access the foreman web UI

here is the error info from website:

Web application could not be started

PGError: ERROR: relation "features" does not exist
LINE 4: WHERE a.attrelid = '"features"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"features"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
(ActiveRecord::StatementInvalid)
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:1158:in async_exec&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:1158:inexec_no_cache'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:664:in block in exec_query&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:inblock in log'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in instrument&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:inlog'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:663:in exec_query&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:1283:incolumn_definitions'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:859:in columns&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/schema_cache.rb:12:inblock in initialize'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/model_schema.rb:228:in yield&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/model_schema.rb:228:indefault'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/model_schema.rb:228:in columns&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/model_schema.rb:237:incolumns_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/locking/optimistic.rb:129:in locking_enabled?&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:170:inexec_queries'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:160:in block in to_a&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/explain.rb:40:inlogging_query_plan'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:159:in to_a&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation/finder_methods.rb:159:inall'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/querying.rb:5:in all&#39; /usr/share/foreman/app/models/feature.rb:7:inname_map'
/usr/share/foreman/app/models/smart_proxy.rb:39:in &lt;class:SmartProxy&gt;&#39; /usr/share/foreman/app/models/smart_proxy.rb:1:in<top (required)>'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in require&#39; /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:inrequire'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in block in require&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:inload_dependency'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in require&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:359:inrequire_or_load'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:502:in load_missing_constant&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:192:inblock in const_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:190:in each&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:190:inconst_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:514:in load_missing_constant&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:192:inblock in const_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:190:in each&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:190:inconst_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:514:in load_missing_constant&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:192:inblock in const_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:190:in each&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:190:inconst_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:230:in block in constantize&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:229:ineach'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:229:in constantize&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:260:insafe_constantize'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/core_ext/string/inflections.rb:66:in safe_constantize&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:152:in_default_wrap_model'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:169:in _set_wrapper_defaults&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:133:ininherited'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/railties/routes_helpers.rb:7:in block (2 levels) in with&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/railties/paths.rb:7:inblock (2 levels) in with'
/usr/share/foreman/app/controllers/api/v1/smart_proxies_controller.rb:3:in &lt;module:V1&gt;&#39; /usr/share/foreman/app/controllers/api/v1/smart_proxies_controller.rb:2:in<module:Api>'
/usr/share/foreman/app/controllers/api/v1/smart_proxies_controller.rb:1:in &lt;top (required)&gt;&#39; /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:inrequire'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in require&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:inblock in require'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in load_dependency&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:inrequire'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:359:in require_or_load&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:313:independ_on'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:225:in require_dependency&#39; /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:439:inblock (2 levels) in eager_load!'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:438:in each&#39; /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:438:inblock in eager_load!'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:436:in each&#39; /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:436:ineager_load!'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application/finisher.rb:53:in block in &lt;module:Finisher&gt;&#39; /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:30:ininstance_exec'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:30:in run&#39; /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:55:inblock in run_initializers'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:54:in each&#39; /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:54:inrun_initializers'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:136:in initialize!&#39; /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:inmethod_missing'
/usr/share/foreman/config/environment.rb:5:in &lt;top (required)&gt;&#39; /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:inrequire'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in require&#39; config.ru:3:inblock in <main>'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:51:in instance_eval&#39; /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:51:ininitialize'
config.ru:1:in new&#39; config.ru:1:in<main>'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:105:in eval&#39; /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:105:inpreload_app'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:150:in &lt;module:App&gt;&#39; /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:29:in<module:PhusionPassenger>'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:28:in `<main>'

here is the detailed installation log:

··· ------------------------------------------------------------------------------------------------------------------------------------------------------ [root@msgmshl1 conf.d]# foreman-installer -v [ INFO 2014-10-07 16:07:36 verbose] Executing hooks in group boot [ INFO 2014-10-07 16:07:36 verbose] All hooks in group boot finished [ INFO 2014-10-07 16:07:36 verbose] Executing hooks in group init [ INFO 2014-10-07 16:07:36 verbose] All hooks in group init finished [ INFO 2014-10-07 16:07:36 verbose] Parsing default values from puppet modules... [ INFO 2014-10-07 16:07:36 verbose] ... finished [ INFO 2014-10-07 16:07:36 verbose] Executing hooks in group pre_values [ INFO 2014-10-07 16:07:36 verbose] All hooks in group pre_values finished [ INFO 2014-10-07 16:07:36 verbose] Executing hooks in group pre_validations [ INFO 2014-10-07 16:07:36 verbose] All hooks in group pre_validations finished [ INFO 2014-10-07 16:07:36 verbose] Running validation checks [ INFO 2014-10-07 16:07:36 verbose] Executing hooks in group pre [ WARN 2014-10-07 16:07:36 verbose] Hook 'Kafo::HookContext' is using block with arguments which is DEPRECATED, access to kafo instan [ INFO 2014-10-07 16:07:36 verbose] All hooks in group pre finished [ INFO 2014-10-07 16:07:37 verbose] Loading facts [ INFO 2014-10-07 16:07:37 verbose] Loading facts [ INFO 2014-10-07 16:07:37 verbose] Loading facts [ INFO 2014-10-07 16:07:37 verbose] Loading facts [ INFO 2014-10-07 16:07:37 verbose] Loading facts [ WARN 2014-10-07 16:07:46 verbose] Config file /etc/puppet/hiera.yaml not found, using Hiera defaults [ WARN 2014-10-07 16:07:50 verbose] Scope(Class[Postgresql::Server]): Passing "version" to postgresql::server is deprecated; please [ WARN 2014-10-07 16:07:57 verbose] Compiled catalog for msgmshl1.net in environment production in 12.25 seconds [ WARN 2014-10-07 16:07:57 verbose] The package type's allow_virtual parameter will be changing its default value from false to truelow_virtual to false. [ INFO 2014-10-07 16:07:57 verbose] (at /usr/lib/ruby/site_ruby/1.8/puppet/type/package.rb:430:in `default'; /usr/lib/ruby/site_ruin `set_parameters'; /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:2284:in `each'; /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:2284:in `sby/site_ruby/1.8/puppet/resource.rb:355:in `new'; /usr/lib/ruby/site_ruby/1.8/puppet/resource.rb:355:in `to_ral'; /usr/lib/ruby/site_resource/catalog.rb:504:in `each'; /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:504:in `to_catalog'; /usr/lib/ruby/site_rubtion/apply.rb:220:in `main'; /usr/lib/ruby/site_ruby/1.8/puppet/context.rb:64:in `override'; /usr/lib/ruby/site_ruby/1.8/puppet.rb:24/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:154:in `run_command'; /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:384:in `rite_ruby/1.8/puppet/application.rb:384:in `run'; /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:488:in `exit_on_fail'; /usr/lib/ruby/sited_line.rb:146:in `run'; /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:92:in `execute'; /usr/bin/puppet:8) [ INFO 2014-10-07 16:08:01 verbose] Applying configuration version '1412669265' [ WARN 2014-10-07 16:08:07 verbose] /Stage[main]/Apache::Service/Service[httpd]/ensure: ensure changed 'stopped' to 'running' [ INFO 2014-10-07 16:08:07 verbose] /Stage[main]/Apache::Service/Service[httpd]: Unscheduling refresh on Service[httpd] *[ERROR 2014-10-07 16:08:16 verbose] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[msgmshl1.net]: Could* *[ INFO 2014-10-07 16:08:16 verbose] - is your server down?* [ INFO 2014-10-07 16:08:16 verbose] - was rake apipie:cache run when using apipie cache? (typical production settings) [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.10/lib/apipie_bindings/api.rb:259:in `retrieve_ap [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.10/lib/apipie_bindings/api.rb:108:in `apidoc' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.10/lib/apipie_bindings/resource.rb:8:in `initiali [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.10/lib/apipie_bindings/api.rb:121:in `new' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.10/lib/apipie_bindings/api.rb:121:in `resource' [ INFO 2014-10-07 16:08:16 verbose] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:11 [ INFO 2014-10-07 16:08:16 verbose] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:31 [ INFO 2014-10-07 16:08:16 verbose] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:36 [ INFO 2014-10-07 16:08:16 verbose] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:40 [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/property/ensure.rb:81:in `retrieve' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1048:in `retrieve' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1076:in `retrieve_resource' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:236:in `from_resource' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:19:in `evaluate' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:204:in `apply' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:217:in `eval_resource' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:147:in `call' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:147:in `evaluate' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:327:in `thinmark' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:326:in `thinmark' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:147:in `evaluate' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/graph/relationship_graph.rb:118:in `traverse' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:138:in `evaluate' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:169:in `apply' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/util/log.rb:149:in `with_destination' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/report.rb:112:in `as_logging_destination' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:168:in `apply' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:118:in `apply_catalog' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:161:in `benchmark' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:160:in `benchmark' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:117:in `apply_catalog' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:222:in `run_internal' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:132:in `run' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/context.rb:64:in `override' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet.rb:244:in `override' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:131:in `run' [ INFO 2014-10-07 16:08:16 verbose] /usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:297:in `apply_catalog' [ INFO 201

The version of ruby193-ruby you supplied earlier is incorrect… it's
some sort of pre-release version and not the final thing. Because it's
not the final version, you're missing some changes.

[root@msgmshl1 foreman]# rpm -q ruby193-ruby
ruby193-ruby-1.9.3.327-27.el6.x86_64

If you're using RHEL 6, you should have the RHSCL repositories enabled
and not use a third party website or similar.

On RHEL 6 using subscription-manager, you'd typically enable it with:
yum-config-manager --enable rhel-server-rhscl-6-rpms

More information from Red Hat about the software here:
https://access.redhat.com/site/solutions/472793

··· On 07/10/14 11:02, lastsongwl@gmail.com wrote: > Hi Guys > > Thanks for your suggestions on the ruby, and I found this is my wrong to > link usr/bin/ruby193-rake to another version of rake command > > After that I run the foreman-rake db:migration again and it shows that > /usr/bin/ruby193-rake not found, which seems I still missing some files > with ruby193? > > Therefore if I choose this RPM installation approach, what should I do > with this ruby193-rake.


Dominic Cleal
Red Hat Engineering

Hi Cleal

Do you mean the version of ruby for foreman 1.6 should exactly be
"ruby193-ruby-1.9.3.484-49.el6.x86_64" as mentioned, while mine is "
ruby193-ruby-1.9.3.327-27.el6.x86_64".

Moreover, is this ruby issue also the cause that i could not install via
foreman-installer.

After I revise the ruby, which installation approach is recommended from
your opinion, the foreman-installer or rpm package or something else?

Thanks so much!

··· > >

> Hi Cleal
>
> Do you mean the version of ruby for foreman 1.6 should exactly be
> "ruby193-ruby-1.9.3.484-49.el6.x86_64" as mentioned, while mine is
> "ruby193-ruby-1.9.3.327-27.el6.x86_64".

Yes, more or less. It should be 1.9.3.4xx at the very least. 327 was a
test package before SCL was released.

> Moreover, is this ruby issue also the cause that i could not install via
> foreman-installer.

Right.

> After I revise the ruby, which installation approach is recommended from
> your opinion, the foreman-installer or rpm package or something else?

The installer, yep.

··· On 07/10/14 11:24, lastsongwl@gmail.com wrote:


Dominic Cleal
Red Hat Engineering

Hi buddy

I wonder if I can just install the new version of ruby193 directly or
should remove the 1.9.3.327 one first in my host.

If possible, would you mind give me some detailed instructions on the steps
for this upgrade, since I don't to screw up again :slight_smile:

Another one need to double-check is, if I choose the installer after
upgrade the correct ruby, need i to configure the "Passenger under the SCL"
as described in the section 3.3.2 Software Collections of Foreman 1.6
Manual

or the Installer will take that job automitically, all I need to do is
type the "https://my_service_ip"?

Thanks!

> Hi buddy
>
> I wonder if I can just install the new version of ruby193 directly or
> should remove the 1.9.3.327 one first in my host.
>
> If possible, would you mind give me some detailed instructions on the
> steps for this upgrade, since I don't to screw up again :slight_smile:

"yum upgrade ruby193*" when you have the correct RHSCL repository enabled.

> Another one need to double-check is, if I choose the installer after
> upgrade the correct ruby, need i to configure the "Passenger under the
> SCL" as described in the section 3.3.2 Software Collections of Foreman
> 1.6 Manual

> or the Installer will take that job automitically, all I need to do is
> type the "https://my_service_ip"?

I think you can just re-run the installer, but may need to also run:

foreman-rake db:migrate
foreman-rake db:seed
foreman-rake apipie:cache

Or just start from a clean host with the correct repos.

··· On 07/10/14 12:14, lastsongwl@gmail.com wrote:


Dominic Cleal
Red Hat Engineering

Hi Buddy

I just check with the admin of my current host and found it is a test env
and not registered with Red Hat Subscription Management, so I think the RHSCL
repository could not be used

I wonder if any workaround I can try? And I notice that you mentioned tha
"just start from a clean host with the correct repos. ", May I know what's
the correct repos you recommended for foreman1.6 installation on rdel6

Many thanks!

在 2014年10月7日星期二UTC+8下午7时35分36秒,Dominic Cleal写道:

··· > > > > "yum upgrade ruby193\*" when you have the correct RHSCL repository > enabled. > > > Or just start from a clean host with the correct repos. > > -- > Dominic Cleal > Red Hat Engineering >

As an alternative to RHSCL, you could use:

https://www.softwarecollections.org/en/scls/rhscl/ruby193/epel-6-x86_64/download/rhscl-ruby193-epel-6-x86_64.noarch.rpm
https://www.softwarecollections.org/en/scls/rhscl/v8314/epel-6-x86_64/download/rhscl-v8314-epel-6-x86_64.noarch.rpm

Though they won't be supported by Red Hat.

Cheers,

··· On 08/10/14 04:00, lastsongwl@gmail.com wrote: > Hi Buddy > > I just check with the admin of my current host and found it is a test > env and not registered with Red Hat Subscription Management, so I think > the RHSCL repository could not be used > > I wonder if any workaround I can try? And I notice that you mentioned > tha "just start from a clean host with the correct repos. ", May I know > what's the correct repos you recommended for foreman1.6 installation on > rdel6


Dominic Cleal
Red Hat Engineering