Bug #26869
open
Logs filled with similar errors : SQL : la relation « nodelastcompliance » n'existe pas.
Added by Nicolas Ecarnot about 13 hours ago.
Updated about 6 hours ago.
Category:
Web - Maintenance
Severity:
Major - prevents use of part of Rudder | no simple workaround
User visibility:
Getting started - demo | first install | Technique editor and level 1 Techniques
Effort required:
Very Small
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.
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 ?
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) ?
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.
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
Ok, I ran :
ALTER TABLE public.nodelastcompliance OWNER TO rudder;
- Related to Bug #26200: Error at rudder start after an upgrade added
- 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
- Status changed from New to In progress
- 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
- Status changed from Pending technical review to Pending release
Also available in: Atom
PDF