Chef believes dependencies not met - mysql

I have a Chef custom recipe that uses the Opscode 'database' cookbook. I'm using Chef 11.10 and Berkshelf 3.1.3 in an Opsworks stack and have specified the 'database' cookbook in the Berksfile. It pulls down the dependencies correctly and I can see this in the log. Upon running setup, I get a couple of errors; one about a file not being found (and the path indeed doesn't exist) and another, a 412, about dependency precondition of 'mysql' not being met.
I don't know enough Chef to know if the first error would cause the second failure but it certainy appears that the version of the mysql cookbook required is being met. Is there any known issues with this anyone knows of? Here's the output log of the setup command failing:
[2014-09-29T07:32:17+00:00] INFO: Starting chef-zero on port 8889 with repository at repository at /opt/aws/opsworks/current
One version per cookbook
data_bags at /var/lib/aws/opsworks/data/data_bags
nodes at /var/lib/aws/opsworks/data/nodes
[2014-09-29T07:32:18+00:00] INFO: Forking chef instance to converge...
[2014-09-29T07:32:18+00:00] INFO: *** Chef 11.10.4 ***
[2014-09-29T07:32:18+00:00] INFO: Chef-client pid: 2695
[2014-09-29T07:32:19+00:00] INFO: Setting the run_list to ["opsworks_custom_cookbooks::load", "opsworks_custom_cookbooks::execute"] from JSON
[2014-09-29T07:32:19+00:00] WARN: Run List override has been provided.
[2014-09-29T07:32:19+00:00] WARN: Original Run List: [recipe[opsworks_custom_cookbooks::load], recipe[opsworks_custom_cookbooks::execute]]
[2014-09-29T07:32:19+00:00] WARN: Overridden Run List: [recipe[opsworks_custom_cookbooks::load], recipe[opsworks_custom_cookbooks::execute]]
[2014-09-29T07:32:19+00:00] INFO: Run List is [recipe[opsworks_custom_cookbooks::load], recipe[opsworks_custom_cookbooks::execute]]
[2014-09-29T07:32:19+00:00] INFO: Run List expands to [opsworks_custom_cookbooks::load, opsworks_custom_cookbooks::execute]
[2014-09-29T07:32:19+00:00] INFO: Starting Chef Run for www-prod-migration-3.localdomain
[2014-09-29T07:32:19+00:00] INFO: Running start handlers
[2014-09-29T07:32:19+00:00] INFO: Start handlers complete.
[2014-09-29T07:32:19+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found: /reports/nodes/www-prod-migration-3.localdomain/runs
[2014-09-29T07:32:34+00:00] INFO: Loading cookbooks [apache2, dependencies, deploy, gem_support, mod_php5_apache2, mysql, nginx, opsworks_agent_monit, opsworks_aws_flow_ruby, opsworks_berkshelf, opsworks_bundler, opsworks_commons, opsworks_custom_cookbooks, opsworks_initial_setup, opsworks_java, opsworks_nodejs, opsworks_rubygems, packages, passenger_apache2, php, rails, ruby, scm_helper, ssh_users, unicorn]
[2014-09-29T07:32:36+00:00] INFO: Not needed with Chef 11.x (x >= 8) anymore.
[2014-09-29T07:32:36+00:00] INFO: Processing package[git] action install (opsworks_custom_cookbooks::checkout line 11)
[2014-09-29T07:32:38+00:00] INFO: Processing directory[/root/.ssh] action create (opsworks_custom_cookbooks::checkout line 8)
[2014-09-29T07:32:38+00:00] INFO: Processing file[/root/.ssh/config] action touch (opsworks_custom_cookbooks::checkout line 16)
[2014-09-29T07:32:38+00:00] INFO: file[/root/.ssh/config] updated atime and mtime to 2014-09-29 07:32:38 +0000
[2014-09-29T07:32:38+00:00] INFO: Processing execute[echo 'StrictHostKeyChecking no' > /root/.ssh/config] action run (opsworks_custom_cookbooks::checkout line 23)
[2014-09-29T07:32:38+00:00] INFO: Processing template[/root/.ssh/id_dsa] action create (opsworks_custom_cookbooks::checkout line 27)
[2014-09-29T07:32:38+00:00] INFO: Processing git[Download Custom Cookbooks] action checkout (opsworks_custom_cookbooks::checkout line 29)
[2014-09-29T07:32:38+00:00] INFO: Processing ruby_block[Move single cookbook contents into appropriate subdirectory] action run (opsworks_custom_cookbooks::checkout line 64)
[2014-09-29T07:32:38+00:00] INFO: Processing opsworks_berkshelf_runner[Install berkshelf cookbooks] action berks_install (opsworks_berkshelf::install line 54)
[2014-09-29T07:32:38+00:00] INFO: Processing directory[/opt/aws/opsworks/current/berkshelf-cookbooks] action delete (/var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb line 2)
[2014-09-29T07:32:38+00:00] INFO: directory[/opt/aws/opsworks/current/berkshelf-cookbooks] deleted /opt/aws/opsworks/current/berkshelf-cookbooks recursively
[2014-09-29T07:32:38+00:00] INFO: Processing ruby_block[Install the cookbooks specified in the Berksfile and their dependencies] action run (/var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb line 11)
[2014-09-29T07:32:39+00:00] INFO:
Resolving cookbook dependencies...
Using apt (2.6.0)
Using aws (2.4.0)
Using build-essential (2.0.6)
Using chef-sugar (2.3.0)
Using database (2.3.0) from https://github.com/opscode-cookbooks/database.git (at master)
Using mysql (5.5.3)
Using mysql-chef_gem (0.0.5)
Using openssl (2.0.0)
Using postgresql (3.4.6)
Using xfs (1.1.0)
Using yum (3.3.2)
Using yum-mysql-community (0.1.10)
Vendoring apt (2.6.0) to /opt/aws/opsworks/current/berkshelf-cookbooks/apt
Vendoring aws (2.4.0) to /opt/aws/opsworks/current/berkshelf-cookbooks/aws
Vendoring build-essential (2.0.6) to /opt/aws/opsworks/current/berkshelf-cookbooks/build-essential
Vendoring chef-sugar (2.3.0) to /opt/aws/opsworks/current/berkshelf-cookbooks/chef-sugar
Vendoring database (2.3.0) to /opt/aws/opsworks/current/berkshelf-cookbooks/database
Vendoring mysql (5.5.3) to /opt/aws/opsworks/current/berkshelf-cookbooks/mysql
Vendoring mysql-chef_gem (0.0.5) to /opt/aws/opsworks/current/berkshelf-cookbooks/mysql-chef_gem
Vendoring openssl (2.0.0) to /opt/aws/opsworks/current/berkshelf-cookbooks/openssl
Vendoring postgresql (3.4.6) to /opt/aws/opsworks/current/berkshelf-cookbooks/postgresql
Vendoring xfs (1.1.0) to /opt/aws/opsworks/current/berkshelf-cookbooks/xfs
Vendoring yum (3.3.2) to /opt/aws/opsworks/current/berkshelf-cookbooks/yum
Vendoring yum-mysql-community (0.1.10) to /opt/aws/opsworks/current/berkshelf-cookbooks/yum-mysql-community
[2014-09-29T07:32:39+00:00] INFO: ruby_block[Install the cookbooks specified in the Berksfile and their dependencies] called
[2014-09-29T07:32:39+00:00] INFO: Processing execute[ensure correct permissions of custom cookbooks] action run (opsworks_custom_cookbooks::checkout line 82)
[2014-09-29T07:32:39+00:00] INFO: execute[ensure correct permissions of custom cookbooks] ran successfully
[2014-09-29T07:32:39+00:00] INFO: Processing ruby_block[merge all cookbooks sources] action run (opsworks_custom_cookbooks::load line 12)
[2014-09-29T07:32:40+00:00] INFO: ruby_block[merge all cookbooks sources] called
[2014-09-29T07:32:40+00:00] WARN: Skipping final node save because override_runlist was given
[2014-09-29T07:32:40+00:00] INFO: Chef Run complete in 20.634821643 seconds
[2014-09-29T07:32:40+00:00] INFO: Running report handlers
[2014-09-29T07:32:40+00:00] INFO: Report handlers complete
---
[2014-09-29T07:32:42+00:00] INFO: Starting chef-zero on port 8889 with repository at repository at /opt/aws/opsworks/current
One version per cookbook
data_bags at /var/lib/aws/opsworks/data/data_bags
nodes at /var/lib/aws/opsworks/data/nodes
[2014-09-29T07:32:42+00:00] INFO: Forking chef instance to converge...
[2014-09-29T07:32:42+00:00] INFO: *** Chef 11.10.4 ***
[2014-09-29T07:32:42+00:00] INFO: Chef-client pid: 2868
[2014-09-29T07:32:44+00:00] INFO: Setting the run_list to ["opsworks_custom_cookbooks::load", "opsworks_custom_cookbooks::execute"] from JSON
[2014-09-29T07:32:44+00:00] WARN: Run List override has been provided.
[2014-09-29T07:32:44+00:00] WARN: Original Run List: [recipe[opsworks_custom_cookbooks::load], recipe[opsworks_custom_cookbooks::execute]]
[2014-09-29T07:32:44+00:00] WARN: Overridden Run List: [recipe[opsworks_initial_setup], recipe[ssh_host_keys], recipe[ssh_users], recipe[mysql::client], recipe[dependencies], recipe[ebs], recipe[opsworks_ganglia::client], recipe[opsworks_stack_state_sync], recipe[mycustom-setup::nginx], recipe[mycustom-setup::php], recipe[mycustom-setup::nfs], recipe[mycustom-setup::framework], recipe[mycustom-setup::timezone], recipe[mycustom-setup::logrotate], recipe[newrelic::default], recipe[newrelic::php-agent], recipe[database::mysql], recipe[deploy::default], recipe[mycustom-deploy::repository], recipe[mycustom-deploy::nginx-site], recipe[mycustom-deploy::php-site], recipe[test_suite], recipe[opsworks_cleanup]]
[2014-09-29T07:32:44+00:00] INFO: Run List is [recipe[opsworks_initial_setup], recipe[ssh_host_keys], recipe[ssh_users], recipe[mysql::client], recipe[dependencies], recipe[ebs], recipe[opsworks_ganglia::client], recipe[opsworks_stack_state_sync], recipe[mycustom-setup::nginx], recipe[mycustom-setup::php], recipe[mycustom-setup::nfs], recipe[mycustom-setup::framework], recipe[mycustom-setup::timezone], recipe[mycustom-setup::logrotate], recipe[newrelic::default], recipe[newrelic::php-agent], recipe[database::mysql], recipe[deploy::default], recipe[mycustom-deploy::repository], recipe[mycustom-deploy::nginx-site], recipe[mycustom-deploy::php-site], recipe[test_suite], recipe[opsworks_cleanup]]
[2014-09-29T07:32:44+00:00] INFO: Run List expands to [opsworks_initial_setup, ssh_host_keys, ssh_users, mysql::client, dependencies, ebs, opsworks_ganglia::client, opsworks_stack_state_sync, mycustom-setup::nginx, mycustom-setup::php, mycustom-setup::nfs, mycustom-setup::framework, mycustom-setup::timezone, mycustom-setup::logrotate, newrelic::default, newrelic::php-agent, database::mysql, deploy::default, mycustom-deploy::repository, mycustom-deploy::nginx-site, mycustom-deploy::php-site, test_suite, opsworks_cleanup]
[2014-09-29T07:32:44+00:00] INFO: Starting Chef Run for www-prod-migration-3.localdomain
[2014-09-29T07:32:44+00:00] INFO: Running start handlers
[2014-09-29T07:32:44+00:00] INFO: Start handlers complete.
[2014-09-29T07:32:44+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found: /reports/nodes/www-prod-migration-3.localdomain/runs
[2014-09-29T07:32:54+00:00] INFO: HTTP Request Returned 412 Precondition Failed: Could not satisfy version constraints for: mysql
================================================================================
Error Resolving Cookbooks for Run List:
================================================================================
Missing Cookbooks:
------------------
Could not satisfy version constraints for: mysql
Expanded Run List:
------------------
* opsworks_initial_setup
* ssh_host_keys
* ssh_users
* mysql::client
* dependencies
* ebs
* opsworks_ganglia::client
* opsworks_stack_state_sync
* mycustom-setup::nginx
* mycustom-setup::php
* mycustom-setup::nfs
* mycustom-setup::framework
* mycustom-setup::timezone
* mycustom-setup::logrotate
* newrelic::default
* newrelic::php-agent
* database::mysql
* deploy::default
* mycustom-deploy::repository
* mycustom-deploy::nginx-site
* mycustom-deploy::php-site
* test_suite
* opsworks_cleanup
[2014-09-29T07:32:55+00:00] ERROR: Running exception handlers
[2014-09-29T07:32:55+00:00] ERROR: Exception handlers complete
[2014-09-29T07:32:55+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage2/chef-stacktrace.out
[2014-09-29T07:32:55+00:00] ERROR: 412 "Precondition Failed"
[2014-09-29T07:32:55+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
here's the Berksfile:
source "https://supermarket.getchef.com"
cookbook "database" , "= 2.3.0" , git: "https://github.com/opscode-cookbooks/database.git"
here's the interesting part of the metadata for the cookbook:
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1'
recipe 'mycustom-deploy::cron', 'Set up cron jobs'
recipe 'mycustom::default', 'Returns a fatal error'
recipe 'mycustom::nginx-site', 'configures Nginx for the new site'
recipe 'mycustom::p4ucron', '???'
recipe 'mycustom::php-site', 'Configures php for the new site'
recipe 'mycustom::service', 'Defines services with their allowed parameters'
recipe 'mycustom::repository', '???'
%w{ amazon }.each do |os|
supports os
end
depends 'mycustom-setup'
depends 'database'
There are also some other custom cookbooks, such as the 'mycustom-setup' which is a dependency for this one. I presume I should look through all of these for clashes?

Check your metadata.rb vs Berksfile cookbooks vs dependencies.
I had the same issue, but within AWS OpsWorks (effectively Chef Solo for this purpose) and the primary problem was rooted in the inclusion of a cookbook in metadata.rb. Removing that resolved the issue. The topic is covered/commented on in this post.

Related

SSIS (SQL Server Integration Services) installation failed

installing the Microsoft.DataTools.IntegrationServices.exe
on a Windows 10 PC, with Visual Studio 2019 already installed,
I got this error:
Can anyone help me understand why this happens?
Thanks a lot in advance.
Luis
Here the last part of the log file:
[5CD0:13EC][2021-05-31T19:42:29]i319: Applied execute package: ISVsix,
result: 0x80131500, restart: None
[5CD0:13EC][2021-05-31T19:42:29]e000: Error 0x80131500: Failed to
execute EXE package. [0AEC:278C][2021-05-31T19:42:29]i329: Removed
package dependency provider: ISVsix, package: ISVsix
[0AEC:278C][2021-05-31T19:42:29]i351: Removing cached package: ISVsix,
from path: C:\ProgramData\Package
Cache\15160B731819F56D87A626F9A2777550340022D7
[0AEC:278C][2021-05-31T19:42:29]i326: Removed dependency:
{ab4889d7-79a3-40dc-9c9e-ccbeca99d453} on package provider:
ISVsixPreInstall, package ISVsixPreInstall
[5CD0:13EC][2021-05-31T19:42:29]i000: MainViewModel.OnPackageAction:
Install Started for package Microsoft SQL Server Integration Services
Projects Pre Install (id: ISVsixPreInstall)
[5CD0:13EC][2021-05-31T19:42:29]i000:
MainViewModel.OnPackageActionProgress: Percent completed: 100, Overall
progress: 14 [0AEC:278C][2021-05-31T19:42:29]i301: Applying rollback
package: ISVsixPreInstall, action: Uninstall, path:
C:\ProgramData\Package
Cache\BB952DD82F1ADAE438C26E4EE6C94F84C07CB447\ISVsixPreInstall.exe,
arguments: '"C:\ProgramData\Package
Cache\BB952DD82F1ADAE438C26E4EE6C94F84C07CB447\ISVsixPreInstall.exe"
/instanceIds:"2904af6a,6f5e5ef0"
/log:"C:\Users\Luigi\AppData\Local\Temp\SsdtisSetup\Microsoft.DataTools.IntegrationServices_20210531194052_0_ISVsixPreInstall.log"
/u' [5CD0:13EC][2021-05-31T19:42:29]i000:
MainViewModel.OnPackageAction: Install Completed for package Microsoft
SQL Server Integration Services Projects Pre Install (id:
ISVsixPreInstall) [5CD0:13EC][2021-05-31T19:42:29]i319: Applied
rollback package: ISVsixPreInstall, result: 0x0, restart: None
[0AEC:278C][2021-05-31T19:42:29]i329: Removed package dependency
provider: ISVsixPreInstall, package: ISVsixPreInstall
[0AEC:278C][2021-05-31T19:42:29]i351: Removing cached package:
ISVsixPreInstall, from path: C:\ProgramData\Package
Cache\BB952DD82F1ADAE438C26E4EE6C94F84C07CB447
[5CD0:13EC][2021-05-31T19:42:29]i000:
MainViewModel.OnPackageActionProgress: Percent completed: 100, Overall
progress: 100 [0AEC:278C][2021-05-31T19:42:29]i330: Removed bundle
dependency provider: {ab4889d7-79a3-40dc-9c9e-ccbeca99d453}
[0AEC:278C][2021-05-31T19:42:29]i352: Removing cached bundle:
{ab4889d7-79a3-40dc-9c9e-ccbeca99d453}, from path:
C:\ProgramData\Package Cache{ab4889d7-79a3-40dc-9c9e-ccbeca99d453}
[5CD0:13EC][2021-05-31T19:42:29]e000: MainViewModel.OnBundleAction:
Bundle action failed: Unknown error (0x80131500) (0x80131500)
[5CD0:13EC][2021-05-31T19:42:29]i399: Apply complete, result:
0x80131500, restart: None, ba requested restart: No
[5CD0:4D80][2021-05-31T19:48:12]i000: MainViewModel.OpenUrl: Opening
url:
C:\Users\Luigi\AppData\Local\Temp\SsdtisSetup\Microsoft.DataTools.IntegrationServices_20210531194052.log
[5CD0:4D80][2021-05-31T20:04:01]i000: MainViewModel.OpenUrl: Opening
url:
C:\Users\Luigi\AppData\Local\Temp\SsdtisSetup\Microsoft.DataTools.IntegrationServices_20210531194052.log
And here only the ERROR rows:
[0AEC:278C][2021-05-31T19:42:29]e000: Error 0x80131500: Process
returned error: 0x80131500 [0AEC:278C][2021-05-31T19:42:29]e000: Error
0x80131500: Failed to execute EXE package.
[5CD0:13EC][2021-05-31T19:42:29]e000: Error 0x80131500: Failed to
configure per-machine EXE package. ...
[5CD0:13EC][2021-05-31T19:42:29]e000: Error 0x80131500: Failed to
execute EXE package. ... [5CD0:13EC][2021-05-31T19:42:29]e000:
MainViewModel.OnBundleAction: Bundle action failed: Unknown error
(0x80131500) (0x80131500)
After hours trying to figure out why my installation was failing, I found a post where someone suggested to repair Visual Studio installations via VS Installer, I did it, of course this meant that the enviroment was going to be restored as new, but it solved my issue.
I hope this could help you friend, have a nice day!
For me, the reason of failure was my PC was missing some of the target packs. No need to Repair the installation.
I installed .NET 4, 4.5 and 4.7 targeting packs from VS installation media and the SSIS installation succeeded smoothly.
I solved this problem by following:
Installed all .Net Framework versions 4.X with
Visual Studio Installer
I also tried to install Microsoft.DataTools.IntegrationServices.exe on a Windows 10 PC, with Visual Studio 2019 already installed.
Try running the .exe file with "Administrator" privileges.
My error code was "Unknown error (0xffffffff) (0xFFFFFFFF)

Cannot set configuration in Elastic Beanstalk

I have 4 Elastic Beanstalk deployments: 3 are Corretto 8 and the other one is Corretto 11.
On the Corretto 8 deployments, I can set new configuration without issue. On the Corretto 11 instance, however, any attempt to set a new configuration fails and causes a rollback.
The Corretto versions might not be the problem, but it's the only difference I can see. All 4 apps are Spring Boot apps that run as web servers (i.e embedded tomcat with exposed web ports). I am trying to set the exact same configuration name and value, and it only fails on the one instance.
The configuration I'm trying to set is pretty simple:
VALIDATE_RENEWALS = true
Even just trying to set DEBUG = true causes a failure and rollback.
I don't see a lot of information from the console about what's failing. Here is the event log:
2020-03-16 13:55:17 UTC-0600 INFO The environment was reverted to the previous configuration setting.
2020-03-16 13:54:45 UTC-0600 ERROR During an aborted deployment, some instances may have deployed the new application version. To ensure all instances are running the same version, re-deploy the appropriate application version.
2020-03-16 13:54:45 UTC-0600 ERROR Failed to deploy configuration.
2020-03-16 13:54:45 UTC-0600 ERROR Unsuccessful command execution on instance id(s) 'i-00553f4ac36afd327'. Aborting the operation.
2020-03-16 13:54:45 UTC-0600 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2020-03-16 13:54:45 UTC-0600 ERROR [Instance: i-00553f4ac36afd327] Command failed on instance. An unexpected error has occurred [ErrorCode: 0000000001].
2020-03-16 13:54:20 UTC-0600 INFO Updating environment XXX's configuration settings.
2020-03-16 13:54:15 UTC-0600 INFO Environment update is starting.
I've also downloaded the full set of logs for the instance and don't see anything obvious. The app stdout doesn't have any errors or exceptions, it just starts normally and then gets terminated. None of the other log files have messages around the times above, so I'm really not sure what else I can look at.
Edit
The times don't line up but I do see this in eb-engine.log file:
2020/03/16 17:54:38.508634 [INFO] checking whether command is applicable to this instance...
2020/03/16 17:54:38.508658 [INFO] this command is applicable to the instance, thus instance should execute command
2020/03/16 17:54:38.508665 [INFO] check whether this is an enhanced env...
2020/03/16 17:54:38.508794 [INFO] Executing instruction: StageJavaApplication
2020/03/16 17:54:38.508858 [ERROR] GetArchivedFileType with file /opt/elasticbeanstalk/deployment/app_source_bundle failed with error open /opt/elasticbeanstalk/deployment/app_source_bundle: no such file or directory
2020/03/16 17:54:38.508868 [ERROR] An error occurred during execution of command [config-deploy] - [StageJavaApplication]. Stop running the command. Error: staging java app failed with error GetArchivedFileType with file /opt/elasticbeanstalk/deployment/app_source_bundle failed with error open /opt/elasticbeanstalk/deployment/app_source_bundle: no such file or directory

ejabberd 19.05 not working with mod_log_chat

installed ejabberd от FreeBSD
then install mod_log_chat (ejabberdctl modules_update_specs -> ejabberdctl module_install mod_log_chat) and see error when starting ejabberd:
[error] Supervisor ejabberd_sup had child ejabberd_gen_mod_sup started with gen_mod:start_link() at undefined exit with reason {'EXIT',{undef,[{econf,any,[],[]},{mod_log_chat,mod_opt_type,1,[{file,"/root/.ejabberd-modules/sources/ejabberd-contrib/mod_log_chat/src/mod_log_chat.erl"},{line,282}]},{gen_mod,'-get_validators/2-fun-1-',3,[{file,"src/gen_mod.erl"},{line,512}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{gen_mod,get_validators,2,[{file,"src/gen_mod.erl"},{line,499}]},{gen_mod,validate_opts,3,[{file,"src/gen_mod.erl"},{line,557}]},{gen_mod,start_module,5,[{file,"src/gen_mod.erl"},{line,209}]},{lists,foreach,...}]}} in context start_error
02:36:32.939 [critical] Failed to start ejabberd application: {error,{shutdown,{failed_to_start_child,ejabberd_gen_mod_sup,{'EXIT',{undef,[{econf,any,[],[]},{mod_log_chat,mod_opt_type,1,[{file,"/root/.ejabberd-modules/sources/ejabberd-contrib/mod_log_chat/src/mod_log_chat.erl"},{line,282}]},{gen_mod,'-get_validators/2-fun-1-',3,[{file,"src/gen_mod.erl"},{line,512}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{gen_mod,get_validators,2,[{file,"src/gen_mod.erl"},{line,499}]},{gen_mod,validate_opts,3,[{file,"src/gen_mod.erl"},{line,557}]},{gen_mod,start_module,5,[{file,"src/gen_mod.erl"},{line,209}]},{lists,foreach,2,[{file,"lists.erl"},{line,1338}]}]}}}}}
Right, mod_log_chat requires ejabberd 19.08 or higher since this commit: https://github.com/processone/ejabberd-contrib/commit/857d350a7119d63fc85555cc66df7ff923b91e39
That was not documented in the module README.txt file...
You have two solutions:
Upgrade your ejabberd 19.05 to 19.08 or higher
or Downgrade your mod_log_chat source code to a version older than the mentioned one.

Opsworks instance fails to start : Status: start_failed: No such cookbook: apt

I have created a cloudformation template that creates opsworks resources: stack, layer, app and instance. I added my cookbook to S3 and I tested my template, all the resources are successfully created except the opsworks instance and I get this error :
CREATE_FAILED AWS::OpsWorks::Instance MyInstance ff45a8d0-9adf-40a4-a049-f2329a9fa1f0 failed. Status=start_failed
Could any one tell me where should I check, and what is the cause of that?
Also, I have tried so many instance types, memory optimised but still getting the error. Please Help. Thank you very much.
Here are the logs :
[2016-12-15T13:58:12+00:00] INFO: directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f] created directory /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f
[2016-12-15T13:58:12+00:00] INFO: Processing directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 92)
[2016-12-15T13:58:12+00:00] INFO: directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags] created directory /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags
[2016-12-15T13:58:12+00:00] INFO: Processing directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/nodes] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 97)
[2016-12-15T13:58:12+00:00] INFO: directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/nodes] created directory /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/nodes
[2016-12-15T13:58:12+00:00] INFO: Processing template[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/client.rb] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 106)
[2016-12-15T13:58:12+00:00] INFO: template[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/client.rb] created file /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/client.rb
[2016-12-15T13:58:12+00:00] INFO: template[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/client.rb] updated file contents /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/client.rb
[2016-12-15T13:58:12+00:00] INFO: Processing file[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/attribs.json] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 114)
[2016-12-15T13:58:12+00:00] INFO: file[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/attribs.json] created file /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/attribs.json
[2016-12-15T13:58:12+00:00] INFO: file[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/attribs.json] updated file contents /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/attribs.json
[2016-12-15T13:58:12+00:00] INFO: Processing directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_app] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124)
[2016-12-15T13:58:12+00:00] INFO: directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_app] created directory /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_app
[2016-12-15T13:58:12+00:00] INFO: Processing directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_instance] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124)
[2016-12-15T13:58:12+00:00] INFO: directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_instance] created directory /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_instance
[2016-12-15T13:58:12+00:00] INFO: Processing file[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_instance/script.json] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 208)
[2016-12-15T13:58:12+00:00] INFO: file[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_instance/script.json] created file /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_instance/script.json
[2016-12-15T13:58:12+00:00] INFO: file[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_instance/script.json] updated file contents /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_instance/script.json
[2016-12-15T13:58:12+00:00] INFO: Processing directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_layer] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124)
[2016-12-15T13:58:12+00:00] INFO: directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_layer] created directory /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_layer
[2016-12-15T13:58:12+00:00] INFO: Processing file[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_layer/node.json] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 208)
[2016-12-15T13:58:12+00:00] INFO: file[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_layer/node.json] created file /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_layer/node.json
[2016-12-15T13:58:12+00:00] INFO: file[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_layer/node.json] updated file contents /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_layer/node.json
[2016-12-15T13:58:12+00:00] INFO: Processing directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_stack] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124)
[2016-12-15T13:58:12+00:00] INFO: directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_stack] created directory /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_stack
[2016-12-15T13:58:12+00:00] INFO: Processing file[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_stack/a0dc4b91-63dc-4947-95c2-f28d2fae00fb.json] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 208)
[2016-12-15T13:58:12+00:00] INFO: file[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_stack/a0dc4b91-63dc-4947-95c2-f28d2fae00fb.json] created file /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_stack/a0dc4b91-63dc-4947-95c2-f28d2fae00fb.json
[2016-12-15T13:58:12+00:00] INFO: file[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_stack/a0dc4b91-63dc-4947-95c2-f28d2fae00fb.json] updated file contents /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_stack/a0dc4b91-63dc-4947-95c2-f28d2fae00fb.json
[2016-12-15T13:58:12+00:00] INFO: Processing directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_command] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124)
[2016-12-15T13:58:12+00:00] INFO: directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_command] created directory /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_command
[2016-12-15T13:58:12+00:00] INFO: Processing file[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_command/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f.json] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 208)
[2016-12-15T13:58:12+00:00] INFO: file[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_command/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f.json] created file /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_command/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f.json
[2016-12-15T13:58:12+00:00] INFO: file[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_command/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f.json] updated file contents /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_command/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f.json
[2016-12-15T13:58:12+00:00] INFO: Processing directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_user] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124)
[2016-12-15T13:58:12+00:00] INFO: directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_user] created directory /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_user
[2016-12-15T13:58:12+00:00] INFO: Processing directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_elastic_load_balancer] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124)
[2016-12-15T13:58:12+00:00] INFO: directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_elastic_load_balancer] created directory /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_elastic_load_balancer
[2016-12-15T13:58:12+00:00] INFO: Processing directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_rds_db_instance] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124)
[2016-12-15T13:58:12+00:00] INFO: directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_rds_db_instance] created directory /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_rds_db_instance
[2016-12-15T13:58:12+00:00] INFO: Processing directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_ecs_cluster] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124)
[2016-12-15T13:58:12+00:00] INFO: directory[/var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_ecs_cluster] created directory /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags/aws_opsworks_ecs_cluster
[2016-12-15T13:58:12+00:00] WARN: Skipping final node save because override_runlist was given
[2016-12-15T13:58:12+00:00] INFO: Chef Run complete in 30.522850769 seconds
[2016-12-15T13:58:12+00:00] INFO: Skipping removal of unused files from the cache
[2016-12-15T13:58:12+00:00] INFO: Running report handlers
[2016-12-15T13:58:12+00:00] INFO: Report handlers complete
[2016-12-15T13:58:13+00:00] INFO: Started chef-zero at chefzero://localhost:8889 with repository at /var/chef
One version per cookbook
data_bags at /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/data_bags
nodes at /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/nodes
[2016-12-15T13:58:13+00:00] INFO: Forking chef instance to converge...
[2016-12-15T13:58:13+00:00] INFO: *** Chef 12.16.42 ***
[2016-12-15T13:58:13+00:00] INFO: Platform: x86_64-linux
[2016-12-15T13:58:13+00:00] INFO: Chef-client pid: 3500
[2016-12-15T13:58:14+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found: chefzero://localhost:8889/nodes/script.localdomain
[2016-12-15T13:58:14+00:00] INFO: Setting the run_list to ["recipe[cassandra-php-driver::setup]", "recipe[security::setup]"] from CLI options
[2016-12-15T13:58:14+00:00] INFO: Run List is [recipe[cassandra-php-driver::setup], recipe[security::setup]]
[2016-12-15T13:58:14+00:00] INFO: Run List expands to [cassandra-php-driver::setup, security::setup]
[2016-12-15T13:58:14+00:00] INFO: Starting Chef Run for script.localdomain
[2016-12-15T13:58:14+00:00] INFO: Running start handlers
[2016-12-15T13:58:14+00:00] INFO: Start handlers complete.
[2016-12-15T13:58:14+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found:
[2016-12-15T13:58:14+00:00] INFO: HTTP Request Returned 412 Precondition Failed: No such cookbook: apt
================================================================================
Error Resolving Cookbooks for Run List:
================================================================================
Missing Cookbooks:
------------------
No such cookbook: apt
Expanded Run List:
------------------
* cassandra-php-driver::setup
* security::setup
Platform:
---------
x86_64-linux
[2016-12-15T13:58:14+00:00] ERROR: Running exception handlers
[2016-12-15T13:58:14+00:00] ERROR: Exception handlers complete
[2016-12-15T13:58:14+00:00] FATAL: Stacktrace dumped to /var/chef/runs/a679dc7b-3cbf-4d43-9bc8-5ae0223d3b5f/local-mode-cache/cache/chef-stacktrace.out
[2016-12-15T13:58:14+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-12-15T13:58:14+00:00] ERROR: 412 "Precondition Failed"
[2016-12-15T13:58:14+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
From the error message, it sounds like your transitive cookbook dependencies (apt) are not present in your cookbook repository.
Apparently AWS OpsWorks' Berkshelf support has changed between versions. Only the Chef 11.10 OpsWorks release had built-in Berkshelf support, but then was subsequently pulled from the Chef 12 OpsWorks release.
If your CloudFormation-managed OpsWorks stack is using Chef version 12, and you're not packaging your cookbook dependencies using Berkshelf elsewhere, I would recommend either specifying Chef version 11.10, or following the process specified in the Packaging Cookbook Dependencies Locally documentation to package your cookbook dependencies locally and use the packaged cookbook repository as your custom cookbook source.

mysql error to run chapter 1 of getting started with chef

I am following the chapter 1 of tutorial http://gettingstartedwithchef.com/ and downloaded all dependencies listed in chapter1. The command "chef-solo -c solo.rb -j web.json" should be working, but I got the following error.
I googled the error that is shown as below and found that someone suggested to run a resource before any others (like to configure a package manager, apt/yum/etc). But how to do this? All links redirected to chef homepage...
Any suggestion would be appreciated.
yum_package[mysql] action install
* No candidate version available for mysql
================================================================================
Error executing action `install` on resource 'yum_package[mysql]'
================================================================================
Chef::Exceptions::Package
-------------------------
No candidate version available for mysql
Resource Declaration:
---------------------
# In /root/chef-repo/cookbooks/mysql/recipes/client.rb
47: package name
48: end
Compiled Resource:
------------------
# Declared in /root/chef-repo/cookbooks/mysql/recipes/client.rb:47:in `block in from_file'
yum_package("mysql") do
action :install
retries 0
retry_delay 2
default_guard_interpreter :default
package_name "mysql"
timeout 900
flush_cache {:before=>false, :after=>false}
declared_type :package
cookbook_name :mysql
recipe_name "client"
end
Running handlers:
[2015-05-15T10:28:13-04:00] ERROR: Running exception handlers
Running handlers complete
[2015-05-15T10:28:13-04:00] ERROR: Exception handlers complete
[2015-05-15T10:28:13-04:00] FATAL: Stacktrace dumped to /root/chef-solo/chef-stacktrace.out
Chef Client failed. 0 resources updated in 4.248307605 seconds
[2015-05-15T10:28:13-04:00] ERROR: yum_package[mysql] (mysql::client line 47) had an error: Chef::Exceptions::Package: No candidate version available for mysql
[2015-05-15T10:28:13-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
MySQL is distributed via the 'mysql-server' and 'mysql-client' packages.
You can use one of those to satisfy your dependency.
yum_package("mysql-server") do
...
package_name "mysql-server"
or
yum_package("mysql-client") do
...
package_name "mysql-client"
Those packages are wrappers that (currently) point to 'mysql-server-5.6' and 'mysql-client-5.6' respectively. If you need a different version (for example: mysql-client-5.1), you can specify it instead.
yum_package("mysql-client-5.1") do
...
package_name "mysql-client-5.1"