Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-3648

PuppetDB having issues with escape characters

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: PDB 4.2.3.5, PDB 4.4.1, PDB 5.0.1
    • Fix Version/s: PDB 4.2.3.6, PDB 4.4.2, PDB 5.1.0
    • Component/s: PuppetDB
    • Labels:
      None
    • Environment:

      2017.2.3

    • Template:
    • Team:
      Data Platform
    • Story Points:
      1
    • Sprint:
      Data Platform 2017-09-06
    • Method Found:
      Customer Feedback
    • CS Priority:
      Critical
    • CS Frequency:
      1 - 1-5% of Customers
    • CS Severity:
      4 - Major
    • CS Business Value:
      3 - $$$$
    • CS Impact:
      This is impacting the customer's ability to retrieve reports from nodes via the console
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      PuppetDB has historically had issues dealing with binary data. Specifically, unicode-escaped null characters cannot be stored in PostgreSQL. The release directly configures the JSON library used by PuppetDB to replace such characters, which should completely eliminate the problem in a large class of cases.
      Show
      PuppetDB has historically had issues dealing with binary data. Specifically, unicode-escaped null characters cannot be stored in PostgreSQL. The release directly configures the JSON library used by PuppetDB to replace such characters, which should completely eliminate the problem in a large class of cases.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Creating a template report on the node fails in PuppetDB

      The report runs fine on the node, but PuppetDB reports issues with the escape characters

      The code line in question

      SpiritMQConnectionFactory/RefAddr/10/Content=\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000
      

      2017-08-30 14:21:13,501 ERROR [p.p.command] [6,734] [replace catalog] Retrying after attempt 0 for <FQDN>, due$ 
      Detail: Escape sequence "\�" is invalid. 
      Where: JSON data, line 1: ...SpiritMQConnectionFactory/RefAddr/10/Content=\�... 
      org.postgresql.util.PSQLException: ERROR: invalid input syntax for type json 
      Detail: Escape sequence "\�" is invalid. 
      Where: JSON data, line 1: ...SpiritMQConnectionFactory/RefAddr/10/Content=\�... 
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284) 
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003) 
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200) 
      at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424) 
      at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161) 
      at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:133) 
      at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) 
      at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) 
      at clojure.java.jdbc$db_do_execute_prepared_return_keys$exec_and_return_keys__21815.invoke(jdbc.clj:760) 
      at clojure.java.jdbc$db_do_execute_prepared_return_keys.invokeStatic(jdbc.clj:774) 
      at clojure.java.jdbc$db_do_execute_prepared_return_keys.invoke(jdbc.clj:753) 
      at clojure.java.jdbc$db_do_prepared_return_keys.invokeStatic(jdbc.clj:802) 
      at clojure.java.jdbc$db_do_prepared_return_keys.invoke(jdbc.clj:782) 
      at clojure.java.jdbc$multi_insert_helper$fn__21880.invoke(jdbc.clj:1044) 
      at clojure.core$map$fn__4785.invoke(core.clj:2646) 
      at clojure.lang.LazySeq.sval(LazySeq.java:40) 
      at clojure.lang.LazySeq.seq(LazySeq.java:49) 
      at clojure.lang.Cons.next(Cons.java:39) 
      at clojure.lang.RT.next(RT.java:688) 
      at clojure.core$next__4341.invokeStatic(core.clj:64) 
      at clojure.core$dorun.invokeStatic(core.clj:3033) 
      at clojure.core$doall.invokeStatic(core.clj:3039) 
      at clojure.core$doall.invoke(core.clj:3039) 
      at clojure.java.jdbc$multi_insert_helper.invokeStatic(jdbc.clj:1044) 
      at clojure.java.jdbc$multi_insert_helper.invoke(jdbc.clj:1039)
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  nicholas.kernohan Nicky Kernohan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: