Reputation: 47
We've upgraded to Polarion 2304 recently (ish) and since then the control chart widgets do not work. Existing widgets (pre update, 20H2) and newly created control charts just display this error:
There was an exception (see server log for details) ERROR: The following error occurred during execution on pg server: (SQL State) 08001 : could not establish connection
Hint: Please contact your Administrator. See PostgreSQL logs for more details.
Where: PL/pgSQL function lucene_query(character varying,character varying,character varying) line 11 at RAISE
We're waiting for our support to come back with something (it's been a while) but I'm wondering if anyone would have any suggestions? Everything else in Polarion seems to work fine, other widgets, lucene queries etc.
Full log:
2023-09-26 10:45:13 BST polarion_history ERROR: The following error occurred during execution on pg server: (SQL State) 08001 : could not establish connection
2023-09-26 10:45:13 BST polarion_history HINT: Please contact your Administrator. See PostgreSQL logs for more details.
2023-09-26 10:45:13 BST polarion_history CONTEXT: PL/pgSQL function lucene_query(character varying,character varying,character varying) line 11 at RAISE
2023-09-26 10:45:13 BST polarion_history STATEMENT: SELECT WORKITEM.C_URI, MIN(WORKITEM.C_UPDATED) FROM LUCENE_QUERY('WorkItem', $1, 'updated') QUERY, WORKITEM WHERE QUERY.C_PK=WORKITEM.C_URI AND WORKITEM.C_STATUS IN ($2) GROUP BY WORKITEM.C_URI
2023-09-26 10:45:13 BST polarion_history ERROR: The following error occurred during execution on pg server: (SQL State) 08001 : could not establish connection
2023-09-26 10:45:13 BST polarion_history HINT: Please contact your Administrator. See PostgreSQL logs for more details.
2023-09-26 10:45:13 BST polarion_history CONTEXT: PL/pgSQL function lucene_query(character varying,character varying,character varying) line 11 at RAISE
2023-09-26 10:45:13 BST polarion_history STATEMENT: SELECT WORKITEM.C_URI, MIN(WORKITEM.C_UPDATED) FROM LUCENE_QUERY('WorkItem', $1, 'updated') QUERY, WORKITEM WHERE QUERY.C_PK=WORKITEM.C_URI AND WORKITEM.C_STATUS IN ($2) GROUP BY WORKITEM.C_URI
2023-09-26 10:45:34 BST polarion ERROR: INSERT has more expressions than target columns at character 71
2023-09-26 10:45:34 BST polarion STATEMENT: INSERT INTO Revision VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)
2023-09-26 10:45:36 BST polarion_history ERROR: INSERT has more expressions than target columns at character 71
2023-09-26 10:45:36 BST polarion_history STATEMENT: INSERT INTO Revision VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)
2023-09-26 10:45:58 BST polarion_history ERROR: The following error occurred during execution on pg server: (SQL State) 08001 : could not establish connection
Thanks
Upvotes: 0
Views: 152
Reputation: 11
We got the same error message on a SQL Query that uses the lucene_query function. This seems to be what is used in the widget internals, too.
Lucene_query() in sql in polarion is a custom function that is stored in the postgres DB. You can print that function, and a snippet of what it does is the following:
SELECT WI.CPK FROM public.dblink('dbname=/opt/polarion/data/workspace/polarion-data/database/PG_LUCENE_FULLTEXT;MULTI_THREADED=TRUE;MODE=PostgreSQL;LOCK_TIMEOUT=1800000;MAX_COMPACT_TIME=10000 port=5435 host=localhost user=SNIP password=SNIP',
As you can see, the postgres SQL db connects to h2 database in /opt/polarion/data/workspace/polarion-data/databases/PG_LUCENE_FULLTEXT. If this is for some reason not possible (in our case it wasn't because our PostgresSQL DB was on a separate server and couldn't access the H2 DB on the other server) then you get the error you recieved.
You could try and see if that DB file exists in that location and what happens if you rename/remove it.
Upvotes: 1