Puppet 3.3.1 // CentOS release 6.4 (Final) rpm -qa | grep puppet puppetlabs-release-6-7.noarch puppet-3.1.1-1.el6.noarch puppetdb-1.3.0-1.el6.noarch puppet-server-3.1.1-1.el6.noarch puppetdb-terminus-1.3.0-1.el6.noarch Installed from yum packages: Running Transaction Installing : puppetdb-1.3.0-1.el6.noarch 1/1 Certificate was added to keystore Backing up /etc/puppetdb/conf.d/jetty.ini to /etc/puppetdb/conf.d/jetty.ini.bak.1368570333 before making changes Updated default settings from package installation for ssl-host in /etc/puppetdb/conf.d/jetty.ini. Updated default settings from package installation for ssl-port in /etc/puppetdb/conf.d/jetty.ini. Updated default settings from package installation for key-password in /etc/puppetdb/conf.d/jetty.ini. Updated default settings from package installation for trust-password in /etc/puppetdb/conf.d/jetty.ini. Updated default settings from package installation for keystore in /etc/puppetdb/conf.d/jetty.ini. Updated default settings from package installation for truststore in /etc/puppetdb/conf.d/jetty.ini. Verifying : puppetdb-1.3.0-1.el6.noarch 1/1 Installed: puppetdb.noarch 0:1.3.0-1.el6 Complete! After following numerous posts all over the net, and of course PuppetLabs'' docs I simply cannot get PuppetDB to run. It cannot find the Java Driver and dies after about a minute of running: java.lang.ClassNotFoundException: org.postgresql.jdbcDriver at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:61) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:188) at com.puppetlabs.jdbc$make_connection_pool.invoke(jdbc.clj:161) at com.puppetlabs.jdbc$pooled_datasource.invoke(jdbc.clj:189) at com.puppetlabs.puppetdb.cli.services$_main.doInvoke(services.clj:366) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:419) at clojure.lang.AFn.applyToHelper(AFn.java:163) at clojure.lang.Var.applyTo(Var.java:532) at clojure.core$apply.invoke(core.clj:601) at com.puppetlabs.puppetdb.core$_main.doInvoke(core.clj:79) at clojure.lang.RestFn.applyTo(RestFn.java:137) at com.puppetlabs.puppetdb.core.main(Unknown Source) ===============Puppet Settings =============== /etc/sysconfig/puppet - default - no change /etc/sysconfig/puppetdb - default- no change ---------------------------------------------- /etc/puppet/routes.yaml --- master: facts: terminus: puppetdb cache: yaml ----------------------------------------------- /etc/puppet/puppet.conf [master] storeconfigs = true storeconfigs_backend = puppetdb reports = store,puppetdb facts_terminus = puppetdb-terminus ------------------------------------------------ /etc/puppet/puppetdb.conf [main] server = fqdn-hostname port = 8081 ----------------------------------------------------- /etc/puppetdb/log4j.properties - default - no change /etc/puppetdb/conf.d/config.ini - default - no change /etc/puppetdb/conf.d/jetty.ini - default - no change /etc/puppetdb/conf.d/repl.ini - default - no change ----------------------------------------------------- /etc/puppetdb/conf.d/database.ini: classname = org.postgresql.jdbcDriver subprotocol = postgresql subname = //localhost:5432/puppetdb username = puppetdb password = puppetdb gc-interval = 60 log-slow-statements = 10 ================================================Postgresql Settings ================================================ psql -U puppetdb Password for user puppetdb: psql (8.4.13) Type "help" for help. puppetdb=> \l List of databases Name | Owner | Encoding | Collation | Ctype | Access privileges -----------+----------+----------+-------------+-------------+-------------------------- postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | puppetdb | puppetdb | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/puppetdb : puppetdb=C*T*c*/puppetdb template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres : postgres=CTc/postgres template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres : postgres=CTc/postgres (4 rows) puppetdb=> \du List of roles Role name | Attributes | Member of -----------+-------------+------------ postgres | Superuser | {} : Create role : Create DB puppetdb | | {postgres} ==============================================================Java Stuff ==============================================================java -version java version "1.7.0_19" OpenJDK Runtime Environment (rhel-2.3.9.1.el6_4-x86_64) OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode) rpm -qa | grep java java-1.7.0-openjdk-1.7.0.19-2.3.9.1.el6_4.x86_64 tzdata-java-2013b-1.el6.noarch java-1.6.0-openjdk-1.6.0.0-1.61.1.11.11.el6_4.x86_64 rpm -qa | grep postgr postgresql-8.4.13-1.el6_3.x86_64 postgresql-devel-8.4.13-1.el6_3.x86_64 postgresql-libs-8.4.13-1.el6_3.x86_64 postgresql-server-8.4.13-1.el6_3.x86_64 postgresql-contrib-8.4.13-1.el6_3.x86_64 postgresql-jdbc-8.4.701-8.el6.noarch find / -name *postgres*.jar /usr/share/java/postgresql-jdbc2ee.jar /usr/share/java/postgresql-8.4-703.jdbc3.jar /usr/share/java/postgresql-jdbc-8.4.701.jar /usr/share/java/postgresql-8.4-703.jdbc4.jar /usr/share/java/postgresql-jdbc2.jar /usr/share/java/postgresql-jdbc.jar /usr/share/java/postgresql-jdbc3.jar -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Deepak Giridharagopal
2013-May-15 07:07 UTC
Re: [Puppet Users] PuppetDB Cannot Find Postgresql Driver
On Tue, May 14, 2013 at 5:18 PM, Tim Schaefer <asysarchitect@gmail.com>wrote:> Puppet 3.3.1 // CentOS release 6.4 (Final) > > rpm -qa | grep puppet > puppetlabs-release-6-7.noarch > puppet-3.1.1-1.el6.noarch > puppetdb-1.3.0-1.el6.noarch > puppet-server-3.1.1-1.el6.noarch > puppetdb-terminus-1.3.0-1.el6.noarch > > Installed from yum packages: > > Running Transaction > Installing : puppetdb-1.3.0-1.el6.noarch > > 1/1 > Certificate was added to keystore > Backing up /etc/puppetdb/conf.d/jetty.ini to > /etc/puppetdb/conf.d/jetty.ini.bak.1368570333 before making changes > Updated default settings from package installation for ssl-host in > /etc/puppetdb/conf.d/jetty.ini. > Updated default settings from package installation for ssl-port in > /etc/puppetdb/conf.d/jetty.ini. > Updated default settings from package installation for key-password in > /etc/puppetdb/conf.d/jetty.ini. > Updated default settings from package installation for trust-password in > /etc/puppetdb/conf.d/jetty.ini. > Updated default settings from package installation for keystore in > /etc/puppetdb/conf.d/jetty.ini. > Updated default settings from package installation for truststore in > /etc/puppetdb/conf.d/jetty.ini. > Verifying : puppetdb-1.3.0-1.el6.noarch > > 1/1 > > Installed: > puppetdb.noarch 0:1.3.0-1.el6 > > > > Complete! > > After following numerous posts all over the net, and of course PuppetLabs'' > docs I simply cannot get PuppetDB to run. It cannot find the Java Driver > and dies after about a minute of running: > > java.lang.ClassNotFoundException: org.postgresql.jdbcDriver > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > at java.net.URLClassLoader$1.run(URLClassLoader.java:355) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:354) > at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:61) > at java.lang.ClassLoader.loadClass(ClassLoader.java:423) > at java.lang.ClassLoader.loadClass(ClassLoader.java:356) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:188) > at com.puppetlabs.jdbc$make_connection_pool.invoke(jdbc.clj:161) > at com.puppetlabs.jdbc$pooled_datasource.invoke(jdbc.clj:189) > at com.puppetlabs.puppetdb.cli.services$_main.doInvoke(services.clj:366) > at clojure.lang.RestFn.invoke(RestFn.java:421) > at clojure.lang.Var.invoke(Var.java:419) > at clojure.lang.AFn.applyToHelper(AFn.java:163) > at clojure.lang.Var.applyTo(Var.java:532) > at clojure.core$apply.invoke(core.clj:601) > at com.puppetlabs.puppetdb.core$_main.doInvoke(core.clj:79) > at clojure.lang.RestFn.applyTo(RestFn.java:137) > at com.puppetlabs.puppetdb.core.main(Unknown Source) > > > ===============> Puppet Settings > ===============> > /etc/sysconfig/puppet - default - no change > /etc/sysconfig/puppetdb - default- no change > > ---------------------------------------------- > /etc/puppet/routes.yaml > --- > master: > facts: > terminus: puppetdb > cache: yaml > > ----------------------------------------------- > /etc/puppet/puppet.conf > > [master] > storeconfigs = true > storeconfigs_backend = puppetdb > reports = store,puppetdb > facts_terminus = puppetdb-terminus > > ------------------------------------------------ > /etc/puppet/puppetdb.conf > > [main] > server = fqdn-hostname > port = 8081 > > ----------------------------------------------------- > /etc/puppetdb/log4j.properties - default - no change > /etc/puppetdb/conf.d/config.ini - default - no change > /etc/puppetdb/conf.d/jetty.ini - default - no change > /etc/puppetdb/conf.d/repl.ini - default - no change > ----------------------------------------------------- > > /etc/puppetdb/conf.d/database.ini: > > classname = org.postgresql.jdbcDriver >I think you want org.postgresql.Driver here; see http://docs.puppetlabs.com/puppetdb/latest/configure.html#using-postgresql> subprotocol = postgresql > subname = //localhost:5432/puppetdb > username = puppetdb > password = puppetdb > gc-interval = 60 > log-slow-statements = 10 > > ================================================> Postgresql Settings > ================================================> > psql -U puppetdb > Password for user puppetdb: > psql (8.4.13) > Type "help" for help. > > puppetdb=> \l > List of databases > Name | Owner | Encoding | Collation | Ctype | Access > privileges > > -----------+----------+----------+-------------+-------------+-------------------------- > postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | > puppetdb | puppetdb | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/puppetdb > : > puppetdb=C*T*c*/puppetdb > template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres > : > postgres=CTc/postgres > template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres > : > postgres=CTc/postgres > (4 rows) > puppetdb=> \du > List of roles > Role name | Attributes | Member of > -----------+-------------+------------ > postgres | Superuser | {} > : Create role > : Create DB > puppetdb | | {postgres} > > > ==============================================================> Java Stuff > ==============================================================> java -version > java version "1.7.0_19" > OpenJDK Runtime Environment (rhel-2.3.9.1.el6_4-x86_64) > OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode) > > rpm -qa | grep java > java-1.7.0-openjdk-1.7.0.19-2.3.9.1.el6_4.x86_64 > tzdata-java-2013b-1.el6.noarch > java-1.6.0-openjdk-1.6.0.0-1.61.1.11.11.el6_4.x86_64 > > rpm -qa | grep postgr > postgresql-8.4.13-1.el6_3.x86_64 > postgresql-devel-8.4.13-1.el6_3.x86_64 > postgresql-libs-8.4.13-1.el6_3.x86_64 > postgresql-server-8.4.13-1.el6_3.x86_64 > postgresql-contrib-8.4.13-1.el6_3.x86_64 > postgresql-jdbc-8.4.701-8.el6.noarch > > > find / -name *postgres*.jar > /usr/share/java/postgresql-jdbc2ee.jar > /usr/share/java/postgresql-8.4-703.jdbc3.jar > /usr/share/java/postgresql-jdbc-8.4.701.jar > /usr/share/java/postgresql-8.4-703.jdbc4.jar > /usr/share/java/postgresql-jdbc2.jar > /usr/share/java/postgresql-jdbc.jar > /usr/share/java/postgresql-jdbc3.jar > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.