Issue With apipie:cache:index During Clean Install

Hello!

While running an initial install as per the documentation for a RHEL 7.x
server, using 'foreman-installer' and default options, I received the
following errors:

/Stage[main]/Foreman::Database/Foreman::Rake[apipie:cache:index]/Exec[foreman-rake-apipie:cache:index]:
Failed to call refresh: /usr/sbin/foreman-rake apipie:cache:index returned
1 inst
ead of one of [0]

/Stage[main]/Foreman::Database/Foreman::Rake[apipie:cache:index]/Exec[foreman-rake-apipie:cache:index]:
/usr/sbin/foreman-rake apipie:cache:index returned 1 instead of one of [0]

/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[puppet.dev.ucc.vcu.edu]:
Could not evaluate: Proxy puppet.dev.ucc.vcu.edu cannot be registered
(Could not load data from https://puppet.dev.ucc.vcu.edu

I was able to resolve the third error (failure to add the Smart Proxy) by
simply adding the Smart Proxy manually (and specifying port 8443) within
the web console.

However, when trying to manually run 'foreman-rake apipie:cache:index', I
receive the following:

:zap: root@puppet.dev  ~  foreman-rake apipie:cache:index
Apipie cache enabled but not present yet. Run apipie:cache rake task to
speed up API calls.
2016-03-25 15:56:41 -0400 | Started
2016-03-25 15:56:46 -0400 | Documents loaded…
2016-03-25 15:56:46 -0400 | Processing docs for
rake aborted!
Missing template …/…/layouts/apipie/apipie with {:locale=>[:de, :en],
:formats=>[:html], :handlers=>[:erb, :builder, :rabl]}. Searched in:

··· * "/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/app/views/apipie/apipies"

Tasks: TOP => apipie:cache
(See full trace by running task with --trace)

The full trace gives me:

:zap: root@puppet.dev  ~  foreman-rake apipie:cache:index --trace
** Invoke apipie:cache:index (first_time)
** Execute apipie:cache:index
** Invoke apipie:cache (first_time)
** Invoke environment (first_time)
** Execute environment
Apipie cache enabled but not present yet. Run apipie:cache rake task to
speed up API calls.
** Execute apipie:cache
2016-03-25 15:57:57 -0400 | Started
2016-03-25 15:58:02 -0400 | Documents loaded…
2016-03-25 15:58:02 -0400 | Processing docs for
rake aborted!
Missing template …/…/layouts/apipie/apipie with {:locale=>[:de, :en],
:formats=>[:html], :handlers=>[:erb, :builder, :rabl]}. Searched in:
*
"/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/app/views/apipie/apipies"
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/path_set.rb:58:in
find' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/lookup_context.rb:116:infind’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:3:in
find_template' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:80:inresolve_layout’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:70:in
block in find_layout' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/lookup_context.rb:239:inwith_layout_format’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:3:in
with_layout_format' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:70:infind_layout’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:54:in
render_with_layout' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:46:inrender_template’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:18:in
render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:41:inrender_template’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:22:in
render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/rendering_helper.rb:24:inrender’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:117:in
block in render_page' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:113:inopen’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:113:in
render_page' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:147:ingenerate_index_page’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:77:in
block (4 levels) in <top (required)>' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:66:ineach’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:66:in
block (3 levels) in <top (required)>' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:188:inwith_loaded_documentation’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:64:in
block (2 levels) in <top (required)>' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:incall’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in block in execute' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:ineach’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in execute' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:inblock in
invoke_with_call_chain’
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in mon_synchronize' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:ininvoke_with_call_chain’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in invoke' /usr/share/foreman/lib/tasks/apipie.rake:6:inblock (2 levels) in <top
(required)>’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in call' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:inblock in execute’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in each' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:inexecute’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in block in invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:inmon_synchronize’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in
invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:ininvoke’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in invoke_task' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:inblock (2
levels) in top_level’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in each' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:inblock in
top_level’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in
standard_exception_handling' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:intop_level’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in block in run' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:instandard_exception_handling’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in run' /opt/rh/ruby193/root/usr/bin/rake:32:in'
Tasks: TOP => apipie:cache

Any assistance would be greatly appreciated.

With my thanks,
– Adam

>
> Hello!
>
> While running an initial install as per the documentation for a RHEL 7.x
> server, using 'foreman-installer' and default options, I received the
> following errors:
>
> /Stage[main]/Foreman::Database/Foreman::Rake[apipie:cache:index]/Exec[foreman-rake-apipie:cache:index]:
> Failed to call refresh: /usr/sbin/foreman-rake apipie:cache:index returned
> 1 inst
> ead of one of [0]
>
>
>
> /Stage[main]/Foreman::Database/Foreman::Rake[apipie:cache:index]/Exec[foreman-rake-apipie:cache:index]:
> /usr/sbin/foreman-rake apipie:cache:index returned 1 instead of one of [0]
>
> /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[
> puppet.dev.ucc.vcu.edu]: Could not evaluate: Proxy puppet.dev.ucc.vcu.edu
> cannot be registered (Could not load data from
> https://puppet.dev.ucc.vcu.edu
>
>
> I was able to resolve the third error (failure to add the Smart Proxy) by
> simply adding the Smart Proxy manually (and specifying port 8443) within
> the web console.
>
> However, when trying to manually run 'foreman-rake apipie:cache:index', I
> receive the following:
>
> :zap: root@puppet.dev  ~  foreman-rake apipie:cache:index
> Apipie cache enabled but not present yet. Run apipie:cache rake task to
> speed up API calls.
> 2016-03-25 15:56:41 -0400 | Started
> 2016-03-25 15:56:46 -0400 | Documents loaded…
> 2016-03-25 15:56:46 -0400 | Processing docs for
> rake aborted!
> Missing template …/…/layouts/apipie/apipie with {:locale=>[:de, :en],
> :formats=>[:html], :handlers=>[:erb, :builder, :rabl]}. Searched in:
> *
> "/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/app/views/apipie/apipies"
>
>
> Tasks: TOP => apipie:cache
> (See full trace by running task with --trace)
>

this looks like it was fixed at Bug #13592: Partial ../overrides/foreman/activation_keys/_host_tab accessed outside of view paths - Katello - Foreman
(its due to a recent rails cve fix).
I would believe katello develops will release this in the 2.x version, as
afaiu it blocks new installation of the current katello.

in the meanwhile, you could apply the patch in the issue safely, as its
mostly changing file locations.

Ohad

··· On Fri, Mar 25, 2016 at 11:03 PM, J. Adam Craig wrote:

The full trace gives me:

:zap: root@puppet.dev  ~  foreman-rake apipie:cache:index --trace
** Invoke apipie:cache:index (first_time)
** Execute apipie:cache:index
** Invoke apipie:cache (first_time)
** Invoke environment (first_time)
** Execute environment
Apipie cache enabled but not present yet. Run apipie:cache rake task to
speed up API calls.
** Execute apipie:cache
2016-03-25 15:57:57 -0400 | Started
2016-03-25 15:58:02 -0400 | Documents loaded…
2016-03-25 15:58:02 -0400 | Processing docs for
rake aborted!
Missing template …/…/layouts/apipie/apipie with {:locale=>[:de, :en],
:formats=>[:html], :handlers=>[:erb, :builder, :rabl]}. Searched in:
*
"/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/app/views/apipie/apipies"
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/path_set.rb:58:in
find' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/lookup_context.rb:116:infind’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:3:in
find_template' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:80:inresolve_layout’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:70:in
block in find_layout' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/lookup_context.rb:239:inwith_layout_format’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:3:in
with_layout_format' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:70:infind_layout’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:54:in
render_with_layout' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:46:inrender_template’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:18:in
render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:41:inrender_template’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:22:in
render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/rendering_helper.rb:24:inrender’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:117:in
block in render_page' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:113:inopen’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:113:in
render_page' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:147:ingenerate_index_page’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:77:in
block (4 levels) in <top (required)>' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:66:ineach’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:66:in
block (3 levels) in <top (required)>' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:188:inwith_loaded_documentation’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:64:in
block (2 levels) in <top (required)>' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:incall’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in block in execute' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:ineach’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in execute' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:inblock in
invoke_with_call_chain’
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in mon_synchronize' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:ininvoke_with_call_chain’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in invoke' /usr/share/foreman/lib/tasks/apipie.rake:6:inblock (2 levels) in <top
(required)>’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in call' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:inblock in execute’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in each' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:inexecute’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in block in invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:inmon_synchronize’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in
invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:ininvoke’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in
invoke_task' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:inblock (2
levels) in top_level’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in each' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:inblock in
top_level’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in
standard_exception_handling' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:intop_level’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in block in run' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:instandard_exception_handling’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in run' /opt/rh/ruby193/root/usr/bin/rake:32:in'
Tasks: TOP => apipie:cache

