1
votes

I tried to upgrade WSO2 IS as KM from 5.6.0 to 5.7.0 and API Manager from 2.5.0 to 2.6.0 in corresponding with instructions: https://docs.wso2.com/display/AM260/Upgrading+from+the+Previous+Release+when+WSO2+IS+is+the+Key+Manager

https://docs.wso2.com/display/IS570/Upgrading+from+the+Previous+Release https://docs.wso2.com/display/AM260/Upgrading+from+the+Previous+Release

In instructions there is no mention that i need to import SQl script again to DB apimgt from /dbscripts/apimgt/mysql.sql, cause 5.7.0 IS as KM has more tables in that DB than 5.6.0 version.

During upgrade of IS i have errors in logs:

 ERROR {org.wso2.carbon.is.migration.service.SchemaMigrator} -  Error occurred while executing SQL script for migrating database
    java.lang.Exception: Error occurred while executing :   CREATE INDEX IDX_RID ON IDN_UMA_RESOURCE (RESOURCE_ID)

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate key name 'IDX_RID'

ERROR {org.wso2.carbon.is.migration.service.SchemaMigrator} -  Error occurred while executing SQL script for migrating database
    java.lang.Exception: Error occurred while executing :   CREATE INDEX IDX_SP_TEMPLATE ON SP_TEMPLATE (TENANT_ID, NAME)

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate key name 'IDX_SP_TEMPLATE'

ERROR {org.wso2.carbon.is.migration.service.SchemaMigrator} -  Error occurred while executing SQL script for migrating database
    java.lang.Exception: Error occurred while executing :  ALTER TABLE CM_PURPOSE ADD COLUMN PURPOSE_GROUP VARCHAR(255) NOT NULL, ADD COLUMN GROUP_TYPE VARCHAR(255) NOT NULL, DROP KEY NAME, ADD UNIQUE KEY (NAME, TENANT_ID, PURPOSE_GROUP, GROUP_TYPE)

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'PURPOSE_GROUP'

INFO {org.wso2.carbon.is.migration.service.v570.migrator.OAuthDataMigrator} -   WSO2 Product Migration Service Task : Migration starting on OAuth2 access token table.
    java.lang.OutOfMemoryError: GC overhead limit exceeded
    Dumping heap to /usr/lib64/wso2/wso2is-km-5.7.0/repository/logs/heap-dump.hprof ...
    Unable to create /usr/lib64/wso2/wso2is-km-5.7.0/repository/logs/heap-dump.hprof: File exists
    ERROR {org.wso2.carbon.is.migration.MigrationClientImpl} -  Migration process was stopped.
    java.lang.OutOfMemoryError: GC overhead limit exceeded

Despite on errors IS is launched, after i launched API-M without errors, but my APIs are not migrated.

I use MariaDB 5.5.

What is the problem with IS and why APIs dont migrated?

1
You don't need to create those tables again. You can point the old databases to new environment (5.7.0) and run IS migration client after editing migration-config.yaml. Did you copy old synapse configurations of APIs and reindex the APIs in API Manager 2.6.0?Vithursa M
I did Step 2.5 (Re-index) again without items 1-4 from Step 2 according to 3rd instruction and APIs are appeared. Thx. So i shouldn't do Steps from 2.1 to 2.4, yes? But what with errors that i have during upgrade of IS? I dont create tables again for apimgt DB, i added new tables from apimgt SQL script, because IS 5.6.0 has less tables than IS 5.7.0.Epic555
i added new tables from apimgt SQL script this is wrong. It's handled by the migration scripts. You don't have to do that manually.Bee
@Bee Upgrading process doesn't add new tables in DB automatically. When i launch command sh wso2server.sh -Dmigrate -Dcomponent=identity, i have errors in log that there are no some tables in apimgt DB.Epic555
That shouldn't be the case. Can you please name some of such tables?Bee

1 Answers

1
votes

"So i shouldn't do Steps from 2.1 to 2.4, yes? But what with errors that i have during upgrade of IS?"

That means, didn't you do the steps 2.1 to 2.4 in https://docs.wso2.com/display/AM260/Upgrading+from+the+Previous+Release#c130adc044364015ae336f584909e3ac?

If you have already followed the steps mentioned in https://docs.wso2.com/display/AM260/Upgrading+from+the+Previous+Release+when+WSO2+IS+is+the+Key+Manager#250, then you need to skip only the 2.4 step in https://docs.wso2.com/display/AM260/Upgrading+from+the+Previous+Release#c130adc044364015ae336f584909e3ac.

Also please make sure that you have given the versions correctly in the migration-config.yaml file as below.

migrationEnable: "true"

currentVersion: "5.6.0"

migrateVersion: "5.7.0"

Note: You do not need to create tables manually.