slms4redd / chef-slms-portal

Chef cookbook for the UNREDD SLMS portal
GNU General Public License v3.0
1 stars 3 forks source link

Problem installing chef-solo in Ecuador #27

Closed fergonco closed 9 years ago

fergonco commented 11 years ago

Here[1] is the info of the system, and here[2] the output of executing the following line:

$ LC_ALL="C" sudo chef-solo -c solo.rb -j dna.json

Apparently some apt operation has problems to acquire the lock.

[1] $ uname -a Linux ubuntu 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012 i686 i686 i386 GNU/Linux $ cat /etc/issue Ubuntu 12.04.1 LTS \n \l

[2] [Mon, 01 Apr 2013 20:13:01 -0700] INFO: * Chef 10.18.2 * [Mon, 01 Apr 2013 20:13:02 -0700] INFO: Setting the run_list to ["recipe[omnibus_updater]", "recipe[apt]", "recipe[java]", "recipe[postgresql::server]", "recipe[database::postgresql]", "recipe[gis]", "recipe[unredd-nfms-portal]", "recipe[unredd-nfms-portal::install_test_data]"] from JSON [Mon, 01 Apr 2013 20:13:02 -0700] INFO: Run List is [recipe[omnibus_updater], recipe[apt], recipe[java], recipe[postgresql::server], recipe[database::postgresql], recipe[gis], recipe[unredd-nfms-portal], recipe[unredd-nfms-portal::install_test_data]] [Mon, 01 Apr 2013 20:13:02 -0700] INFO: Run List expands to [omnibus_updater, apt, java, postgresql::server, database::postgresql, gis, unredd-nfms-portal, unredd-nfms-portal::install_test_data] [Mon, 01 Apr 2013 20:13:02 -0700] INFO: Starting Chef Run for ubuntu [Mon, 01 Apr 2013 20:13:02 -0700] INFO: Running start handlers [Mon, 01 Apr 2013 20:13:02 -0700] INFO: Start handlers complete. [Mon, 01 Apr 2013 20:13:08 -0700] INFO: Omnibus remote file location: http://opscode-omnitruck-release.s3.amazonaws.com/ubuntu/11.04/i686/chef_10.18.2-2.ubuntu.11.04_i386.deb [Mon, 01 Apr 2013 20:13:09 -0700] WARN: Cloning resource attributes for service[apache2] from prior resource (CHEF-3694) [Mon, 01 Apr 2013 20:13:09 -0700] WARN: Previous service[apache2]: /var/chef-solo/cookbooks/apache2/recipes/default.rb:24:in `from_file'

[Mon, 01 Apr 2013 20:13:09 -0700] WARN: Cloning resource attributes for template[/etc/apache2/mods-available/proxy.conf] from prior resource (CHEF-3694) [Mon, 01 Apr 2013 20:13:09 -0700] WARN: Previous template[/etc/apache2/mods-available/proxy.conf]: /var/chef-solo/cookbooks/apache2/definitions/apache_conf.rb:21:in `from_file'

[Mon, 01 Apr 2013 20:13:09 -0700] WARN: Cloning resource attributes for remote_file[/var/tmp/create_schema_postgres.sql] from prior resource (CHEF-3694) [Mon, 01 Apr 2013 20:13:09 -0700] WARN: Previous remote_file[/var/tmp/create_schema_postgres.sql]: /var/chef-solo/cookbooks/unredd-nfms-portal/definitions/geostore.rb:78:in `from_file'