Any assistance would be greatly appreciated.

With my thanks,
– Adam


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

>
>
>
>>
>> Hello!
>>
>> While running an initial install as per the documentation for a RHEL 7.x
>> server, using 'foreman-installer' and default options, I received the
>> following errors:
>>
>> /Stage[main]/Foreman::Database/Foreman::Rake[apipie:cache:index]/Exec[foreman-rake-apipie:cache:index]:
>> Failed to call refresh: /usr/sbin/foreman-rake apipie:cache:index returned
>> 1 inst
>> ead of one of [0]
>>
>>
>>
>> /Stage[main]/Foreman::Database/Foreman::Rake[apipie:cache:index]/Exec[foreman-rake-apipie:cache:index]:
>> /usr/sbin/foreman-rake apipie:cache:index returned 1 instead of one of [0]
>>
>> /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[
>> puppet.dev.ucc.vcu.edu]: Could not evaluate: Proxy puppet.dev.ucc.vcu.edu
>> cannot be registered (Could not load data from
>> https://puppet.dev.ucc.vcu.edu
>>
>>
>> I was able to resolve the third error (failure to add the Smart Proxy) by
>> simply adding the Smart Proxy manually (and specifying port 8443) within
>> the web console.
>>
>> However, when trying to manually run 'foreman-rake apipie:cache:index', I
>> receive the following:
>>
>> :zap: root@puppet.dev  ~  foreman-rake apipie:cache:index
>> Apipie cache enabled but not present yet. Run apipie:cache rake task to
>> speed up API calls.
>> 2016-03-25 15:56:41 -0400 | Started
>> 2016-03-25 15:56:46 -0400 | Documents loaded…
>> 2016-03-25 15:56:46 -0400 | Processing docs for
>> rake aborted!
>> Missing template …/…/layouts/apipie/apipie with {:locale=>[:de, :en],
>> :formats=>[:html], :handlers=>[:erb, :builder, :rabl]}. Searched in:
>> *
>> "/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/app/views/apipie/apipies"
>>
>>
>> Tasks: TOP => apipie:cache
>> (See full trace by running task with --trace)
>>
>
> this looks like it was fixed at
> Bug #13592: Partial ../overrides/foreman/activation_keys/_host_tab accessed outside of view paths - Katello - Foreman (its due to a recent rails
> cve fix).
> I would believe katello develops will release this in the 2.x version, as
> afaiu it blocks new installation of the current katello.
>
> in the meanwhile, you could apply the patch in the issue safely, as its
> mostly changing file locations.
>

and of course another workaround is to downgrade, rails, especially -( of
swap ruby193 prefix to tfm depends on your version)

yum downgrade ruby193-rubygem-actionpack ruby193-rubygem-activerecord

ruby193-rubygem-activesupport

to get your system back to:

ruby193-rubygem-activerecord-3.2.8-11.el7.noarch.rpm
ruby193-rubygem-actionpack-3.2.8-16.el7.noarch.rpm
ruby193-rubygem-activesupport-3.2.8-6.el7.noarch.rpm

··· On Sun, Mar 27, 2016 at 10:55 AM, Ohad Levy wrote: > On Fri, Mar 25, 2016 at 11:03 PM, J. Adam Craig wrote:

Ohad

The full trace gives me:

