wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
748 stars 728 forks source link

IS does not start when all DB set to postgresql #7332

Closed SCLogo closed 4 years ago

SCLogo commented 4 years ago

Logs from postgresql:

│ 2020-01-21 09:36:22.485 GMT [595] ERROR:  relation "um" does not exist                                                                                                                                   │
│ 2020-01-21 09:36:22.485 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.485 GMT [595] ERROR:  column "behavior_pk" of relation "um_claim" does not exist                                                                                                     │
│ 2020-01-21 09:36:22.485 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.486 GMT [595] ERROR:  column "pk" of relation "um_claim_behavior" does not exist                                                                                                     │
│ 2020-01-21 09:36:22.486 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.486 GMT [595] ERROR:  relation "um" does not exist                                                                                                                                   │
│ 2020-01-21 09:36:22.486 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.487 GMT [595] ERROR:  relation "um_hybrid" does not exist                                                                                                                            │
│ 2020-01-21 09:36:22.487 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.487 GMT [595] ERROR:  column "pk" of relation "um_hybrid_role" does not exist                                                                                                        │
│ 2020-01-21 09:36:22.487 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.489 GMT [595] ERROR:  relation "um" does not exist                                                                                                                                   │
│ 2020-01-21 09:36:22.489 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.489 GMT [595] ERROR:  relation "um_hybrid" does not exist                                                                                                                            │
│ 2020-01-21 09:36:22.489 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.490 GMT [595] ERROR:  relation "um_hybrid_user" does not exist                                                                                                                       │
│ 2020-01-21 09:36:22.490 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.491 GMT [595] ERROR:  column "pk" of relation "um_hybrid_user_role" does not exist                                                                                                   │
│ 2020-01-21 09:36:22.491 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.492 GMT [595] ERROR:  relation "um" does not exist                                                                                                                                   │
│ 2020-01-21 09:36:22.492 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.493 GMT [595] ERROR:  relation "um_system" does not exist                                                                                                                            │
│ 2020-01-21 09:36:22.493 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.493 GMT [595] ERROR:  column "pk" of relation "um_system_role" does not exist                                                                                                        │
│ 2020-01-21 09:36:22.493 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.494 GMT [595] ERROR:  relation "um" does not exist                                                                                                                                   │
│ 2020-01-21 09:36:22.494 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.495 GMT [595] ERROR:  relation "um_system" does not exist                                                                                                                            │
│ 2020-01-21 09:36:22.495 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.495 GMT [595] ERROR:  column "role_pk" of relation "um_system_user" does not exist                                                                                                   │
│ 2020-01-21 09:36:22.495 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.496 GMT [595] ERROR:  column "pk" of relation "um_system_user_role" does not exist                                                                                                   │
│ 2020-01-21 09:36:22.496 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.498 GMT [595] ERROR:  relation "um" does not exist                                                                                                                                   │
│ 2020-01-21 09:36:22.498 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.498 GMT [595] ERROR:  relation "um_hybrid" does not exist                                                                                                                            │
│ 2020-01-21 09:36:22.498 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)                                                                                                                      │
│ 2020-01-21 09:36:22.499 GMT [595] ERROR:  relation "um_hybrid_remember" does not exist                                                                                                                   │
│ 2020-01-21 09:36:22.499 GMT [595] STATEMENT:  SELECT pg_get_serial_sequence($1, $2)  

from IS:

NestedThrowables:                                                                                                                                                                                        │
│ org.postgresql.util.PSQLException: This connection has been closed.                                                                                                                                      │
│     at org.postgresql.jdbc.PgConnection.checkClosed(PgConnection.java:782)                                                                                                                               │
│     at org.postgresql.jdbc.PgConnection.prepareStatement(PgConnection.java:1684)                                                                                                                         │
│     at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)                                                                                                                                     │
│     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                                                                             │
│     at java.lang.reflect.Method.invoke(Method.java:498)                                                                                                                                                  │
│     at org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)                                                                                                                      │
│     at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108)                                                                                                                      │
│     at org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.invoke(AbstractCreateStatementInterceptor.java:75)                                                                     │
│     at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108)                                                                                                                      │
│     at org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.invoke(AbstractCreateStatementInterceptor.java:75)                                                                     │
│     at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108)                                                                                                                      │
│     at org.apache.tomcat.jdbc.pool.interceptor.ConnectionState.invoke(ConnectionState.java:152)                                                                                                          │
│     at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108)                                                                                                                      │
│     at org.apache.tomcat.jdbc.pool.TrapException.invoke(TrapException.java:40)                                                                                                                           │
│     at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108)                                                                                                                      │
│     at org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.invoke(AbstractCreateStatementInterceptor.java:75)                                                                     │
│     at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108)                                                                                                                      │
│     at org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:81)                                                                                                 │
│     at com.sun.proxy.$Proxy52.prepareStatement(Unknown Source)                                                                                                                                           │
│     at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:135)                                                                                                  │
│     at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:276)                                                                    │
│     at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:133)                                                                                                  │
│     at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator$ConfiguringConnection.prepareStatement(ConfiguringConnectionDecorator.java:140)                                                        │
│     at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:133)                                                                                                  │
│     at org.apache.openjpa.jdbc.sql.PostgresDictionary$PostgresConnection.prepareStatement(PostgresDictionary.java:987)                                                                                   │
│     at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:133)                                                                                                  │
│     at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$RefCountConnection.prepareStatement(JDBCStoreManager.java:1622)                                                                                   │
│     at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:122)                                                                                                  │
│     at org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:449)                                                                                                                        │
│     at org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:429)                                                                                                                        │
│     at org.apache.openjpa.jdbc.sql.SelectImpl.prepareStatement(SelectImpl.java:479)                                                                                                                      │
│     at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:420)                                                                                                                               │
│     at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:382)

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.

~ $ cat wso2is-5.9.0/repository/conf/deployment.toml 
[server]
hostname = "localhost"
node_ip = "127.0.0.1"
base_path = "https://$ref{server.hostname}:${carbon.management.port}"

[super_admin]
username = "admin"
password = "admin"
create_admin_account = true

[user_store]
type = "read_write_ldap"
connection_url = "ldap://localhost:${Ports.EmbeddedLDAP.LDAPServerPort}"
connection_name = "uid=admin,ou=system"
connection_password = "admin"
base_dn = "dc=wso2,dc=org"      #refers the base dn on which the user and group search bases will be generated

[database.identity_db]
type = "postgre"
url = "jdbc:postgresql://postgresql:5432/db"
username = "username"
password = "password"
driver = "org.postgresql.Driver"
[database.identity_db.pool_options]
maxActive = "80"
maxWait = "60000"
minIdle = "5"
testOnBorrow = true
validationQuery="SELECT 1;"
validationInterval="30000"
defaultAutoCommit=false

[database.shared_db]
type = "postgre"
url = "jdbc:postgresql://postgresql:5432/db"
username = "username"
password = "password"
driver = "org.postgresql.Driver"
[database.shared_db.pool_options]
maxActive = "80"
maxWait = "60000"
minIdle = "5"
testOnBorrow = true
validationQuery="SELECT 1;"
validationInterval="30000"
defaultAutoCommit=false

[database.user]
url = "jdbc:postgresql://postgresql:5432/db"
username = "username"
password = "password"
driver = "org.postgresql.Driver"

[bps_database.config]
url = "jdbc:postgresql://postgresql:5432/db"
username = "username"
password = "password"
driver = "org.postgresql.Driver"

[[datasource]]
id="WSO2CONSENT_DB"
url = "jdbc:postgresql://postgresql:5432/db"
username = "username"
password = "password"
driver = "org.postgresql.Driver"
jmx_enable=false
pool_options.maxActive = "80"
pool_options.maxWait = "60000"
pool_options.minIdle = "5"
pool_options.testOnBorrow = true
pool_options.validationQuery="SELECT 1; COMMIT"
pool_options.validationInterval="30000"
pool_options.defaultAutoCommit=false

[authentication.consent]
data_source="jdbc/WSO2CONSENT_DB"

[keystore.primary]
name = "wso2carbon.jks"
password = "wso2carbon"

please advice

nilasini commented 4 years ago

Hi @SCLogo Did you run the script /dbscripts/postgresql.sql?. According to the shared logs some tables are missing in your database. When you run /dbscripts/postgresql.sql did you get any errors?

NilukaSripalim commented 4 years ago

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/

SCLogo commented 4 years ago

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.

SCLogo commented 4 years ago

update

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                                
NilukaSripalim commented 4 years ago

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,

/dbscripts/identity/postgresql.sql /dbscripts/identity/uma/postgresql.sql /dbscripts/consent/postgresql.sql /dbscripts/postgresql.sql /dbscripts/bps/bpel/create/postgresql.sql and I also used one database So I will share my deployment.toml with this. `[server] hostname = "localhost" node_ip = "127.0.0.1" base_path = "https://$ref{server.hostname}:${carbon.management.port}" [super_admin] username = "admin" password = "admin" create_admin_account = true [user_store] type = "read_write_ldap" connection_url = "ldap://localhost:${Ports.EmbeddedLDAP.LDAPServerPort}" connection_name = "uid=admin,ou=system" connection_password = "admin" base_dn = "dc=wso2,dc=org" #refers the base dn on which the user and group search bases will be generated [database.identity_db] type = "postgre" hostname = "localhost" name = "db" username = "postgres" password = "wso2carbon" port = "5432" [database.shared_db] type = "postgre" hostname = "localhost" name = "db" username = "postgres" password = "wso2carbon" port = "5432" [database.identity_db.pool_options] maxActive = "80" maxWait = "60000" minIdle = "5" testOnBorrow = true validationQuery="SELECT 1; COMMIT" validationInterval="30000" defaultAutoCommit=false [database.shared_db.pool_options] maxActive = "80" maxWait = "60000" minIdle = "5" testOnBorrow = true validationQuery="SELECT 1; COMMIT" validationInterval="30000" defaultAutoCommit=false ############ [database.user] url = "jdbc:postgresql://localhost:5432/db" username = "postgres" password = "wso2carbon" driver = "org.postgresql.Driver" [bps_database.config] url = "jdbc:postgresql://localhost:5432/db" username = "postgres" password = "wso2carbon" driver = "org.postgresql.Driver" [[datasource]] id="WSO2CONSENT_DB" url = "jdbc:postgresql://postgresql:5432/db" username = "postgres" password = "wso2carbon" driver = "org.postgresql.Driver" jmx_enable=false pool_options.maxActive = "80" pool_options.maxWait = "60000" pool_options.minIdle = "5" pool_options.testOnBorrow = true pool_options.validationQuery="SELECT 1; COMMIT" pool_options.validationInterval="30000" pool_options.defaultAutoCommit=false [authentication.consent] data_source="jdbc/WSO2CONSENT_DB" [keystore.primary] name = "wso2carbon.jks" password = "wso2carbon"`
SCLogo commented 4 years ago

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

NilukaSripalim commented 4 years ago

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.

SCLogo commented 4 years ago

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..

image

Any advice ?

SCLogo commented 4 years ago

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