Project

General

Profile

Actions

Bug #26869

open

Logs filled with similar errors : SQL : la relation « nodelastcompliance » n'existe pas.

Added by Nicolas Ecarnot about 9 hours ago. Updated about 3 hours ago.

Status:
Pending release
Priority:
N/A
Category:
Web - Maintenance
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Getting started - demo | first install | Technique editor and level 1 Techniques
Effort required:
Very Small
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

Hello,

The log file /var/log/rudder/core/rudder-webapp.log is looping every two seconds filling with the following error :

May 05 00:00:06 sit-conf-prd01 rudder[report.cache]: [ERROR] Error when updating compliance cache for nodes: [2d402b3a-a970-460d-981c-209ac0ac2a3e]: SystemError: error when saving compliance for nodes; cause was: java.sql.BatchUpdateException: Batch entry 0
INSERT INTO NodeLastCompliance (nodeId, computationDateTime, details) VALUES .....
...a very large query content ...., ending with the error :
ON CONFLICT (nodeId) DO UPDATE
  SET computationDateTime = excluded.computationDateTime, details = excluded.details  was aborted: ERREUR: la relation « nodelastcompliance » n'existe pas
  Position: 13  Call getNextException to see other errors in the batch.

I looks like something is wrong with our postgreSQL schema, though I did nothing about it.
My only actions is to upgrade Rudder server using Debian apt packages.


Related issues 2 (0 open2 closed)

Related to Rudder - Bug #26200: Error at rudder start after an upgradeReleasedVincent MEMBRÉActions
Related to Rudder - Architecture #25396: Persist compliance in baseReleasedClark ANDRIANASOLOActions
Actions #1

Updated by François ARMAND about 8 hours ago

This is a new table from Rudder 8.2, so if you already had a Rudder 8.2, the table should have been created.
Does that happen after migrating from 8.1 ?

Actions #2

Updated by Nicolas Ecarnot about 8 hours ago

Hello François,

I have no clue at what point this occurred.
Is there a way to ensure our database schema is aligned with our Rudder server version (8.2.5) ?

Actions #3

Updated by François ARMAND about 8 hours ago

It may be due to a migration problem. As a workaround, you can correct the table creation by applying by hand the SQL:

CREATE TABLE NodeLastCompliance (
  nodeId              text NOT NULL CHECK (nodeId <> '') primary key
, computationDateTime timestamp with time zone NOT NULL
, details             jsonb NOT NULL
);

Normally, Rudder ensures that by itself, but it looks that the migration part was removed somewhere in 8.2.x for that table. We are invistigating, an user doesn't have to care about SQL schema.

Actions #4

Updated by Nicolas Ecarnot about 8 hours ago

OK François,

I switched to postgres user, ran psql, connected to rudder database, then ran your command (it went OK).
Now, the error changed to:

ON CONFLICT (nodeId) DO UPDATE
  SET computationDateTime = excluded.computationDateTime, details = excluded.details  was aborted: ERREUR: droit refusé pour la table nodelastcompliance
Actions #5

Updated by Nicolas Ecarnot about 7 hours ago

Ok, I ran :

ALTER TABLE public.nodelastcompliance OWNER TO rudder;

Actions #6

Updated by Clark ANDRIANASOLO about 4 hours ago

  • Related to Bug #26200: Error at rudder start after an upgrade added
Actions #7

Updated by Clark ANDRIANASOLO about 4 hours ago

Actions #8

Updated by Clark ANDRIANASOLO about 4 hours ago

  • Category set to Web - Maintenance
  • Assignee set to Clark ANDRIANASOLO
  • Severity set to Major - prevents use of part of Rudder | no simple workaround
  • User visibility set to Getting started - demo | first install | Technique editor and level 1 Techniques
  • Effort required set to Very Small
Actions #9

Updated by Clark ANDRIANASOLO about 4 hours ago

  • Status changed from New to In progress
Actions #10

Updated by Clark ANDRIANASOLO about 4 hours ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Clark ANDRIANASOLO to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/6356
Actions #11

Updated by Clark ANDRIANASOLO about 3 hours ago

  • Status changed from Pending technical review to Pending release
Actions

Also available in: Atom PDF