SQLite3::CantOpenException: unable to open database file

> Hi all,
>
> I'm new to foreman and puppet. I'm trying to set up my server with
> puppet master/agent and using foreman as well. But when I try to run
> puppet agent -t on one of the server, I got the following error message:
> Info: Retrieving plugin
> Info: Loading facts in /var/lib/puppet/lib/facter/iptables_version.rb
> Info: Loading facts in
> /var/lib/puppet/lib/facter/postgres_default_version.rb
> Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
> Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
> Info: Loading facts in /var/lib/puppet/lib/facter/os_maj_version.rb
> Info: Loading facts in /var/lib/puppet/lib/facter/ip6tables_version.rb
> Info: Loading facts in
> /var/lib/puppet/lib/facter/iptables_persistent_version.rb
> Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
> Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
> Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
> Error: Could not retrieve catalog from remote server: Error 400 on
> SERVER: SQLite3::CantOpenException: unable to open database file: INSERT
> INTO "hosts" ("name", "updated_at", "last_freshcheck", "source_file_id",
> "last_compile", "ip", "created_at", "environment", "last_report") VALUES
> ('balancer', '2013-05-21 21:11:44.115676', NULL, NULL, NULL, NULL,
> '2013-05-21 21:11:44.115676', NULL, NULL)
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run

This error looks like it's coming from Puppet itself rather than
Foreman. Do you have storeconfigs enabled or something in puppet.conf?

··· On 22/05/13 05:18, Pan Luo wrote:

I’m using RHEL 6.4 and used package to install foreman. And select
all-in-one for the foreman installer. I tried to find clues in the log
files on the puppet master, nothing I could find.
I have no clue which sqlite3 file it’s referring to and I tried to give
777 to /var/lib/foreman/db/*.sqlite3
and /var/lib/puppet/state/clientconfigs.sqlite3. Still no luck.

I’m wondering if anyone can point to me how should I troubleshoot this?
Thanks.


Dominic Cleal
Red Hat Engineering