ashrith
2012-Jul-05 23:35 UTC
[Puppet Users] puppet with stored configurations mysql connection error
I am testing out the store configurations on my puppet master, packages installed: - puppet - puppet-master - rubygems - ruby-mysql - ruby-devel - mysql-server - mysql - mysql-devel *Configuration Files:* *Puppet.conf* [main] logdir = /var/log/puppet rundir = /var/run/puppet ssldir = $vardir/ssl [agent] classfile = $vardir/classes.txt localconfig = $vardir/localconfig server = server1.domain.com [master] certname = server1 certdnsnames = server1.domain.com #stored configurations *storeconfigs = true* * dbadapter = mysql* * dbname = puppet* * dbuser = puppet* * dbpassword = puppet* * dbserver = localhost* * dbsocket = /var/lib/mysql/mysql.sock* *gems installed:* $gem list *** LOCAL GEMS *** actionmailer (2.3.5) actionpack (2.3.5) activerecord (2.3.5) activeresource (2.3.5) activesupport (2.3.5) rack (1.0.1) rails (2.3.5) rake (0.9.2.2) *mysql configuration:* create database puppet; grant all privileges on puppet.* to puppet@localhost identified by ''puppet''; Now, when I run puppet agent as follows, I am getting the *error* as follows: *$puppet agent --test --server=server1.domain.com --noop* info: Connecting to mysql database: puppet info: Caching facts for ashrith.cloudwick.com *err: Could not retrieve catalog from remote server: Error 400 on SERVER: Can''t connect to local MySQL server through socket ''/var/lib/mysql/mysql.sock'' (13)* warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run But, when I run puppet agent with out the stored configurations, it works fine. As well as I also checked connecting to mysql using various parameters as below and everything worked: *mysql -u root -p --socket=/var/lib/mysql/mysql.sock* *mysql -u puppet -p --socket=/var/lib/mysql/mysql.sock* *mysql -u puppet -p -h localhost --socket=/var/lib/mysql/mysql.sock* I am stuck, I was trying to implement Nagios using Puppet''s stored configuration any help is appreciated. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/472vStb5VR4J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Derek Higgins
2012-Jul-06 16:53 UTC
[Puppet Users] Re: puppet with stored configurations mysql connection error
Hi, selinux may be preventing puppetmaster from talking to mysql, try> setenforce 0also if this works and you want to leave selinux running, it looks like there is a boolean to allow this (on RHEL at least)> setenforce 1 > setsebool puppetmaster_use_db onHope this helps, Derek -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/px5BZvZNnWQJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
ashrith
2012-Jul-06 17:10 UTC
[Puppet Users] Re: puppet with stored configurations mysql connection error
Thanks for the reply Derek, but I have already disabled SELINUX as well as iptables!. So that wasn''t clearly the problem here. On Friday, July 6, 2012 9:53:14 AM UTC-7, Derek Higgins wrote:> > Hi, > selinux may be preventing puppetmaster from talking to mysql, try > > setenforce 0 > > also if this works and you want to leave selinux running, it looks like > there is a boolean to allow this (on RHEL at least) > > setenforce 1 > > setsebool puppetmaster_use_db on > > Hope this helps, > Derek >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/7CNBDz5ECLYJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.