Closed SCLogo closed 4 years ago
Hi @SCLogo
Did you run the script
Hi @SCLogo, you can follow the WSO2 document [1], and also when configuring [database.shared_db.pool_options] and [database.identity_db.pool_options], you have to use validationQuery="SELECT 1; COMMIT" instead "SELECT 1;"
[1] https://is.docs.wso2.com/en/5.9.0/setup/changing-to-postgresql/
Hello @nilasini, Yes, I ran that script. In the postgre log I did not see any issue related to init part. @NilukaSripalim I followed that documentation. Could be the problem that I used only one db for all settings?
Do I need to store identity, PBS and consent in a separated DB and run the init script against them? Currently I ran all script mentioned in the doc against one db one by one. COMMIT part updated.
When I comment out bps and datasource part, the IS starts and can use it. The only problem is in that case those data will store in H2.
2020-01-21 15:29:07.852 GMT [1] LOG: database system is ready to accept connections │
│ 2020-01-21 15:31:36.332 GMT [405] ERROR: relation "cm" does not exist │
│ 2020-01-21 15:31:36.332 GMT [405] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-21 15:31:36.336 GMT [405] ERROR: relation "cm_pii" does not exist │
│ 2020-01-21 15:31:36.336 GMT [405] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-21 15:31:36.337 GMT [405] ERROR: column "pk" of relation "cm_pii_category" does not exist │
│ 2020-01-21 15:31:36.337 GMT [405] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-21 15:31:36.339 GMT [405] ERROR: relation "cm" does not exist │
│ 2020-01-21 15:31:36.339 GMT [405] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-21 15:31:36.341 GMT [405] ERROR: column "pk" of relation "cm_purpose" does not exist │
│ 2020-01-21 15:31:36.341 GMT [405] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-21 15:31:36.342 GMT [405] ERROR: relation "cm" does not exist │
│ 2020-01-21 15:31:36.342 GMT [405] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-21 15:31:36.347 GMT [405] ERROR: column "category_pk" of relation "cm_purpose" does not exist │
│ 2020-01-21 15:31:36.347 GMT [405] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-21 15:31:36.355 GMT [405] ERROR: column "pk" of relation "cm_purpose_category" does not exist │
│ 2020-01-21 15:31:36.355 GMT [405] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-21 15:31:36.356 GMT [405] ERROR: relation "cm" does not exist
Hi @SCLogo, Yes, it is not mandatory to create multiple databases, you can work on one.
And I followed you deployment.toml configurations, with my test data. But I was unable to reproduce the issue you mentioned above. My POSTGRES version is- 10.11 and also we have db script issue with postgres latest (PostgreSQL 12.1 (Debian 12.1-1.pgdg100+1) and our team working on it. I executed db scripts which are,
Hi @NilukaSripalim,
Thanks for the reply. I am using postgre 11.6. Could you please check the problem with that version? I guess you will see the same error as with latest postgre. Thanks
Hi @SCLogo ,
I tried using same deployment.toml against, postgre 11.6. But I didn't get any error log while server startup. Could you please try, with a new database.
Hello @NilukaSripalim,
I tested multiple time today again and I still see errors on psql side. WSO starts after a long time, but it tries to access tables that are non exists.
2020-01-23 13:51:13.356 GMT [415] ERROR: relation "idn" does not exist │
│ 2020-01-23 13:51:13.356 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.357 GMT [415] ERROR: relation "idn_saml2" does not exist │
│ 2020-01-23 13:51:13.357 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.358 GMT [415] ERROR: relation "idn_saml2_assertion" does not exist │
│ 2020-01-23 13:51:13.358 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.358 GMT [415] ERROR: relation "idn" does not exist │
│ 2020-01-23 13:51:13.358 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.359 GMT [415] ERROR: relation "idn_saml2" does not exist │
│ 2020-01-23 13:51:13.359 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.359 GMT [415] ERROR: relation "idn_saml2_artifact" does not exist │
│ 2020-01-23 13:51:13.359 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.360 GMT [415] ERROR: relation "idn" does not exist │
│ 2020-01-23 13:51:13.360 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.360 GMT [415] ERROR: relation "idn_oidc" does not exist │
│ 2020-01-23 13:51:13.360 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.361 GMT [415] ERROR: relation "idn" does not exist │
│ 2020-01-23 13:51:13.361 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.362 GMT [415] ERROR: relation "idn_oidc" does not exist │
│ 2020-01-23 13:51:13.362 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.362 GMT [415] ERROR: relation "idn_oidc_request" does not exist │
│ 2020-01-23 13:51:13.362 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.363 GMT [415] ERROR: relation "idn_oidc_request_object" does not exist │
│ 2020-01-23 13:51:13.363 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.363 GMT [415] ERROR: relation "idn" does not exist │
│ 2020-01-23 13:51:13.363 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.364 GMT [415] ERROR: relation "idn_oidc" does not exist │
│ 2020-01-23 13:51:13.364 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.364 GMT [415] ERROR: relation "idn_oidc_req" does not exist │
│ 2020-01-23 13:51:13.364 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.365 GMT [415] ERROR: relation "idn_oidc_req_object" does not exist │
│ 2020-01-23 13:51:13.365 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.366 GMT [415] ERROR: relation "idn" does not exist │
│ 2020-01-23 13:51:13.366 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.367 GMT [415] ERROR: relation "idn_oidc" does not exist │
│ 2020-01-23 13:51:13.367 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.367 GMT [415] ERROR: relation "idn_oidc_req" does not exist │
│ 2020-01-23 13:51:13.367 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.368 GMT [415] ERROR: relation "idn_oidc_req_object" does not exist │
│ 2020-01-23 13:51:13.368 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-23 13:51:13.369 GMT [415] ERROR: relation "idn_oidc_req_object_claim" does not exist │
│ 2020-01-23 13:51:13.369 GMT [415] STATEMENT: SELECT pg_get_serial_sequence($1, $2)
When I search the sql files what I could get from the wso2 pod I cannot find those tables.
kubectl cp wso2-identity-server-8588d69585-xfff9:/home/wso2carbon/wso2is-5.9.0/dbscripts ./
like:
grep -i "idn_saml2_artifact" -r ../temp/ | grep postgresql <aws:mfa><aws:mfa>
../temp/identity/postgresql.sql:DROP TABLE IF EXISTS IDN_SAML2_ARTIFACT_STORE;
../temp/identity/postgresql.sql:DROP SEQUENCE IF EXISTS IDN_SAML2_ARTIFACT_STORE_SEQ;
../temp/identity/postgresql.sql:CREATE SEQUENCE IDN_SAML2_ARTIFACT_STORE_SEQ;
../temp/identity/postgresql.sql:CREATE TABLE IDN_SAML2_ARTIFACT_STORE (
../temp/identity/postgresql.sql: ID INTEGER DEFAULT NEXTVAL('IDN_SAML2_ARTIFACT_STORE_SEQ'),
another issue is. I changed everything what I found in the document, but on the UI I still see the registry entries are in H2..
Any advice ?
More error on postgresql:
2020-01-27 08:25:34.613 GMT [405] STATEMENT: SELECT pg_get_serial_sequence($1, $2) │
│ 2020-01-27 08:38:32.935 GMT [1232] LOG: unexpected EOF on client connection with an open transaction │
│ 2020-01-27 08:38:32.936 GMT [1636] LOG: unexpected EOF on client connection with an open transaction │
│ 2020-01-27 08:38:32.938 GMT [1588] LOG: unexpected EOF on client connection with an open transaction │
│ 2020-01-27 08:38:32.939 GMT [1555] LOG: unexpected EOF on client connection with an open transaction │
│ 2020-01-27 08:38:32.940 GMT [1378] LOG: unexpected EOF on client connection with an open transaction │
│ 2020-01-27 08:38:32.941 GMT [1328] LOG: unexpected EOF on client connection with an open transaction │
│ 2020-01-27 08:38:32.943 GMT [1280] LOG: unexpected EOF on client connection with an open transaction │
│ 2020-01-27 08:38:32.944 GMT [1191] LOG: unexpected EOF on client connection with an open transaction │
│ 2020-01-27 08:38:32.945 GMT [1149] LOG: unexpected EOF on client connection with an open transaction │
│ 2020-01-27 08:38:32.946 GMT [1100] LOG: unexpected EOF on client connection with an open transaction │
│ 2020-01-27 08:38:32.948 GMT [1051] LOG: unexpected EOF on client connection with an open transaction
Logs from postgresql:
from IS:
We would like to move everything from H2 to postgre and followed by the following documents: https://is.docs.wso2.com/en/next/setup/changing-to-postgresql/ https://is.docs.wso2.com/en/next/setup/changing-datasource-bpsds/ https://is.docs.wso2.com/en/next/setup/changing-datasource-consent-management/
we created the following toml file.
please advice