Error when setting up stored configurations "unable to open database file"

245 views
Skip to first unread message

Chris

unread,
Oct 18, 2011, 7:07:48 AM10/18/11
to Puppet Users
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

Raymundo Vasquez

unread,
Oct 19, 2011, 4:23:31 AM10/19/11
to puppet...@googlegroups.com
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 <ch...@cdpuk.net>

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.




--
Raymundo Vásquez Ruiz

Kevin Wolf

unread,
Oct 19, 2011, 5:51:38 PM10/19/11
to Puppet Users
I agree; try as root.

Also, what does your puppet.conf look like on the puppet master?

Kevin.

Chris

unread,
Oct 25, 2011, 7:20:24 AM10/25/11
to Puppet Users
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.

Raymundo Vasquez

unread,
Oct 25, 2011, 9:49:07 AM10/25/11
to puppet...@googlegroups.com
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>
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Chris

unread,
Oct 25, 2011, 12:07:10 PM10/25/11
to Puppet Users
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
> rvasq...@b-phot.org
Reply all
Reply to author
Forward
0 new messages