Skip to content

Instantly share code, notes, and snippets.

root@debian-607-x64-vbox4210:/home/vagrant# dpkg -i oracle-j2re1.7_1.7.0+update45_amd64.deb
Selecting previously deselected package oracle-j2re1.7.
(Reading database ... 41189 files and directories currently installed.)
Unpacking oracle-j2re1.7 (from oracle-j2re1.7_1.7.0+update45_amd64.deb) ...
Setting up oracle-j2re1.7 (1.7.0+update45) ...
update-alternatives: using /usr/lib/jvm/j2re1.7-oracle/bin/java to provide /usr/bin/java (java) in auto mode.
update-alternatives: using /usr/lib/jvm/j2re1.7-oracle/bin/javaws to provide /usr/bin/javaws (javaws) in auto mode.
update-alternatives: using /usr/lib/jvm/j2re1.7-oracle/bin/keytool to provide /usr/bin/keytool (keytool) in auto mode.
update-alternatives: using /usr/lib/jvm/j2re1.7-oracle/bin/orbd to provide /usr/bin/orbd (orbd) in auto mode.
update-alternatives: using /usr/lib/jvm/j2re1.7-oracle/bin/pack200 to provide /usr/bin/pack200 (pack200) in auto mode.
---------+------------+-------+----------+----------+------------------+-------------+-----------------+-------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+---------+---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1190906 | puppetdb68 | 1214
@kbarber
kbarber / gist:7662934
Created November 26, 2013 17:59
lein deps for puppetdb 1.5.1
[ken@kb puppetdb]# lein deps :tree
[cheshire "5.2.0"]
[com.fasterxml.jackson.core/jackson-core "2.2.1"]
[com.fasterxml.jackson.dataformat/jackson-dataformat-smile "2.2.1"]
[tigris "0.1.1"]
[clamq/clamq-activemq "0.4" :exclusions [[org.slf4j/slf4j-api]]]
[clamq/clamq-jms "0.4"]
[clamq/clamq-core "0.4"]
[org.springframework/spring-jms "3.0.5.RELEASE"]
[aopalliance "1.0"]
ken@kb puppetdb]# lein run services -c config.ini
2013-11-25 16:41:00,156 WARN [puppetdb.config] Global config catalog-hash-conflict-debugging set to true. This is intended to troubleshoot catalog duplication issues and not for enabling in production long term. See the PuppetDB docs for more information on this setting.
2013-11-25 16:41:00,198 INFO [cli.services] PuppetDB version 1.5.2-180-dirty
2013-11-25 16:41:00,350 ERROR [scf.migrate] asdf
java.sql.BatchUpdateException: Batch entry 1 INSERT INTO edges_transform (certname, source, target, type)
SELECT cc.certname, e.source, e.target, e.type
FROM edges e, catalogs c, catalog_resources cr
WHERE e.catalog_id = c.id and cr.catalog_id = c.id was aborted. Call getNextException to see the cause.
at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1887)
[ken@kb puppetdb]# lein run services -c config.ini
2013-11-25 16:36:07,012 WARN [puppetdb.config] Global config catalog-hash-conflict-debugging set to true. This is intended to troubleshoot catalog duplication issues and not for enabling in production long term. See the PuppetDB docs for more information on this setting.
2013-11-25 16:36:07,040 INFO [cli.services] PuppetDB version 1.5.2-180-dirty
2013-11-25 16:36:07,193 ERROR [scf.migrate] #<BatchUpdateException java.sql.BatchUpdateException: Batch entry 1 INSERT INTO edges_transform (certname, source, target, type)
SELECT cc.certname, e.source, e.target, e.type
FROM edges e, catalogs c, catalog_resources cr
WHERE e.catalog_id = c.id and cr.catalog_id = c.id was aborted. Call getNextException to see the cause.>
2013-11-25 16:36:07,196 INFO [cli.services] Starting broker
2013-11-25 16:36:07,198 INFO [puppetlabs.mq] Setting ActiveMQ StoreUsage limit to 1000 MB
2013-11-25 16:36:07,253 INFO [puppetlabs.mq] Setting ActiveMQ TempUs
[ken@kb puppetdb]# lein run services -c config.ini
2013-11-25 16:21:00,057 WARN [puppetdb.config] Global config catalog-hash-conflict-debugging set to true. This is intended to troubleshoot catalog duplication issues and not for enabling in production long term. See the PuppetDB docs for more information on this setting.
2013-11-25 16:21:00,083 INFO [cli.services] PuppetDB version 1.5.2-180-dirty
org.postgresql.util.PSQLException: ERROR: missing FROM-clause entry for table "cc"
Position: 75
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse (QueryExecutorImpl.java:2157)
org.postgresql.core.v3.QueryExecutorImpl.processResults (QueryExecutorImpl.java:1886)
org.postgresql.core.v3.QueryExecutorImpl.execute (QueryExecutorImpl.java:405)
org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch (AbstractJdbc2Statement.java:2893)
com.jolbox.bonecp.StatementHandle.executeBatch (StatementHandle.java:469)
[ken@kb puppetdb]# lein run services -c config.ini
2013-11-25 16:16:52,446 WARN [puppetdb.config] Global config catalog-hash-conflict-debugging set to true. This is intended to troubleshoot catalog duplication issues and not for enabling in production long term. See the PuppetDB docs for more information on this setting.
2013-11-25 16:16:52,481 INFO [cli.services] PuppetDB version 1.5.2-180-dirty
java.sql.BatchUpdateException: Batch entry 1 INSERT INTO edges_transform (certname, source, target, type)
SELECT cc.certname, e.source, e.target, e.type
FROM edges e, catalogs c, catalog_resources cr
WHERE e.catalog_id = c.id and cr.catalog_id = c.id was aborted. Call getNextException to see the cause.
at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError (AbstractJdbc2Statement.java:2746)
org.postgresql.core.v3.QueryExecutorImpl.processResults (QueryExecutorImpl.java:1887)
org.postgresql.core.v3.QueryExecutorImpl.execute (QueryExecutorImpl.java:405)
@kbarber
kbarber / gist:7369761
Created November 8, 2013 11:33
Bug with anonymization
diff --git a/src/com/puppetlabs/puppetdb/reports.clj b/src/com/puppetlabs/puppetdb/reports.clj
index 31755a3..7328fec 100644
--- a/src/com/puppetlabs/puppetdb/reports.clj
+++ b/src/com/puppetlabs/puppetdb/reports.clj
@@ -24,24 +24,27 @@
})
(defmodel ResourceEvent
- {:status :string
- :timestamp :datetime
Key Value
fact1 asdf
fact2 fdsa
fact3 fdsas
But with structured facts:
Key Value
fact1 [hash]
fact1/foo asdf
Loading tool:
#!/usr/bin/env ruby
require 'pg'
require 'digest/sha1'
# Output a table of current connections to the DB
conn = PG.connect(dbname: 'indexloadtesting', host: 'localhost')