Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ubuntu 12.04 Chef::Exceptions::GroupIDNotFound #6

Closed
i-sam opened this issue Sep 18, 2014 · 17 comments
Closed

ubuntu 12.04 Chef::Exceptions::GroupIDNotFound #6

i-sam opened this issue Sep 18, 2014 · 17 comments
Assignees
Milestone

Comments

@i-sam
Copy link

i-sam commented Sep 18, 2014

ubuntu 12.04, used 0.2.3 version of cookbook, got this:

Chef::Exceptions::GroupIDNotFound
---------------------------------
template[/etc/mysql/conf.d/innodb.cnf] (/home/dah_user/spd_devops/chef-recipes/cookbooks/mariadb/providers/configuration.rb line 18) had an error: Chef::Exceptions::GroupIDNotFound: cannot determine group id for 'mysql', does the group exist on this system?


Resource Declaration:
---------------------
# In /home/dah_user/spd_devops/chef-recipes/cookbooks/mariadb/recipes/config.rb

 68: mariadb_configuration 'innodb' do
 69:   section 'mysqld'
 70:   option innodb_options
 71:   action :add
 72: end
 73:



Compiled Resource:
------------------
# Declared in /home/dah_user/spd_devops/chef-recipes/cookbooks/mariadb/recipes/config.rb:68:in `from_file'

mariadb_configuration("innodb") do
  action [:add]
  retries 0
  retry_delay 2
  cookbook_name :mariadb
  recipe_name "config"
  section "mysqld"
  option {"comment1"=>"#", "comment2"=>"# * InnoDB", "comment3"=>"#", "comment4"=>"# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.", "comment5"=>"# Read the manual for more InnoDB related options. There are many!", "innodb_log_file_size_comment1"=>"# you can't just change log file size, requires special procedure", "innodb_log_file_size"=>"#innodb_log_file_size   = 50M", "innodb_buffer_pool_size"=>"256M", "innodb_log_buffer_size"=>"8M", "innodb_file_per_table"=>"1", "innodb_open_files"=>"400", "innodb_io_capacity"=>"400", "innodb_flush_method"=>"O_DIRECT"}
end



[2014-09-18T23:14:11-04:00] INFO: Running queued delayed notifications before re-raising exception
[2014-09-18T23:14:11-04:00] ERROR: Running exception handlers
[2014-09-18T23:14:11-04:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated
[2014-09-18T23:14:11-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-09-18T23:14:11-04:00] FATAL: Chef::Exceptions::GroupIDNotFound: mariadb_configuration[innodb] (mariadb::config line 68) had an error: Chef::Exceptions::GroupIDNotFound: template[/etc/mysql/conf.d/innodb.cnf] (/home/dah_user/spd_devops/chef-recipes/cookbooks/mariadb/providers/configuration.rb line 18) had an error: Chef::Exceptions::GroupIDNotFound: cannot determine group id for 'mysql', does the group exist on this system?
@sinfomicien
Copy link
Contributor

I just launch tests about ubuntu 12.04, and cannot reproduce it. This group (mysql) is theoritically installed by the mariadb official package. Which repository do you use to install the mariadb-server package please ?

@i-sam
Copy link
Author

i-sam commented Sep 18, 2014

I selected default(use_default_repository to the true value), as recomended in description, should I set some specific in somehow?

@sinfomicien
Copy link
Contributor

Normally you don't have to set other attributes. Can you check on your target system that mariadb-server-10.0 is correctly installed... And if so, is there a user/group mysql in the system files /etc/group and /etc/passwd please ?

@sinfomicien
Copy link
Contributor

Hi i-sam, could you test the 0.2.4 version ? I just released it on the supermarket.

@i-sam
Copy link
Author

i-sam commented Sep 24, 2014

Yes, sure will report soon, sorry, I worked on another task. Thanks, for fast reaction

@i-sam
Copy link
Author

i-sam commented Sep 24, 2014

Yes, it's realy doesn't exist in /etc/passwd. And mariadb actualy wasn't installed. I tried cookbook 0.2.4, but it seems that almost the same.. In this time I used all default settings and didn't change anything.

3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Recipe: mariadb::server
  * service[mysql] action restart[2014-09-25T01:03:55-04:00] INFO: Processing service[mysql] action restart (mariadb::server line 39)

================================================================================
Error executing action `restart` on resource 'service[mysql]'
================================================================================


Errno::ENOENT
-------------
No such file or directory - /etc/init.d/mysql stop


Resource Declaration:
---------------------
# In /home/dah_user/spd_devops/chef-recipes/cookbooks/mariadb/recipes/server.rb

 39: service 'mysql' do
 40:   action :restart
 41:   only_if do
 42:     mariadb_service_restart_required?(
 43:       '127.0.0.1',
 44:       node['mariadb']['mysqld']['port'],
 45:       node['mariadb']['mysqld']['socket']
 46:     )
 47:   end
 48: end
 49:



Compiled Resource:
------------------
# Declared in /home/dah_user/spd_devops/chef-recipes/cookbooks/mariadb/recipes/server.rb:39:in `from_file'

service("mysql") do
  action [:restart]
  supports {:restart=>false, :reload=>false, :status=>false}
  retries 0
  retry_delay 2
  service_name "mysql"
  pattern "mysql"
  startup_type :automatic
  cookbook_name :mariadb
  recipe_name "server"
  only_if { #code block }
end



[2014-09-25T01:03:56-04:00] INFO: Running queued delayed notifications before re-raising exception
[2014-09-25T01:03:56-04:00] ERROR: Running exception handlers
[2014-09-25T01:03:56-04:00] ERROR: Exception handlers complete
Chef Client failed. 4 resources updated
[2014-09-25T01:03:56-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-09-25T01:03:56-04:00] FATAL: Errno::ENOENT: service[mysql] (mariadb::server line 39) had an error: Errno::ENOENT: No such file or directory - /etc/init.d/mysql stop

BTW also it say that /etc/mysql /etc/mysql/conf.d wasn't existed so I created them manually...

@sinfomicien
Copy link
Contributor

I don't know why, but it's like the package was not installed at all! Could you please remove it from your system (apt-get remove --purge mariadb-server-10.0), then launch the recipe again please ?

@i-sam
Copy link
Author

i-sam commented Sep 30, 2014

hmm.. when I removed all params that I set in default variables in environment and realize that it can't find mariadb-server-10.0:

[2014-09-30T22:05:09-04:00] FATAL: Chef::Exceptions::Package: package[mariadb-server-10.0] (mariadb::_debian_server line 48) had an error: Chef::Exceptions::Package: No version specified, and no candidate version available for mariadb-server-10.0

you could find full log here https://gist.github.com/i-sam/969f54fab77675a9b130

@i-sam i-sam closed this as completed Sep 30, 2014
@i-sam i-sam reopened this Sep 30, 2014
@i-sam
Copy link
Author

i-sam commented Sep 30, 2014

sorry miss click, so some problem with adding repo it seems

@i-sam
Copy link
Author

i-sam commented Sep 30, 2014

when 'apt'
include_recipe 'apt::default'
it seems to me that default repo on http://ftp.igh.cnrs.fr/pub/mariadb/repo/10.0/ubuntu/ has in a bit another structure:

conf/                                              25-Sep-2014 15:30                   -
db/                                                26-Sep-2014 01:50                   -
dists/                                             25-Sep-2014 15:31                   -
pool/                                              25-Sep-2014 15:30                   -
md5sums.txt                                        25-Sep-2014 15:31               13727
    apt_repository "mariadb-#{node['mariadb']['install']['version']}" do
      uri 'http://ftp.igh.cnrs.fr/pub/mariadb/repo/' + \
          node['mariadb']['install']['version'] + '/' +  node['platform']
      distribution node['lsb']['codename']
      components ['main']
      keyserver 'keyserver.ubuntu.com'
      key '0xcbcb082a1bb943db'
    end

@i-sam
Copy link
Author

i-sam commented Sep 30, 2014

it seems this repo works for me

sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb http://ftp.nluug.nl/db/mariadb/repo/10.0/ubuntu precise main'
sudo apt-get update
sudo apt-get install mariadb-server

@sinfomicien sinfomicien added this to the v0.2.5 milestone Sep 30, 2014
@sinfomicien sinfomicien self-assigned this Sep 30, 2014
@sinfomicien
Copy link
Contributor

Yes, you're right... I will put the base apt url in attribute, so you can change it. In your case, you will just have to change this base apt repo url.

sinfomicien added a commit that referenced this issue Oct 1, 2014
- The first to be able to choose the apt mirro base url (issue #6)
- The second to avoid installing development files within client recipe byt setting an attribute (issue #17)
- Correct documentation
- Add rspec tests to the issue #17 implementation
@sinfomicien
Copy link
Contributor

I just commit a way to change the apt repo base url. Could you test it, and verify it solve your problem ?
Thx

@i-sam
Copy link
Author

i-sam commented Oct 2, 2014

Great! Thank you for fast solution. Yes, now it works for me. with config like this:

 "mariadb": {
        "server_root_password": "def_dah_pass",
        "use_default_repository": true,
        "apt_repository": {
                "base_url": "ftp.nluug.nl/db/mariadb/repo"
        }
    }

@i-sam
Copy link
Author

i-sam commented Oct 2, 2014

it still seems should be here use_default_repository false or we don't need it at all, in this case but it's not so important cause now it works

@i-sam
Copy link
Author

i-sam commented Oct 2, 2014

I think can close this issue.

@i-sam i-sam closed this as completed Oct 2, 2014
jfwm2 pushed a commit to jfwm2/mariadb that referenced this issue Apr 4, 2017
@lock
Copy link

lock bot commented Jul 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants