AWSでシェフとopsworksを実行してcronタスクを作成しようとしています。 書き込みが失敗したため、私はいくつかの許可問題があると思いますが、どこで許可を増やすことができますか?本当に許可を増やす必要がありますか?Opsworksシェフがcronを作成できません
シェフ:
cron 'crontest' do
minute "0"
hour "/2"
day "*"
month "*"
weekday "*"
command "ls"
end
ログ:
Logs from opsworks:
------------------
[2016-09-12T19:47:13+00:00] INFO: Processing cron[crontest] action create (my::crontest line 1)
================================================================================
Error executing action `create` on resource 'cron[crontest]'
================================================================================
Chef::Exceptions::Cron
----------------------
Error updating state of crontest, exit: 1
Resource Declaration:
---------------------
# In /var/chef/runs/de35b7b0-20ad-4903-a5b1-e8e901695b5b/local-mode-cache/cache/cookbooks/my/recipes/crontest.rb
1: cron 'crontest' do
2: minute "0"
3: hour "/2"
4: day "*"
5: month "*"
6: weekday "*"
7: command "ls"
8: end
Compiled Resource:
------------------
# Declared in /var/chef/runs/de35b7b0-20ad-4903-a5b1-e8e901695b5b/local-mode-cache/cache/cookbooks/my/recipes/crontest.rb:1:in `from_file'
cron("crontest") do
action [:create]
retries 0
retry_delay 2
default_guard_interpreter :default
minute "0"
hour "/2"
day "*"
month "*"
weekday "*"
command "ls"
user "root"
declared_type :cron
cookbook_name "my"
recipe_name "crontest"
end
Platform:
---------
x86_64-linux
[2016-09-12T19:47:13+00:00] INFO: Running queued delayed notifications before re-raising exception
[2016-09-12T19:47:13+00:00] ERROR: Running exception handlers
[2016-09-12T19:47:13+00:00] ERROR: Exception handlers complete
[2016-09-12T19:47:13+00:00] FATAL: Stacktrace dumped to /var/chef/runs/de35b7b0-20ad-4903-a5b1-e8e901695b5b/local-mode-cache/cache/chef-stacktrace.out
[2016-09-12T19:47:13+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-09-12T19:47:13+00:00] ERROR: cron[crontest] (my::crontest line 1) had an error: Chef::Exceptions::Cron: Error updating state of crontest, exit: 1
[2016-09-12T19:47:13+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Logs from /var/chef/runs/de35b7b0-20ad-4903-a5b1-e8e901695b5b/local-mode-cache/cache/chef-stacktrace.out
------------------
>>>> Caused by Chef::Exceptions::Cron: Error updating state of crontest, exit: 1
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/provider/cron.rb:232:in `write_crontab'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/provider/cron.rb:157:in `block in action_create'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/mixin/why_run.rb:52:in `add_action'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/provider.rb:176:in `converge_by'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/provider/cron.rb:156:in `action_create'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.13.37/lib/chef/provider.rb:145:in `run_action'
ターゲットシステムの 'hour/2" '有効なcronタイミングですか? cronのいくつかのバージョンは反復構文をサポートしていません。おそらく、新しいcrontabを検証しようとすると失敗するでしょう。 – jedifans