{"action":"created","issue":{"url":"https://api.github.com/repos/aws/opsworks-cookbooks/issues/213","labels_url":"https://api.github.com/repos/aws/opsworks-cookbooks/issues/213/labels{/name}","comments_url":"https://api.github.com/repos/aws/opsworks-cookbooks/issues/213/comments","events_url":"https://api.github.com/repos/aws/opsworks-cookbooks/issues/213/events","html_url":"https://github.com/aws/opsworks-cookbooks/issues/213","id":42688636,"number":213,"title":"Chef unable to find my app directory from /srv/www/","user":{"login":"chetandhembre","id":1058442,"avatar_url":"https://avatars.githubusercontent.com/u/1058442?v=3","gravatar_id":"","url":"https://api.github.com/users/chetandhembre","html_url":"https://github.com/chetandhembre","followers_url":"https://api.github.com/users/chetandhembre/followers","following_url":"https://api.github.com/users/chetandhembre/following{/other_user}","gists_url":"https://api.github.com/users/chetandhembre/gists{/gist_id}","starred_url":"https://api.github.com/users/chetandhembre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chetandhembre/subscriptions","organizations_url":"https://api.github.com/users/chetandhembre/orgs","repos_url":"https://api.github.com/users/chetandhembre/repos","events_url":"https://api.github.com/users/chetandhembre/events{/privacy}","received_events_url":"https://api.github.com/users/chetandhembre/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2014-09-13T06:27:06Z","updated_at":"2015-03-25T18:41:12Z","closed_at":null,"body":"Hi, \r\n   From last one week my opswork instances are failing abruptly without some weird resome following is log of it\r\n```\r\n[2014-09-11T19:07:15+00:00] ERROR: Running exception handlers\r\n[2014-09-11T19:07:15+00:00] ERROR: Exception handlers complete\r\n[2014-09-11T19:07:15+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage2/chef-stacktrace.out\r\n[2014-09-11T19:07:15+00:00] ERROR: directory[/srv/www/image_maker/shared] (deploy::nodejs line 3) had an error: Errno::ENOENT: No such file or directory - /srv/www/image_maker\r\n[2014-09-11T19:07:15+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)\r\n```\r\n\r\nand below is compiled version of chef resource which causing this error\r\n```\r\n# Declared in /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy_dir.rb:3:in `block in from_file'\r\n \r\ndirectory(\"/srv/www/image_maker/shared\") do\r\nparams {:user=>\"deploy\", :group=>\"www-data\", :path=>\"/srv/www/image_maker\", :name=>nil}\r\nprovider Chef::Provider::Directory\r\naction [:create]\r\nretries 0\r\nretry_delay 2\r\npath \"/srv/www/image_maker/shared\"\r\nrecursive true\r\ncookbook_name \"deploy\"\r\nrecipe_name \"nodejs\"\r\nmode 504\r\nowner \"deploy\"\r\ngroup \"www-data\"\r\nend\r\n```\r\n\r\nI really do not know whats going on here ? Can someone help me ?\r\nWhen I spin new instance for same configuration all works fine. But after some time (in days) instance failed with above error. If i tried to restart it, It gives some error. "},"comment":{"url":"https://api.github.com/repos/aws/opsworks-cookbooks/issues/comments/86163993","html_url":"https://github.com/aws/opsworks-cookbooks/issues/213#issuecomment-86163993","issue_url":"https://api.github.com/repos/aws/opsworks-cookbooks/issues/213","id":86163993,"user":{"login":"electronym","id":4069360,"avatar_url":"https://avatars.githubusercontent.com/u/4069360?v=3","gravatar_id":"","url":"https://api.github.com/users/electronym","html_url":"https://github.com/electronym","followers_url":"https://api.github.com/users/electronym/followers","following_url":"https://api.github.com/users/electronym/following{/other_user}","gists_url":"https://api.github.com/users/electronym/gists{/gist_id}","starred_url":"https://api.github.com/users/electronym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electronym/subscriptions","organizations_url":"https://api.github.com/users/electronym/orgs","repos_url":"https://api.github.com/users/electronym/repos","events_url":"https://api.github.com/users/electronym/events{/privacy}","received_events_url":"https://api.github.com/users/electronym/received_events","type":"User","site_admin":false},"created_at":"2015-03-25T18:41:12Z","updated_at":"2015-03-25T18:41:12Z","body":"+1 here\r\n\r\nHaving the same issue with EBS-backed instances and only when starting a pre-existing instance from a stopped state. New instances are fine, and manually running \"setup\" on the failed instance fixes it, but it's not a viable solution.\r\n\r\nI'm going to attempt xjlu's workaround, but I'm concerned about creating downstream issues if I change the deploy_to directory, since I have a ton of custom recipes built on top of this. And it's pretty clunky to have to do this in the first place."}}