Hi,
I want to receive the email alert if a host run some error for puppet, I
enabled mail under user–> mail preference, and I am the owner of this
host, for a testing, I lock the write privilege and triggered a puppet
error: the log does show one line as follows:
2015-06-16 13:47:25 [I] Rendered host_mailer/error_state.html.erb (15.4ms)
but I didn't receive any email about that.
Thanks
Sinux
Here is some update, on Katello Foreman 1.8.1-1, after modified
/etc/foreman/email.yaml as follows:
production:
delivery_method: :postfix
smtp_settings:
address: mailer.abc.com
port: 25
domain: abc.com
authentication: :none
it begin to send out the email when a puppet run failed.
But on another foreman (stand along foreman without Katello), version
1.8.2-1, I config the same in /etc/foreman/email.yaml, but it doesn't work,
here is the error log:
2015-06-17 18:29:55 [I] processing report for test.abc.com
2015-06-17 18:29:55 [E] Invalid delivery method :postfix (RuntimeError)
/opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/delivery_methods.rb:71:in
wrap_delivery_behavior' /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/delivery_methods.rb:83:in
wrap_delivery_behavior!'
/opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:629:in
mail' /usr/share/foreman/app/mailers/application_mailer.rb:11:in
mail'
/usr/share/foreman/app/mailers/host_mailer.rb:40:in block in error_state' /usr/share/foreman/app/mailers/application_mailer.rb:49:in
set_locale_for'
/usr/share/foreman/app/mailers/host_mailer.rb:39:in error_state' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in
process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in
process' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in
process'
/opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:457:in
process' /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:452:in
initialize'
/opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:439:in
new' /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:439:in
method_missing'
/usr/share/foreman/app/models/mail_notification.rb:40:in block in deliver' /usr/share/foreman/app/models/mail_notification.rb:39:in
each'
/usr/share/foreman/app/models/mail_notification.rb:39:in deliver' /usr/share/foreman/app/services/report_importer.rb:107:in
inspect_report'
/usr/share/foreman/app/services/report_importer.rb:54:in import' /usr/share/foreman/app/services/report_importer.rb:7:in
import'
/usr/share/foreman/app/models/report.rb:85:in import' /usr/share/foreman/app/controllers/api/v2/reports_controller.rb:40:in
create'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in
send_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in
process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in
process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in
block in process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:507:in
block (5 levels) in _run__630090053588925002__process_action__4389392625109928490__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
block in _conditional_callback_around_7395'
/usr/share/foreman/app/controllers/api/v2/base_controller.rb:151:in
disable_json_root' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
_conditional_callback_around_7395'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:495:in
block (4 levels) in _run__630090053588925002__process_action__4389392625109928490__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
block in _conditional_callback_around_7394'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in
around' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in
_callback_around_1719'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
_conditional_callback_around_7394' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:472:in
block (3 levels) in
_run__630090053588925002__process_action__4389392625109928490__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
block in _conditional_callback_around_7393' /usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in
set_timezone'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
_conditional_callback_around_7393' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:471:in
block (2 levels) in
_run__630090053588925002__process_action__4389392625109928490__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
block in _conditional_callback_around_7392' /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in
clear_thread'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
_conditional_callback_around_7392' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:437:in
block in
_run__630090053588925002__process_action__4389392625109928490__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
block in _conditional_callback_around_7391' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in
around'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in
_callback_around_13' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
_conditional_callback_around_7391'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:403:in
_run__630090053588925002__process_action__4389392625109928490__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in
_run_process_action_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in
run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in
process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in
process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in
block in process_action' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in
block in instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in
instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in
instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in
process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in
process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in
process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in
process'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in
process' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in
dispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in
dispatch' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:in
block in action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in
dispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/mapper.rb:42:in
call'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in
block in call' /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in
each'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in
call'
/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/static_dispatcher.rb:65:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:97:in
call'
/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/middleware/checksum_in_headers.rb:27:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in
call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:35:in
call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:in
call'
/usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:in
call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in
context' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in
call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:in
call'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:in
block in call'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
_run__3744690573936767921__call__3874693145034970527__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in
_run_call_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in
run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:in
call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in
call'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in
call_app' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:in
call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in
call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in
call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in
call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in
forward' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in
pass'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in
invalidate' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in
call!'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in
call'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in
method_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in
block in call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in
each' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in
call'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in
process_request' /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in
accept_and_process_next_request'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:in
main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in
block (3 levels) in start_threads'
2015-06-17 18:29:55 [I] Rendered api/v2/errors/standard_error.json.rabl
within api/v2/layouts/error_layout (1.0ms)
2015-06-17 18:29:55 [I] Completed 500 Internal Server Error in 213ms
(Views: 7.5ms | ActiveRecord: 76.0ms)
2015-06-17 18:30:04 [I] Connecting to database specified by database.yml
2015-06-17 18:30:04 [I] Connecting to database specified by database.yml
2015-06-17 18:30:05 [I] Fog is not installed - unable to manage compute
resources
2015-06-17 18:30:05 [I] Fog is not installed - unable to manage compute
resources
2015-06-17 18:30:07 [W] Creating scope :completer_scope. Overwriting
existing method Organization.completer_scope.
2015-06-17 18:30:07 [W] Creating scope :completer_scope. Overwriting
existing method Location.completer_scope.
2015-06-17 18:30:07 [W] Creating scope :completer_scope. Overwriting
existing method Organization.completer_scope.
2015-06-17 18:30:07 [W] Creating scope :completer_scope. Overwriting
existing method Location.completer_scope.
···
On Tuesday, June 16, 2015 at 2:02:18 PM UTC+8, sinux shen wrote:
>
> Hi,
>
> I want to receive the email alert if a host run some error for puppet, I
> enabled mail under user--> mail preference, and I am the owner of this
> host, for a testing, I lock the write privilege and triggered a puppet
> error: the log does show one line as follows:
> 2015-06-16 13:47:25 [I] Rendered host_mailer/error_state.html.erb
> (15.4ms)
> but I didn't receive any email about that.
>
> Thanks
> Sinux
>
> Here is some update, on Katello Foreman 1.8.1-1, after modified
> /etc/foreman/email.yaml as follows:
>
> production:
> delivery_method: :postfix
This is the error. Rails (Foreman's framework) forces you to set
delivery_method to :smtp or :sendmail.
:sendmail should work for you as postfix provides a compatible binary:
http://www.postfix.org/sendmail.1.html
Let us know how that works.
···
On 06/17, sinux shen wrote:
> smtp_settings:
> address: mailer.abc.com
> port: 25
> domain: abc.com
> authentication: :none
> it begin to send out the email when a puppet run failed.
>
> But on another foreman (stand along foreman without Katello), version
> 1.8.2-1, I config the same in /etc/foreman/email.yaml, but it doesn't work,
> here is the error log:
>
> 2015-06-17 18:29:55 [I] processing report for test.abc.com
> 2015-06-17 18:29:55 [E] Invalid delivery method :postfix (RuntimeError)
> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/delivery_methods.rb:71:in
> `wrap_delivery_behavior'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/delivery_methods.rb:83:in
> `wrap_delivery_behavior!'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:629:in
> `mail'
> /usr/share/foreman/app/mailers/application_mailer.rb:11:in `mail'
> /usr/share/foreman/app/mailers/host_mailer.rb:40:in `block in error_state'
> /usr/share/foreman/app/mailers/application_mailer.rb:49:in `set_locale_for'
> /usr/share/foreman/app/mailers/host_mailer.rb:39:in `error_state'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in
> `process_action'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in
> `process'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in
> `process'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:457:in
> `process'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:452:in
> `initialize'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:439:in
> `new'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:439:in
> `method_missing'
> /usr/share/foreman/app/models/mail_notification.rb:40:in `block in deliver'
> /usr/share/foreman/app/models/mail_notification.rb:39:in `each'
> /usr/share/foreman/app/models/mail_notification.rb:39:in `deliver'
> /usr/share/foreman/app/services/report_importer.rb:107:in `inspect_report'
> /usr/share/foreman/app/services/report_importer.rb:54:in `import'
> /usr/share/foreman/app/services/report_importer.rb:7:in `import'
> /usr/share/foreman/app/models/report.rb:85:in `import'
> /usr/share/foreman/app/controllers/api/v2/reports_controller.rb:40:in
> `create'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in
> `send_action'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in
> `process_action'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in
> `process_action'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in
> `block in process_action'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:507:in
> `block (5 levels) in
> _run__630090053588925002__process_action__4389392625109928490__callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
> `block in _conditional_callback_around_7395'
> /usr/share/foreman/app/controllers/api/v2/base_controller.rb:151:in
> `disable_json_root'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
> `_conditional_callback_around_7395'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:495:in
> `block (4 levels) in
> _run__630090053588925002__process_action__4389392625109928490__callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
> `block in _conditional_callback_around_7394'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in
> `around'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in
> `_callback_around_1719'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
> `_conditional_callback_around_7394'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:472:in
> `block (3 levels) in
> _run__630090053588925002__process_action__4389392625109928490__callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
> `block in _conditional_callback_around_7393'
> /usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in
> `set_timezone'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
> `_conditional_callback_around_7393'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:471:in
> `block (2 levels) in
> _run__630090053588925002__process_action__4389392625109928490__callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
> `block in _conditional_callback_around_7392'
> /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in
> `clear_thread'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
> `_conditional_callback_around_7392'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:437:in
> `block in
> _run__630090053588925002__process_action__4389392625109928490__callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
> `block in _conditional_callback_around_7391'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in
> `around'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in
> `_callback_around_13'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
> `_conditional_callback_around_7391'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:403:in
> `_run__630090053588925002__process_action__4389392625109928490__callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
> `__run_callback'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in
> `_run_process_action_callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in
> `run_callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in
> `process_action'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in
> `process_action'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in
> `block in process_action'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in
> `block in instrument'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in
> `instrument'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in
> `instrument'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in
> `process_action'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in
> `process_action'
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in
> `process_action'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in
> `process'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in
> `process'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in
> `dispatch'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in
> `dispatch'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:in
> `block in action'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in
> `dispatch'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/mapper.rb:42:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in
> `block in call'
> /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in
> `each'
> /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/static_dispatcher.rb:65:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:97:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/middleware/checksum_in_headers.rb:27:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:35:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:in
> `call'
> /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in
> `context'
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:in
> `block in call'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
> `_run__3744690573936767921__call__3874693145034970527__callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
> `__run_callback'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in
> `_run_call_callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in
> `run_callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in
> `call_app'
> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in
> `forward'
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in
> `pass'
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in
> `invalidate'
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in
> `call!'
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in
> `method_missing'
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:in
> `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in
> `block in call'
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in
> `each'
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in
> `call'
> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in
> `process_request'
> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in
> `accept_and_process_next_request'
> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:in
> `main_loop'
> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in
> `block (3 levels) in start_threads'
> 2015-06-17 18:29:55 [I] Rendered api/v2/errors/standard_error.json.rabl
> within api/v2/layouts/error_layout (1.0ms)
> 2015-06-17 18:29:55 [I] Completed 500 Internal Server Error in 213ms
> (Views: 7.5ms | ActiveRecord: 76.0ms)
> 2015-06-17 18:30:04 [I] Connecting to database specified by database.yml
> 2015-06-17 18:30:04 [I] Connecting to database specified by database.yml
> 2015-06-17 18:30:05 [I] Fog is not installed - unable to manage compute
> resources
> 2015-06-17 18:30:05 [I] Fog is not installed - unable to manage compute
> resources
> 2015-06-17 18:30:07 [W] Creating scope :completer_scope. Overwriting
> existing method Organization.completer_scope.
> 2015-06-17 18:30:07 [W] Creating scope :completer_scope. Overwriting
> existing method Location.completer_scope.
> 2015-06-17 18:30:07 [W] Creating scope :completer_scope. Overwriting
> existing method Organization.completer_scope.
> 2015-06-17 18:30:07 [W] Creating scope :completer_scope. Overwriting
> existing method Location.completer_scope.
>
>
> On Tuesday, June 16, 2015 at 2:02:18 PM UTC+8, sinux shen wrote:
> >
> > Hi,
> >
> > I want to receive the email alert if a host run some error for puppet, I
> > enabled mail under user--> mail preference, and I am the owner of this
> > host, for a testing, I lock the write privilege and triggered a puppet
> > error: the log does show one line as follows:
> > 2015-06-16 13:47:25 [I] Rendered host_mailer/error_state.html.erb
> > (15.4ms)
> > but I didn't receive any email about that.
> >
> > Thanks
> > Sinux
> >
>
> --
> You received this message because you are subscribed to the Google Groups "Foreman users" group.
> To unsubscribe from this group and stop
I tested smtp, it has the same error, but on foreman 1.8.1, I set it to
postfix, and it works well.Let me try sendmail and let you know know how it
works.
Thanks
Sinux
···
On Wednesday, June 17, 2015 at 7:58:42 PM UTC+8, Daniel Lobato wrote:
>
> On 06/17, sinux shen wrote:
> > Here is some update, on Katello Foreman 1.8.1-1, after modified
> > /etc/foreman/email.yaml as follows:
> >
> > production:
> > delivery_method: :postfix
> This is the error. Rails (Foreman's framework) forces you to set
> delivery_method to :smtp or :sendmail.
>
> :sendmail should work for you as postfix provides a compatible binary:
> http://www.postfix.org/sendmail.1.html
>
> Let us know how that works.
> > smtp_settings:
> > address: mailer.abc.com
> > port: 25
> > domain: abc.com
> > authentication: :none
> > it begin to send out the email when a puppet run failed.
> >
> > But on another foreman (stand along foreman without Katello), version
> > 1.8.2-1, I config the same in /etc/foreman/email.yaml, but it doesn't
> work,
> > here is the error log:
> >
> > 2015-06-17 18:29:55 [I] processing report for test.abc.com
> > 2015-06-17 18:29:55 [E] Invalid delivery method :postfix (RuntimeError)
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/delivery_methods.rb:71:in
>
> > `wrap_delivery_behavior'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/delivery_methods.rb:83:in
>
> > `wrap_delivery_behavior!'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:629:in
>
> > `mail'
> > /usr/share/foreman/app/mailers/application_mailer.rb:11:in `mail'
> > /usr/share/foreman/app/mailers/host_mailer.rb:40:in `block in
> error_state'
> > /usr/share/foreman/app/mailers/application_mailer.rb:49:in
> `set_locale_for'
> > /usr/share/foreman/app/mailers/host_mailer.rb:39:in `error_state'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in
>
> > `process_action'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in
>
> > `process'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in
>
> > `process'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:457:in
>
> > `process'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:452:in
>
> > `initialize'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:439:in
>
> > `new'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:439:in
>
> > `method_missing'
> > /usr/share/foreman/app/models/mail_notification.rb:40:in `block in
> deliver'
> > /usr/share/foreman/app/models/mail_notification.rb:39:in `each'
> > /usr/share/foreman/app/models/mail_notification.rb:39:in `deliver'
> > /usr/share/foreman/app/services/report_importer.rb:107:in
> `inspect_report'
> > /usr/share/foreman/app/services/report_importer.rb:54:in `import'
> > /usr/share/foreman/app/services/report_importer.rb:7:in `import'
> > /usr/share/foreman/app/models/report.rb:85:in `import'
> > /usr/share/foreman/app/controllers/api/v2/reports_controller.rb:40:in
> > `create'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in
>
> > `send_action'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in
>
> > `process_action'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in
>
> > `process_action'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in
>
> > `block in process_action'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:507:in
>
> > `block (5 levels) in
> >
> _run__630090053588925002__process_action__4389392625109928490__callbacks'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
>
> > `block in _conditional_callback_around_7395'
> > /usr/share/foreman/app/controllers/api/v2/base_controller.rb:151:in
> > `disable_json_root'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
>
> > `_conditional_callback_around_7395'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:495:in
>
> > `block (4 levels) in
> >
> _run__630090053588925002__process_action__4389392625109928490__callbacks'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
>
> > `block in _conditional_callback_around_7394'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in
>
> > `around'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in
>
> > `_callback_around_1719'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
>
> > `_conditional_callback_around_7394'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:472:in
>
> > `block (3 levels) in
> >
> _run__630090053588925002__process_action__4389392625109928490__callbacks'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
>
> > `block in _conditional_callback_around_7393'
> > /usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in
> > `set_timezone'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
>
> > `_conditional_callback_around_7393'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:471:in
>
> > `block (2 levels) in
> >
> _run__630090053588925002__process_action__4389392625109928490__callbacks'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
>
> > `block in _conditional_callback_around_7392'
> > /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in
> > `clear_thread'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
>
> > `_conditional_callback_around_7392'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:437:in
>
> > `block in
> >
> _run__630090053588925002__process_action__4389392625109928490__callbacks'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
>
> > `block in _conditional_callback_around_7391'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in
>
> > `around'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in
>
> > `_callback_around_13'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
>
> > `_conditional_callback_around_7391'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:403:in
>
> >
> `_run__630090053588925002__process_action__4389392625109928490__callbacks'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
>
> > `__run_callback'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in
>
> > `_run_process_action_callbacks'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in
>
> > `run_callbacks'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in
>
> > `process_action'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in
>
> > `process_action'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in
>
> > `block in process_action'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in
>
> > `block in instrument'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in
>
> > `instrument'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in
>
> > `instrument'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in
>
> > `process_action'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in
>
> > `process_action'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in
>
> > `process_action'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in
>
> > `process'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in
>
> > `process'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in
>
> > `dispatch'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in
>
> > `dispatch'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:in
>
> > `block in action'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in
>
> > `dispatch'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/mapper.rb:42:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in
>
> > `block in call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in
>
> > `each'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/static_dispatcher.rb:65:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:97:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/middleware/checksum_in_headers.rb:27:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:35:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:in
>
> > `call'
> > /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in
>
> > `context'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:in
>
> > `block in call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
>
> > `_run__3744690573936767921__call__3874693145034970527__callbacks'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
>
> > `__run_callback'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in
>
> > `_run_call_callbacks'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in
>
> > `run_callbacks'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in
>
> > `call_app'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:in
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in
>
> > `forward'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in
>
> > `pass'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in
>
> > `invalidate'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in
>
> > `call!'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in
>
> > `method_missing'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:in
>
> > `call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in
>
> > `block in call'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in
>
> > `each'
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in
>
> > `call'
> >
> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in
>
> > `process_request'
> >
> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in
>
> > `accept_and_process_next_request'
> >
> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:in
>
> > `main_loop'
> >
> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in
>
> > `block (3 levels) in start_threads'
> > 2015-06-17 18:29:55 [I] Rendered
> api/v2/errors/standard_error.json.rabl
> > within api/v2/layouts/error_layout (1.0ms)
> > 2015-06-17 18:29:55 [I] Completed 500 Internal Server Error in 213ms
> > (Views: 7.5ms | ActiveRecord: 76.0ms)
> > 2015-06-17 18:30:04 [I] Connecting to database specified by database.yml
> > 2015-06-17 18:30:04 [I] Connecting to database specified by database.yml
> > 2015-06-17 18:30:05 [I] Fog is not installed - unable to manage compute
> > resources
> > 2015-06-17 18:30:05 [I] Fog is not installed - unable to manage compute
> > resources
> > 2015-06-17 18:30:07 [W] Creating scope :completer_scope. Overwriting
> > existing method Organization.completer_scope.
> > 2015-06-17 18:30:07 [W] Creating scope :completer_scope. Overwriting
> > existing method Location.completer_scope.
> > 2015-06-17 18:30:07 [W] Creating scope :completer_scope. Overwriting
> > existing method Organization.completer_scope.
> > 2015-06-17 18:30:07 [W] Creating scope :completer_scope. Overwriting
> > existing method Location.completer_scope.
> >
> >
> > On Tuesday, June 16, 2015 at 2:02:18 PM UTC+8, sinux shen wrote:
> > >
> > > Hi,
> > >
> > > I want to receive the email alert if a host run some error for puppet,
> I
> > > enabled mail under user--> mail preference, and I am the owner of this
> > > host, for a testing, I lock the write privilege and triggered a puppet
> > > error: the log does show one line as follows:
> > > 2015-06-16 13:47:25 [I] Rendered host_mailer/error_state.html.erb
> > > (15.4ms)
> > > but I didn't receive any email about that.
> > >
> > > Thanks
> > > Sinux
> > >
> >
> > --
> > 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 http://groups.google.com/group/foreman-users.
> > For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Daniel Lobato Garcia
>
> @eLobatoss
> blog.daniellobato.me
> daniellobato.me
>
> GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
> Keybase: https://keybase.io/elobato
>
oh, it's my bad, what I tested was postfix and mail, not smtp, now I tested
smtp and it worked, sorry about that.
···
On Thursday, June 18, 2015 at 10:29:14 PM UTC+8, sinux shen wrote:
>
> I tested smtp, it has the same error, but on foreman 1.8.1, I set it to
> postfix, and it works well.Let me try sendmail and let you know know how it
> works.
>
> Thanks
> Sinux
>
> On Wednesday, June 17, 2015 at 7:58:42 PM UTC+8, Daniel Lobato wrote:
>>
>> On 06/17, sinux shen wrote:
>> > Here is some update, on Katello Foreman 1.8.1-1, after modified
>> > /etc/foreman/email.yaml as follows:
>> >
>> > production:
>> > delivery_method: :postfix
>> This is the error. Rails (Foreman's framework) forces you to set
>> delivery_method to :smtp or :sendmail.
>>
>> :sendmail should work for you as postfix provides a compatible binary:
>> http://www.postfix.org/sendmail.1.html
>>
>> Let us know how that works.
>> > smtp_settings:
>> > address: mailer.abc.com
>> > port: 25
>> > domain: abc.com
>> > authentication: :none
>> > it begin to send out the email when a puppet run failed.
>> >
>> > But on another foreman (stand along foreman without Katello), version
>> > 1.8.2-1, I config the same in /etc/foreman/email.yaml, but it doesn't
>> work,
>> > here is the error log:
>> >
>> > 2015-06-17 18:29:55 [I] processing report for test.abc.com
>> > 2015-06-17 18:29:55 [E] Invalid delivery method :postfix (RuntimeError)
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/delivery_methods.rb:71:in
>>
>> > `wrap_delivery_behavior'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/delivery_methods.rb:83:in
>>
>> > `wrap_delivery_behavior!'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:629:in
>>
>> > `mail'
>> > /usr/share/foreman/app/mailers/application_mailer.rb:11:in `mail'
>> > /usr/share/foreman/app/mailers/host_mailer.rb:40:in `block in
>> error_state'
>> > /usr/share/foreman/app/mailers/application_mailer.rb:49:in
>> `set_locale_for'
>> > /usr/share/foreman/app/mailers/host_mailer.rb:39:in `error_state'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in
>>
>> > `process_action'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in
>>
>> > `process'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in
>>
>> > `process'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:457:in
>>
>> > `process'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:452:in
>>
>> > `initialize'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:439:in
>>
>> > `new'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionmailer-3.2.8/lib/action_mailer/base.rb:439:in
>>
>> > `method_missing'
>> > /usr/share/foreman/app/models/mail_notification.rb:40:in `block in
>> deliver'
>> > /usr/share/foreman/app/models/mail_notification.rb:39:in `each'
>> > /usr/share/foreman/app/models/mail_notification.rb:39:in `deliver'
>> > /usr/share/foreman/app/services/report_importer.rb:107:in
>> `inspect_report'
>> > /usr/share/foreman/app/services/report_importer.rb:54:in `import'
>> > /usr/share/foreman/app/services/report_importer.rb:7:in `import'
>> > /usr/share/foreman/app/models/report.rb:85:in `import'
>> > /usr/share/foreman/app/controllers/api/v2/reports_controller.rb:40:in
>> > `create'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in
>>
>> > `send_action'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in
>>
>> > `process_action'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in
>>
>> > `process_action'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in
>>
>> > `block in process_action'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:507:in
>>
>> > `block (5 levels) in
>> >
>> _run__630090053588925002__process_action__4389392625109928490__callbacks'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
>>
>> > `block in _conditional_callback_around_7395'
>> > /usr/share/foreman/app/controllers/api/v2/base_controller.rb:151:in
>> > `disable_json_root'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
>>
>> > `_conditional_callback_around_7395'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:495:in
>>
>> > `block (4 levels) in
>> >
>> _run__630090053588925002__process_action__4389392625109928490__callbacks'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
>>
>> > `block in _conditional_callback_around_7394'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in
>>
>> > `around'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in
>>
>> > `_callback_around_1719'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
>>
>> > `_conditional_callback_around_7394'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:472:in
>>
>> > `block (3 levels) in
>> >
>> _run__630090053588925002__process_action__4389392625109928490__callbacks'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
>>
>> > `block in _conditional_callback_around_7393'
>> > /usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in
>> > `set_timezone'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
>>
>> > `_conditional_callback_around_7393'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:471:in
>>
>> > `block (2 levels) in
>> >
>> _run__630090053588925002__process_action__4389392625109928490__callbacks'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
>>
>> > `block in _conditional_callback_around_7392'
>> > /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in
>> > `clear_thread'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
>>
>> > `_conditional_callback_around_7392'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:437:in
>>
>> > `block in
>> >
>> _run__630090053588925002__process_action__4389392625109928490__callbacks'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
>>
>> > `block in _conditional_callback_around_7391'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in
>>
>> > `around'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in
>>
>> > `_callback_around_13'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
>>
>> > `_conditional_callback_around_7391'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:403:in
>>
>> >
>> `_run__630090053588925002__process_action__4389392625109928490__callbacks'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
>>
>> > `__run_callback'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in
>>
>> > `_run_process_action_callbacks'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in
>>
>> > `run_callbacks'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in
>>
>> > `process_action'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in
>>
>> > `process_action'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in
>>
>> > `block in process_action'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in
>>
>> > `block in instrument'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in
>>
>> > `instrument'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in
>>
>> > `instrument'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in
>>
>> > `process_action'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in
>>
>> > `process_action'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in
>>
>> > `process_action'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in
>>
>> > `process'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in
>>
>> > `process'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in
>>
>> > `dispatch'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in
>>
>> > `dispatch'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:in
>>
>> > `block in action'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in
>>
>> > `dispatch'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/mapper.rb:42:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in
>>
>> > `block in call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in
>>
>> > `each'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/static_dispatcher.rb:65:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:97:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/middleware/checksum_in_headers.rb:27:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:35:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:in
>>
>> > `call'
>> > /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in
>> `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in
>>
>> > `context'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:in
>>
>> > `block in call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
>>
>> > `_run__3744690573936767921__call__3874693145034970527__callbacks'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
>>
>> > `__run_callback'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in
>>
>> > `_run_call_callbacks'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in
>>
>> > `run_callbacks'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in
>>
>> > `call_app'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:in
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in
>>
>> > `forward'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in
>>
>> > `pass'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in
>>
>> > `invalidate'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in
>>
>> > `call!'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in
>>
>> > `method_missing'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:in
>>
>> > `call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in
>>
>> > `block in call'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in
>>
>> > `each'
>> >
>> /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in
>>
>> > `call'
>> >
>> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in
>>
>> > `process_request'
>> >
>> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in
>>
>> > `accept_and_process_next_request'
>> >
>> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:in
>>
>> > `main_loop'
>> >
>> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in
>>
>> > `block (3 levels) in start_threads'
>> > 2015-06-17 18:29:55 [I] Rendered
>> api/v2/errors/standard_error.json.rabl
>> > within api/v2/layouts/error_layout (1.0ms)
>> > 2015-06-17 18:29:55 [I] Completed 500 Internal Server Error in 213ms
>> > (Views: 7.5ms | ActiveRecord: 76.0ms)
>> > 2015-06-17 18:30:04 [I] Connecting to database specified by
>> database.yml
>> > 2015-06-17 18:30:04 [I] Connecting to database specified by
>> database.yml
>> > 2015-06-17 18:30:05 [I] Fog is not installed - unable to manage compute
>> > resources
>> > 2015-06-17 18:30:05 [I] Fog is not installed - unable to manage compute
>> > resources
>> > 2015-06-17 18:30:07 [W] Creating scope :completer_scope. Overwriting
>> > existing method Organization.completer_scope.
>> > 2015-06-17 18:30:07 [W] Creating scope :completer_scope. Overwriting
>> > existing method Location.completer_scope.
>> > 2015-06-17 18:30:07 [W] Creating scope :completer_scope. Overwriting
>> > existing method Organization.completer_scope.
>> > 2015-06-17 18:30:07 [W] Creating scope :completer_scope. Overwriting
>> > existing method Location.completer_scope.
>> >
>> >
>> > On Tuesday, June 16, 2015 at 2:02:18 PM UTC+8, sinux shen wrote:
>> > >
>> > > Hi,
>> > >
>> > > I want to receive the email alert if a host run some error for
>> puppet, I
>> > > enabled mail under user--> mail preference, and I am the owner of
>> this
>> > > host, for a testing, I lock the write privilege and triggered a
>> puppet
>> > > error: the log does show one line as follows:
>> > > 2015-06-16 13:47:25 [I] Rendered host_mailer/error_state.html.erb
>> > > (15.4ms)
>> > > but I didn't receive any email about that.
>> > >
>> > > Thanks
>> > > Sinux
>> > >
>> >
>> > --
>> > 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 http://groups.google.com/group/foreman-users.
>> > For m