[Mon, 01 Apr 2013 20:13:09 -0700] WARN: Cloning resource attributes for http_request[HEAD https://raw.github.com/geosolutions-it/geostore/1.0.1/doc/sql/002_create_schema_postgres.sql] from prior resource (CHEF-3694) [Mon, 01 Apr 2013 20:13:09 -0700] WARN: Previous http_request[HEAD https://raw.github.com/geosolutions-it/geostore/1.0.1/doc/sql/002_create_schema_postgres.sql]: /var/chef-solo/cookbooks/unredd-nfms-portal/definitions/geostore.rb:83:in `from_file'

[Mon, 01 Apr 2013 20:13:09 -0700] INFO: Processing remote_file[chef omnibus_package[chef_10.18.2-2.ubuntu.11.04_i386.deb]] action create (omnibus_updater::deb_package line 3) [Mon, 01 Apr 2013 20:13:09 -0700] INFO: Processing ruby_block[Omnibus Chef install notifier] action nothing (omnibus_updater::deb_package line 17) [Mon, 01 Apr 2013 20:13:09 -0700] INFO: Processing execute[chef omnibus_install[10.18.2-2]] action nothing (omnibus_updater::deb_package line 25) [Mon, 01 Apr 2013 20:13:09 -0700] INFO: Processing execute[apt-get-update] action run (apt::default line 22) [Mon, 01 Apr 2013 20:13:09 -0700] INFO: Processing execute[apt-get update] action nothing (apt::default line 29) [Mon, 01 Apr 2013 20:13:09 -0700] INFO: Processing execute[apt-get autoremove] action nothing (apt::default line 36) [Mon, 01 Apr 2013 20:13:09 -0700] INFO: Processing execute[apt-get autoclean] action nothing (apt::default line 42) [Mon, 01 Apr 2013 20:13:09 -0700] INFO: Processing package[update-notifier-common] action install (apt::default line 48) [Mon, 01 Apr 2013 20:13:13 -0700] INFO: Processing execute[apt-get-update-periodic] action run (apt::default line 52) [Mon, 01 Apr 2013 20:13:13 -0700] ERROR: execute[apt-get-update-periodic](apt::default line 52) had an error: Expected process to exit with [0], but received '100' ---- Begin output of apt-get update ---- STDOUT: STDERR: E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/ ---- End output of apt-get update ---- Ran apt-get update returned 100; ignore_failure is set, continuing

Error executing action run on resource 'execute[apt-get-update-periodic]'

Mixlib::ShellOut::ShellCommandFailed

Expected process to exit with [0], but received '100' ---- Begin output of apt-get update ---- STDOUT: STDERR: E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/ ---- End output of apt-get update ---- Ran apt-get update returned 100

Resource Declaration:

In /var/chef-solo/cookbooks/apt/recipes/default.rb

52: execute "apt-get-update-periodic" do 53: command "apt-get update" 54: ignore_failure true 55: only_if do 56: ::File.exists?('/var/lib/apt/periodic/update-success-stamp') && 57: ::File.mtime('/var/lib/apt/periodic/update-success-stamp') < Time.now - 86400 58: end 59: end 60:

Compiled Resource:

Declared in /var/chef-solo/cookbooks/apt/recipes/default.rb:52:in `from_file'

execute("apt-get-update-periodic") do retry_delay 2 cookbook_name :apt returns 0 retries 0 backup 5 ignore_failure true command "apt-get update" action "run" recipe_name "default" only_if { #code block } end

[Mon, 01 Apr 2013 20:13:13 -0700] INFO: Processing directory[/var/cache/local] action create (apt::default line 62) [Mon, 01 Apr 2013 20:13:13 -0700] INFO: Processing directory[/var/cache/local/preseeding] action create (apt::default line 62) [Mon, 01 Apr 2013 20:13:13 -0700] INFO: Processing ruby_block[set-env-java-home] action create (java::oracle line 43) [Mon, 01 Apr 2013 20:13:13 -0700] INFO: ruby_block[set-env-java-home] called [Mon, 01 Apr 2013 20:13:13 -0700] INFO: Processing file[/etc/profile.d/jdk.sh] action create (java::oracle line 49) [Mon, 01 Apr 2013 20:13:13 -0700] INFO: Processing java_ark[jdk] action install (java::oracle line 57) [Mon, 01 Apr 2013 20:13:13 -0700] INFO: Processing package[sun-java6-jdk] action purge (java::default line 25) [Mon, 01 Apr 2013 20:13:13 -0700] INFO: Processing package[sun-java6-bin] action purge (java::default line 25) [Mon, 01 Apr 2013 20:13:13 -0700] INFO: Processing package[sun-java6-jre] action purge (java::default line 25) [Mon, 01 Apr 2013 20:13:13 -0700] INFO: Processing package[postgresql-client] action install (postgresql::client line 28) [Mon, 01 Apr 2013 20:13:16 -0700] INFO: Processing package[libpq-dev] action install (postgresql::client line 28) [Mon, 01 Apr 2013 20:13:16 -0700] INFO: Processing package[postgresql] action install (postgresql::server_debian line 26) [Mon, 01 Apr 2013 20:13:16 -0700] INFO: Processing service[postgresql] action enable (postgresql::server_debian line 30) [Mon, 01 Apr 2013 20:13:16 -0700] INFO: Processing service[postgresql] action start (postgresql::server_debian line 30) [Mon, 01 Apr 2013 20:13:17 -0700] INFO: Processing template[/etc/postgresql/9.1/main/postgresql.conf] action create (postgresql::server line 54)

Error executing action create on resource 'template[/etc/postgresql/9.1/main/postgresql.conf]'

Chef::Exceptions::EnclosingDirectoryDoesNotExist

Parent directory /etc/postgresql/9.1/main does not exist.

Resource Declaration:

In /var/chef-solo/cookbooks/postgresql/recipes/server.rb

54: template "#{node['postgresql']['dir']}/postgresql.conf" do 55: source "postgresql.conf.erb" 56: owner "postgres" 57: group "postgres" 58: mode 0600 59: notifies :restart, 'service[postgresql]', :immediately 60: end 61:

Compiled Resource:

Declared in /var/chef-solo/cookbooks/postgresql/recipes/server.rb:54:in `from_file'

template("/etc/postgresql/9.1/main/postgresql.conf") do retry_delay 2 provider Chef::Provider::Template owner "postgres" cookbook_name :postgresql retries 0 backup 5 mode 384 path "/etc/postgresql/9.1/main/postgresql.conf" action "create" source "postgresql.conf.erb" group "postgres" recipe_name "server" end

[Mon, 01 Apr 2013 20:13:17 -0700] ERROR: Running exception handlers [Mon, 01 Apr 2013 20:13:17 -0700] ERROR: Exception handlers complete [Mon, 01 Apr 2013 20:13:17 -0700] FATAL: Stacktrace dumped to /var/chef-solo/chef-stacktrace.out [Mon, 01 Apr 2013 20:13:17 -0700] FATAL: Chef::Exceptions::EnclosingDirectoryDoesNotExist: template[/etc/postgresql/9.1/main/postgresql.conf](postgresql::server line 54) had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /etc/postgresql/9.1/main does not exist.

sgiaccio commented 11 years ago

I'd try to manually uninstall postgresql (sudo apt-get purge postgresql), delete /var/lib/apt/lists/* (sudo rm /var/lib/apt/lists/* -vf) and start the installer again.

Stefano

fergonco commented 11 years ago

Still the same problem after uninstalling postgresql. Any ideas?

What Néstor did:

naacosta@ubuntu:/var/chef-solo$ sudo apt-get purge postgresql Reading package lists... Done Building dependency tree
Reading state information... Done The following packages will be REMOVED: postgresql* 0 upgraded, 0 newly installed, 1 to remove and 383 not upgraded. After this operation, 64.5 kB disk space will be freed. Do you want to continue [Y/n]? Y perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_TIME = "es_EC.UTF-8", LC_MONETARY = "es_EC.UTF-8", LC_ADDRESS = "es_EC.UTF-8", LC_TELEPHONE = "es_EC.UTF-8", LC_NAME = "es_EC.UTF-8", LC_MEASUREMENT = "es_EC.UTF-8", LC_IDENTIFICATION = "es_EC.UTF-8", LC_NUMERIC = "es_EC.UTF-8", LC_PAPER = "es_EC.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory (Reading database ... 147176 files and directories currently installed.) Removing postgresql ... naacosta@ubuntu:/var/chef-solo$ LC_ALL="C" sudo chef-solo -c solo.rb -j dna.json [Mon, 08 Apr 2013 20:04:28 -0700] INFO: * Chef 10.18.2 * [Mon, 08 Apr 2013 20:04:30 -0700] INFO: Setting the run_list to ["recipe[omnibus_updater]", "recipe[apt]", "recipe[java]", "recipe[postgresql::server]", "recipe[database::postgresql]", "recipe[gis]", "recipe[unredd-nfms-portal]", "recipe[unredd-nfms-portal::install_test_data]"] from JSON [Mon, 08 Apr 2013 20:04:30 -0700] INFO: Run List is [recipe[omnibus_updater], recipe[apt], recipe[java], recipe[postgresql::server], recipe[database::postgresql], recipe[gis], recipe[unredd-nfms-portal], recipe[unredd-nfms-portal::install_test_data]] [Mon, 08 Apr 2013 20:04:30 -0700] INFO: Run List expands to [omnibus_updater, apt, java, postgresql::server, database::postgresql, gis, unredd-nfms-portal, unredd-nfms-portal::install_test_data] [Mon, 08 Apr 2013 20:04:30 -0700] INFO: Starting Chef Run for ubuntu [Mon, 08 Apr 2013 20:04:30 -0700] INFO: Running start handlers [Mon, 08 Apr 2013 20:04:30 -0700] INFO: Start handlers complete. [Mon, 08 Apr 2013 20:04:35 -0700] INFO: Omnibus remote file location: http://opscode-omnitruck-release.s3.amazonaws.com/ubuntu/11.04/i686/chef_10.18.2-2.ubuntu.11.04_i386.deb [Mon, 08 Apr 2013 20:04:36 -0700] WARN: Cloning resource attributes for service[apache2] from prior resource (CHEF-3694) [Mon, 08 Apr 2013 20:04:36 -0700] WARN: Previous service[apache2]: /var/chef-solo/cookbooks/apache2/recipes/default.rb:24:in `from_file'

[Mon, 08 Apr 2013 20:04:36 -0700] WARN: Cloning resource attributes for template[/etc/apache2/mods-available/proxy.conf] from prior resource (CHEF-3694) [Mon, 08 Apr 2013 20:04:36 -0700] WARN: Previous template[/etc/apache2/mods-available/proxy.conf]: /var/chef-solo/cookbooks/apache2/definitions/apache_conf.rb:21:in `from_file'

[Mon, 08 Apr 2013 20:04:36 -0700] WARN: Cloning resource attributes for remote_file[/var/tmp/create_schema_postgres.sql] from prior resource (CHEF-3694) [Mon, 08 Apr 2013 20:04:36 -0700] WARN: Previous remote_file[/var/tmp/create_schema_postgres.sql]: /var/chef-solo/cookbooks/unredd-nfms-portal/definitions/geostore.rb:78:in `from_file'

[Mon, 08 Apr 2013 20:04:36 -0700] WARN: Cloning resource attributes for http_request[HEAD https://raw.github.com/geosolutions-it/geostore/1.0.1/doc/sql/002_create_schema_postgres.sql] from prior resource (CHEF-3694) [Mon, 08 Apr 2013 20:04:36 -0700] WARN: Previous http_request[HEAD https://raw.github.com/geosolutions-it/geostore/1.0.1/doc/sql/002_create_schema_postgres.sql]: /var/chef-solo/cookbooks/unredd-nfms-portal/definitions/geostore.rb:83:in `from_file'

[Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing remote_file[chef omnibus_package[chef_10.18.2-2.ubuntu.11.04_i386.deb]] action create (omnibus_updater::deb_package line 3) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing ruby_block[Omnibus Chef install notifier] action nothing (omnibus_updater::deb_package line 17) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing execute[chef omnibus_install[10.18.2-2]] action nothing (omnibus_updater::deb_package line 25) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing execute[apt-get-update] action run (apt::default line 22) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing execute[apt-get update] action nothing (apt::default line 29) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing execute[apt-get autoremove] action nothing (apt::default line 36) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing execute[apt-get autoclean] action nothing (apt::default line 42) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing package[update-notifier-common] action install (apt::default line 48) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing execute[apt-get-update-periodic] action run (apt::default line 52) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing directory[/var/cache/local] action create (apt::default line 62) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing directory[/var/cache/local/preseeding] action create (apt::default line 62) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing ruby_block[set-env-java-home] action create (java::oracle line 43) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: ruby_block[set-env-java-home] called [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing file[/etc/profile.d/jdk.sh] action create (java::oracle line 49) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing java_ark[jdk] action install (java::oracle line 57) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing package[sun-java6-jdk] action purge (java::default line 25) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing package[sun-java6-bin] action purge (java::default line 25) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing package[sun-java6-jre] action purge (java::default line 25) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing package[postgresql-client] action install (postgresql::client line 28) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing package[libpq-dev] action install (postgresql::client line 28) [Mon, 08 Apr 2013 20:04:36 -0700] INFO: Processing package[postgresql] action install (postgresql::server_debian line 26) [Mon, 08 Apr 2013 20:04:38 -0700] INFO: Processing service[postgresql] action enable (postgresql::server_debian line 30) [Mon, 08 Apr 2013 20:04:38 -0700] INFO: Processing service[postgresql] action start (postgresql::server_debian line 30) [Mon, 08 Apr 2013 20:04:38 -0700] INFO: Processing template[/etc/postgresql/9.1/main/postgresql.conf] action create (postgresql::server line 54)

Error executing action create on resource 'template[/etc/postgresql/9.1/main/postgresql.conf]'

Chef::Exceptions::EnclosingDirectoryDoesNotExist

Parent directory /etc/postgresql/9.1/main does not exist.

Resource Declaration:

In /var/chef-solo/cookbooks/postgresql/recipes/server.rb

54: template "#{node['postgresql']['dir']}/postgresql.conf" do 55: source "postgresql.conf.erb" 56: owner "postgres" 57: group "postgres" 58: mode 0600 59: notifies :restart, 'service[postgresql]', :immediately 60: end 61:

Compiled Resource:

Declared in /var/chef-solo/cookbooks/postgresql/recipes/server.rb:54:in `from_file'

template("/etc/postgresql/9.1/main/postgresql.conf") do retry_delay 2 provider Chef::Provider::Template owner "postgres" cookbook_name :postgresql retries 0 backup 5 mode 384 path "/etc/postgresql/9.1/main/postgresql.conf" action "create" source "postgresql.conf.erb" group "postgres" recipe_name "server" end

[Mon, 08 Apr 2013 20:04:38 -0700] ERROR: Running exception handlers [Mon, 08 Apr 2013 20:04:38 -0700] ERROR: Exception handlers complete [Mon, 08 Apr 2013 20:04:38 -0700] FATAL: Stacktrace dumped to /var/chef-solo/chef-stacktrace.out [Mon, 08 Apr 2013 20:04:38 -0700] FATAL: Chef::Exceptions::EnclosingDirectoryDoesNotExist: template[/etc/postgresql/9.1/main/postgresql.conf](postgresql::server line 54) had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /etc/postgresql/9.1/main does not exist.

Damianofds commented 9 years ago

This issue is obsolete, the problem never happen after the new improvements