Article - CS375410

Accidentally executed an SQL statement that revoked privileges in the PostgreSQL database for the ThingWorx Platform database user

Modified: 25-Aug-2022   


Applies To

  • ThingWorx Platform 8.5 to 9.3
  • PostgreSQL

Description

  • When changing the ThingWorx Platform PostgreSQL database user and executed an improper query
  • Administrator revoked permissions granted to the ThingWorx Postgres user by mistake
  • twadmin permissions were removed at the database level accidentally
  • ThingWorx Platform will not start after removing necessary database permissions in PostgreSQL via psql or pgAdmin
  • Administrator ran the following PostgreSQL statement by mistake:
    • REVOKE ALL ON SCHEMA <Schema> FROM public;
  • When starting ThingWorx Platform one set of following errors are logged in the ApplicationLog.log file located in <ThingworxStorage>\logs\
    • [L: INFO] [O: c.t.s.ThingWorxServer] [I: ] [U: SuperUser] [S: ] [P: ] [T: main] Database initialization started...
      [L: ERROR] [O: c.t.p.p.PostgresModelExceptionTranslator] [I: ] [U: SuperUser] [S: ] [P: ] [T: main] ERROR: relation "system_version" does not exist_  Position: 128
      [L: ERROR] [O: c.t.p.p.PostgresModelExceptionTranslator] [I: ] [U: SuperUser] [S: ] [P: ] [T: main] ERROR: current transaction is aborted, commands ignored until end of transaction block
      [L: ERROR] [O: c.t.s.ThingWorxServer] [I: ] [U: SuperUser] [S: ] [P: ] [T: main] ERROR: current transaction is aborted, commands ignored until end of transaction block
      [L: INFO] [O: c.t.p.p.PersistenceProvider] [I: ] [U: SuperUser] [S: ] [P: ] [T: main] Connection ThingworxPersistenceProvider, type PostgresPersistenceProviderPackage stopped
      [L: WARN] [O: c.t.p.p.PersistenceProvider] [I: ] [U: SuperUser] [S: ] [P: ] [T: main] Could not find persistenceProviderPackage PostgresPersistenceProviderPackage and thus could not stop data processing
      [L: ERROR] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [P: ] [T: main] *** CRITICAL ERROR ON STARTUP: Unable to initialize and start system: ERROR: current transaction is aborted, commands ignored until end of transaction block
      [L: ERROR] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [P: ] [T: main] *** Web Application STATE is being set to ERROR! ***
      [L: INFO] [O: c.t.s.ThingWorxServer] [I: ] [U: SuperUser] [S: ] [P: ] [T: main] >>>>>>> PLATFORM SHUTDOWN START <<<<<<<<<
    • [L: ERROR] [O: c.t.s.m.BaseManager] [I: ] [U: SuperUser] [S: ] [P: ] [T: ForkJoinPool-1-worker-5] Unable To Initialize Entity ThingworxPersistenceProvider in PersistenceProviders: ERROR: permission denied for schema public
      [L: ERROR] [O: c.t.p.p.PostgresModelExceptionTranslator] [I: ] [U: SuperUser] [S: ] [P: ] [T: ForkJoinPool-1-worker-7] ERROR: current transaction is aborted, commands ignored until end of transaction block
      ...
      [L: ERROR] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [P: ] [T: main] *** Web Application STATE is being set to ERROR! ***
      [L: INFO] [O: c.t.s.ThingWorxServer] [I: ] [U: SuperUser] [S: ] [P: ] [T: main] >>>>>>> PLATFORM SHUTDOWN START <<<<<<<<<
This is a printer-friendly version of Article 375410 and may be out of date. For the latest version click CS375410