:zap: root@puppet.dev  ~  foreman-rake apipie:cache:index --trace
** Invoke apipie:cache:index (first_time)
** Execute apipie:cache:index
** Invoke apipie:cache (first_time)
** Invoke environment (first_time)
** Execute environment
Apipie cache enabled but not present yet. Run apipie:cache rake task to
speed up API calls.
** Execute apipie:cache
2016-03-25 15:57:57 -0400 | Started
2016-03-25 15:58:02 -0400 | Documents loaded…
2016-03-25 15:58:02 -0400 | Processing docs for
rake aborted!
Missing template …/…/layouts/apipie/apipie with {:locale=>[:de, :en],
:formats=>[:html], :handlers=>[:erb, :builder, :rabl]}. Searched in:
*
"/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/app/views/apipie/apipies"
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/path_set.rb:58:in
find' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/lookup_context.rb:116:infind’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:3:in
find_template' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:80:inresolve_layout’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:70:in
block in find_layout' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/lookup_context.rb:239:inwith_layout_format’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:3:in
with_layout_format' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:70:infind_layout’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:54:in
render_with_layout' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:46:inrender_template’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:18:in
render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:41:inrender_template’
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:22:in
render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/rendering_helper.rb:24:inrender’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:117:in
block in render_page' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:113:inopen’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:113:in
render_page' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:147:ingenerate_index_page’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:77:in
block (4 levels) in <top (required)>' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:66:ineach’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:66:in
block (3 levels) in <top (required)>' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:188:inwith_loaded_documentation’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:64:in
block (2 levels) in <top (required)>' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:incall’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in block in execute' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:ineach’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in execute' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:inblock in
invoke_with_call_chain’
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in mon_synchronize' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:ininvoke_with_call_chain’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in invoke' /usr/share/foreman/lib/tasks/apipie.rake:6:inblock (2 levels) in <top
(required)>’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in call' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:inblock in execute’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in each' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:inexecute’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in block in invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:inmon_synchronize’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in
invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:ininvoke’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in
invoke_task' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:inblock (2
levels) in top_level’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in each' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:inblock in
top_level’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in
standard_exception_handling' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:intop_level’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in block in run' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:instandard_exception_handling’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in run' /opt/rh/ruby193/root/usr/bin/rake:32:in'
Tasks: TOP => apipie:cache

Any assistance would be greatly appreciated.

With my thanks,
– Adam


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Thanks, Ohad! In my case, the downgrade of the three packages you
indicated took care of the issue, and I was able to run 'foreman-rake
apipie:cache:index' without error.

Happy Monday!
– Adam

··· On Sunday, March 27, 2016 at 4:10:49 AM UTC-4, ohad wrote: > > > > On Sun, Mar 27, 2016 at 10:55 AM, Ohad Levy > wrote: > >> >> >> On Fri, Mar 25, 2016 at 11:03 PM, J. Adam Craig > > wrote: >> >>> >>> Hello! >>> >>> While running an initial install as per the documentation for a RHEL 7.x >>> server, using 'foreman-installer' and default options, I received the >>> following errors: >>> >>> /Stage[main]/Foreman::Database/Foreman::Rake[apipie:cache:index]/Exec[foreman-rake-apipie:cache:index]: >>> Failed to call refresh: /usr/sbin/foreman-rake apipie:cache:index returned >>> 1 inst >>> ead of one of [0] >>> >>> >>> >>> /Stage[main]/Foreman::Database/Foreman::Rake[apipie:cache:index]/Exec[foreman-rake-apipie:cache:index]: >>> /usr/sbin/foreman-rake apipie:cache:index returned 1 instead of one of [0] >>> >>> /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ >>> puppet.dev.ucc.vcu.edu]: Could not evaluate: Proxy >>> puppet.dev.ucc.vcu.edu cannot be registered (Could not load data from >>> https://puppet.dev.ucc.vcu.edu >>> >>> >>> I was able to resolve the third error (failure to add the Smart Proxy) >>> by simply adding the Smart Proxy manually (and specifying port 8443) within >>> the web console. >>> >>> However, when trying to manually run 'foreman-rake apipie:cache:index', >>> I receive the following: >>> >>> ⚡ root@puppet.dev  ~  *foreman-rake apipie:cache:index* >>> Apipie cache enabled but not present yet. Run apipie:cache rake task to >>> speed up API calls. >>> 2016-03-25 15:56:41 -0400 | Started >>> 2016-03-25 15:56:46 -0400 | Documents loaded... >>> 2016-03-25 15:56:46 -0400 | Processing docs for >>> rake aborted! >>> Missing template ../../layouts/apipie/apipie with {:locale=>[:de, :en], >>> :formats=>[:html], :handlers=>[:erb, :builder, :rabl]}. Searched in: >>> * >>> "/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/app/views/apipie/apipies" >>> >>> >>> Tasks: TOP => apipie:cache >>> (See full trace by running task with --trace) >>> >> >> this looks like it was fixed at >> http://projects.theforeman.org/issues/13592 (its due to a recent rails >> cve fix). >> I would believe katello develops will release this in the 2.x version, as >> afaiu it blocks new installation of the current katello. >> >> in the meanwhile, you could apply the patch in the issue safely, as its >> mostly changing file locations. >> > > and of course another workaround is to downgrade, rails, especially -( of > swap ruby193 prefix to tfm depends on your version) > # yum downgrade ruby193-rubygem-actionpack ruby193-rubygem-activerecord > ruby193-rubygem-activesupport > > to get your system back to: > > ruby193-rubygem-activerecord-3.2.8-11.el7.noarch.rpm > ruby193-rubygem-actionpack-3.2.8-16.el7.noarch.rpm > ruby193-rubygem-activesupport-3.2.8-6.el7.noarch.rpm > > >> >> Ohad >> >>> >>> The full trace gives me: >>> >>> ✘ ⚡ root@puppet.dev  ~  *foreman-rake apipie:cache:index --trace* >>> ** Invoke apipie:cache:index (first_time) >>> ** Execute apipie:cache:index >>> ** Invoke apipie:cache (first_time) >>> ** Invoke environment (first_time) >>> ** Execute environment >>> Apipie cache enabled but not present yet. Run apipie:cache rake task to >>> speed up API calls. >>> ** Execute apipie:cache >>> 2016-03-25 15:57:57 -0400 | Started >>> 2016-03-25 15:58:02 -0400 | Documents loaded... >>> 2016-03-25 15:58:02 -0400 | Processing docs for >>> rake aborted! >>> Missing template ../../layouts/apipie/apipie with {:locale=>[:de, :en], >>> :formats=>[:html], :handlers=>[:erb, :builder, :rabl]}. Searched in: >>> * >>> "/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/app/views/apipie/apipies" >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/path_set.rb:58:in >>> `find' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/lookup_context.rb:116:in >>> `find' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:3:in >>> `find_template' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:80:in >>> `resolve_layout' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:70:in >>> `block in find_layout' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/lookup_context.rb:239:in >>> `with_layout_format' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:3:in >>> `with_layout_format' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:70:in >>> `find_layout' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:54:in >>> `render_with_layout' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:46:in >>> `render_template' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:18:in >>> `render' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:41:in >>> `render_template' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:22:in >>> `render' >>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/rendering_helper.rb:24:in >>> `render' >>> /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:117:in >>> `block in render_page' >>> /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:113:in >>> `open' >>> /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:113:in >>> `render_page' >>> /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:147:in >>> `generate_index_page' >>> /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:77:in >>> `block (4 levels) in ' >>> /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:66:in >>> `each' >>> /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:66:in >>> `block (3 levels) in ' >>> /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:188:in >>> `with_loaded_documentation' >>> /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/tasks/apipie.rake:64:in >>> `block (2 levels) in ' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in >>> execute' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in >>> invoke_with_call_chain' >>> /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in >>> `invoke_with_call_chain' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke' >>> /usr/share/foreman/lib/tasks/apipie.rake:6:in `block (2 levels) in >> (required)>' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in >>> execute' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in >>> invoke_with_call_chain' >>> /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in >>> `invoke_with_call_chain' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in >>> `invoke_task' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block (2 >>> levels) in top_level' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `each' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block in >>> top_level' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in >>> `standard_exception_handling' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in `top_level' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in `block in >>> run' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in >>> `standard_exception_handling' >>> /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run' >>> /opt/rh/ruby193/root/usr/bin/rake:32:in `' >>> Tasks: TOP => apipie:cache >>> >>> >>> Any assistance would be greatly appreciated. >>> >>> With my thanks, >>> -- Adam >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Foreman users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to foreman-user...@googlegroups.com . >>> To post to this group, send email to forema...@googlegroups.com >>> . >>> Visit this group at https://groups.google.com/group/foreman-users. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >