Chris
2011-Oct-18 11:07 UTC
[Puppet Users] Error when setting up stored configurations "unable to open database file"
Hi, I''m getting the following error when I try to set up stored configurations. It appears in the master logs when the agent process runs. $ sudo /usr/sbin/puppetmasterd --no-daemonize --verbose ... info: Connecting to sqlite3 database: /var/lib/puppet/state/ clientconfigs.sqlite3 err: could not open database: unable to open database file The file is never created by puppet. If I manually create this file, I get more errors: err: /File[/var/lib/puppet/state/clientconfigs.sqlite3]/owner: change from root to puppet failed: Failed to set owner to ''701'': Operation not permitted - /var/lib/puppet/state/clientconfigs.sqlite3 ... If it helps, my gem list: $ gem list *** LOCAL GEMS *** actionmailer (2.3.4) actionpack (2.3.4) activerecord (2.3.4) activeresource (2.3.4) activesupport (2.3.4) rack (1.0.0) rails (2.3.4) rake (0.8.7) sqlite3-ruby (1.2.4) Any help much appreciated on this - there doesn''t seem to be much out there on Google. -Chris -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
Raymundo Vasquez
2011-Oct-19 08:23 UTC
Re: [Puppet Users] Error when setting up stored configurations "unable to open database file"
Are you sure that SUDO has permissions on every aspect of your computer? Have you tried as root? Is the SQLite 3 driver installed? Regards 2011/10/18 Chris <chris@cdpuk.net>> Hi, > > I''m getting the following error when I try to set up stored > configurations. It appears in the master logs when the agent process > runs. > > $ sudo /usr/sbin/puppetmasterd --no-daemonize --verbose > ... > info: Connecting to sqlite3 database: /var/lib/puppet/state/ > clientconfigs.sqlite3 > err: could not open database: unable to open database file > > The file is never created by puppet. If I manually create this file, I > get more errors: > > err: /File[/var/lib/puppet/state/clientconfigs.sqlite3]/owner: change > from root to puppet failed: Failed to set owner to ''701'': Operation > not permitted - /var/lib/puppet/state/clientconfigs.sqlite3 > ... > > If it helps, my gem list: > > $ gem list > *** LOCAL GEMS *** > actionmailer (2.3.4) > actionpack (2.3.4) > activerecord (2.3.4) > activeresource (2.3.4) > activesupport (2.3.4) > rack (1.0.0) > rails (2.3.4) > rake (0.8.7) > sqlite3-ruby (1.2.4) > > Any help much appreciated on this - there doesn''t seem to be much out > there on Google. > > -Chris > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > 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. > >-- Raymundo Vásquez Ruiz rvasquez@b-phot.org -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
Kevin Wolf
2011-Oct-19 21:51 UTC
[Puppet Users] Re: Error when setting up stored configurations "unable to open database file"
I agree; try as root. Also, what does your puppet.conf look like on the puppet master? Kevin. On Oct 18, 6:07 am, Chris <ch...@cdpuk.net> wrote:> Hi, > > I''m getting the following error when I try to set up stored > configurations. It appears in the master logs when the agent process > runs. > > $ sudo /usr/sbin/puppetmasterd --no-daemonize --verbose > ... > info: Connecting to sqlite3 database: /var/lib/puppet/state/ > clientconfigs.sqlite3 > err: could not open database: unable to open database file > > The file is never created by puppet. If I manually create this file, I > get more errors: > > err: /File[/var/lib/puppet/state/clientconfigs.sqlite3]/owner: change > from root to puppet failed: Failed to set owner to ''701'': Operation > not permitted - /var/lib/puppet/state/clientconfigs.sqlite3 > ... > > If it helps, my gem list: > > $ gem list > *** LOCAL GEMS *** > actionmailer (2.3.4) > actionpack (2.3.4) > activerecord (2.3.4) > activeresource (2.3.4) > activesupport (2.3.4) > rack (1.0.0) > rails (2.3.4) > rake (0.8.7) > sqlite3-ruby (1.2.4) > > Any help much appreciated on this - there doesn''t seem to be much out > there on Google. > > -Chris-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
Chris
2011-Oct-25 11:20 UTC
[Puppet Users] Re: Error when setting up stored configurations "unable to open database file"
Exactly the same symptoms when running directly as root. puppet.conf with comments stripped for readability: [main] logdir = /var/log/puppet rundir = /var/run/puppet ssldir = $vardir/ssl [agent] classfile = $vardir/classes.txt localconfig = $vardir/localconfig [master] modulepath = /etc/puppet/modules storeconfigs = true I have the following installed on CentOS 5: [root@host ~]# rpm -qa |grep sqlite sqlite-3.3.6-5 python-sqlite-1.1.7-1.2.1 rubygem-sqlite3-ruby-1.2.4-1.el5 I assume these are sufficient? Thanks. On Oct 19, 10:51 pm, Kevin Wolf <kwol...@gmail.com> wrote:> I agree; try as root. > > Also, what does your puppet.conf look like on the puppet master? > > Kevin. > > On Oct 18, 6:07 am, Chris <ch...@cdpuk.net> wrote: > > > > > > > > > Hi, > > > I''m getting the following error when I try to set up stored > > configurations. It appears in the master logs when the agent process > > runs. > > > $ sudo /usr/sbin/puppetmasterd --no-daemonize --verbose > > ... > > info: Connecting to sqlite3 database: /var/lib/puppet/state/ > > clientconfigs.sqlite3 > > err: could not open database: unable to open database file > > > The file is never created by puppet. If I manually create this file, I > > get more errors: > > > err: /File[/var/lib/puppet/state/clientconfigs.sqlite3]/owner: change > > from root to puppet failed: Failed to set owner to ''701'': Operation > > not permitted - /var/lib/puppet/state/clientconfigs.sqlite3 > > ... > > > If it helps, my gem list: > > > $ gem list > > *** LOCAL GEMS *** > > actionmailer (2.3.4) > > actionpack (2.3.4) > > activerecord (2.3.4) > > activeresource (2.3.4) > > activesupport (2.3.4) > > rack (1.0.0) > > rails (2.3.4) > > rake (0.8.7) > > sqlite3-ruby (1.2.4) > > > Any help much appreciated on this - there doesn''t seem to be much out > > there on Google. > > > -Chris-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
Raymundo Vasquez
2011-Oct-25 13:49 UTC
Re: [Puppet Users] Re: Error when setting up stored configurations "unable to open database file"
Its actually the owner of /var/lib/puppet/state/clientconfigs.sqlite3 the one giving problems. Have you triend to change this using chown as root? This is mine #ls -la /var/lib/puppet/state/ total 8 drwxr-xr-t 2 puppet puppet 4096 Sep 23 22:12 . Regards 2011/10/25 Chris <chris@cdpuk.net>> Exactly the same symptoms when running directly as root. > > puppet.conf with comments stripped for readability: > > [main] > logdir = /var/log/puppet > rundir = /var/run/puppet > ssldir = $vardir/ssl > > [agent] > classfile = $vardir/classes.txt > localconfig = $vardir/localconfig > > [master] > modulepath = /etc/puppet/modules > storeconfigs = true > > I have the following installed on CentOS 5: > > [root@host ~]# rpm -qa |grep sqlite > sqlite-3.3.6-5 > python-sqlite-1.1.7-1.2.1 > rubygem-sqlite3-ruby-1.2.4-1.el5 > > I assume these are sufficient? > > Thanks. > > On Oct 19, 10:51 pm, Kevin Wolf <kwol...@gmail.com> wrote: > > I agree; try as root. > > > > Also, what does your puppet.conf look like on the puppet master? > > > > Kevin. > > > > On Oct 18, 6:07 am, Chris <ch...@cdpuk.net> wrote: > > > > > > > > > > > > > > > > > Hi, > > > > > I''m getting the following error when I try to set up stored > > > configurations. It appears in the master logs when the agent process > > > runs. > > > > > $ sudo /usr/sbin/puppetmasterd --no-daemonize --verbose > > > ... > > > info: Connecting to sqlite3 database: /var/lib/puppet/state/ > > > clientconfigs.sqlite3 > > > err: could not open database: unable to open database file > > > > > The file is never created by puppet. If I manually create this file, I > > > get more errors: > > > > > err: /File[/var/lib/puppet/state/clientconfigs.sqlite3]/owner: change > > > from root to puppet failed: Failed to set owner to ''701'': Operation > > > not permitted - /var/lib/puppet/state/clientconfigs.sqlite3 > > > ... > > > > > If it helps, my gem list: > > > > > $ gem list > > > *** LOCAL GEMS *** > > > actionmailer (2.3.4) > > > actionpack (2.3.4) > > > activerecord (2.3.4) > > > activeresource (2.3.4) > > > activesupport (2.3.4) > > > rack (1.0.0) > > > rails (2.3.4) > > > rake (0.8.7) > > > sqlite3-ruby (1.2.4) > > > > > Any help much appreciated on this - there doesn''t seem to be much out > > > there on Google. > > > > > -Chris > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > 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. > >-- Raymundo Vásquez Ruiz rvasquez@b-phot.org -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
Chris
2011-Oct-25 16:07 UTC
[Puppet Users] Re: Error when setting up stored configurations "unable to open database file"
Spot on - chown puppet.puppet /var/lib/puppet/state solved the problem. I assume this is a defect in the packaging - I have just repeated this by installing the same package on an empty VM. Thanks Chris On Oct 25, 2:49 pm, Raymundo Vasquez <rvasq...@b-phot.org> wrote:> Its actually the owner of /var/lib/puppet/state/clientconfigs.sqlite3 the > one giving problems. Have you triend to change this using chown as root? > This is mine > > #ls -la /var/lib/puppet/state/ > total 8 > drwxr-xr-t 2 puppet puppet 4096 Sep 23 22:12 . > > Regards > > 2011/10/25 Chris <ch...@cdpuk.net> > > > > > > > > > > > Exactly the same symptoms when running directly as root. > > > puppet.conf with comments stripped for readability: > > > [main] > > logdir = /var/log/puppet > > rundir = /var/run/puppet > > ssldir = $vardir/ssl > > > [agent] > > classfile = $vardir/classes.txt > > localconfig = $vardir/localconfig > > > [master] > > modulepath = /etc/puppet/modules > > storeconfigs = true > > > I have the following installed on CentOS 5: > > > [root@host ~]# rpm -qa |grep sqlite > > sqlite-3.3.6-5 > > python-sqlite-1.1.7-1.2.1 > > rubygem-sqlite3-ruby-1.2.4-1.el5 > > > I assume these are sufficient? > > > Thanks. > > > On Oct 19, 10:51 pm, Kevin Wolf <kwol...@gmail.com> wrote: > > > I agree; try as root. > > > > Also, what does your puppet.conf look like on the puppet master? > > > > Kevin. > > > > On Oct 18, 6:07 am, Chris <ch...@cdpuk.net> wrote: > > > > > Hi, > > > > > I''m getting the following error when I try to set up stored > > > > configurations. It appears in the master logs when the agent process > > > > runs. > > > > > $ sudo /usr/sbin/puppetmasterd --no-daemonize --verbose > > > > ... > > > > info: Connecting to sqlite3 database: /var/lib/puppet/state/ > > > > clientconfigs.sqlite3 > > > > err: could not open database: unable to open database file > > > > > The file is never created by puppet. If I manually create this file, I > > > > get more errors: > > > > > err: /File[/var/lib/puppet/state/clientconfigs.sqlite3]/owner: change > > > > from root to puppet failed: Failed to set owner to ''701'': Operation > > > > not permitted - /var/lib/puppet/state/clientconfigs.sqlite3 > > > > ... > > > > > If it helps, my gem list: > > > > > $ gem list > > > > *** LOCAL GEMS *** > > > > actionmailer (2.3.4) > > > > actionpack (2.3.4) > > > > activerecord (2.3.4) > > > > activeresource (2.3.4) > > > > activesupport (2.3.4) > > > > rack (1.0.0) > > > > rails (2.3.4) > > > > rake (0.8.7) > > > > sqlite3-ruby (1.2.4) > > > > > Any help much appreciated on this - there doesn''t seem to be much out > > > > there on Google. > > > > > -Chris > > > -- > > You received this message because you are subscribed to the Google Groups > > "Puppet Users" group. > > 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. > > -- > Raymundo Vásquez Ruiz > rvasq...@b-phot.org-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.