Created attachment 1244909 [details]
Procedure and Logs
Description of problem:
A) Using the procedure described in attached file there is an error which prevents to start the Inventory service.
19:49:54,824 WARN [org.hawkular.inventory.cdi] (ServerService Thread Pool -- 77) HAWKINV003501: Inventory backend failed to initialize in an attempt 1 of 15 with message: org.postgresql.util.PSQLException: ERROR: unterminated quoted string at or near "'\';"
B) Looking at the postgresql logs there is an SQL sintax error:
ERROR: unterminated quoted string at or near "'\';" at character 94
STATEMENT: COPY "V_BULK_TEMP_EDGE1hZNSlbb" ("within") FROM stdin CSV DELIMITER ' ' QUOTE e'\x01' ESCAPE '\';
Version-Release number of selected component (if applicable):
Steps to Reproduce:
See attached file
Database syntax error.
I see you pointing Hawkular at this jdbc url:
while the postgres setup commands deal with a PSQL instance on 192....
Are you sure that is the same? Can you retry the installation with the 192.. address in the jdbc url?
Yes this is the same.
The service connects to database without problems.
The database log records the connection.
The problem is a sql sentence syntax error.
The container can only connect with Docker network. This is the reason.
I can share my VM in case you require it.
There are 2 possible fixes:
1) Modify the setup commands
2) Create new version of Inventory that does the necessary setup on startup (but would require privs to alter the database in addition to create/alter/delete tables in its database).
The attached setup requires the following adjustment:
In " SET DATABASE & MWMANAGER CONTAINERS", modify the step 7 to read:
[root@localhost ~]# su postgres
could not change directory to "/root": Permission denied
Type "help" for help.
postgres=# CREATE USER mwmanager WITH PASSWORD 'mwmanager';
postgres=# CREATE DATABASE mwmanager OWNER mwmanager;
postgres=# ALTER DATABASE mwmanager SET standard_conforming_strings TO ON;
I.e. add the "ALTER DATABASE" command to modify the configuration of the database to be different from the appliance default. Note that this is specific to the "mwmanager" database and does NOT influence the "vmdb_production" database used by CloudForms.
The default value of standard_conforming_strings configuration property is "ON" in Postgres (since 9.1), but the CloudForms appliance modifies it to "OFF" (for reasons it is not sure about. The comment in /var/opt/rh/rh-postgresql95/lib/pgsql/data/postgresql.conf reads "MIQ Value not sure why this is enabled").
Matt, could you please test this with the setup instructions modified as per my comment? Thanks.
Whoops, I thought Matt was assigned.. :) Mike, could you please assign this to someone to test with the modified setup instructions?
Adding the "ALTER DATABASE" it works as expected and no ERRORS are found.
I'll attach a new log file
Created attachment 1246454 [details]
Log without errors after recommended fix applied
Created attachment 1250631 [details]
Created attachment 1250632 [details]
Created attachment 1250633 [details]