I have tried to implement shared registry between clustered environment ESB 4.6.0 using GREG 4.5.3 following the guidance provided in provided in the documentation.
When I use the h2 db for currentDBConfig and the mysql database for mounted registry, WSO2 workers displays the following error when Deployment Synchronizer is automatically invoked:
Error while updating artifacts in the file system from the registry {org.wso2.carbon.deployment.synchronizer.registry.RegistryBasedArtifactRepository}
org.wso2.carbon.registry.synchronization.SynchronizationException: message code: ERROR_IN_READING_STREAM_TO_CREATE_META_FILE
When pointing currentDBConfig to the mysql database, the deployment synchronizer works ok and replicates configuration as expected, but according to the documentation it is not good practice.
How does the Deployment Synchronizer utilize the registry to update artifacts?
I have noticed that the User database uses by default the h2 database. Should it not be re-pointed to the shared governance registry database instead?
Thanks. Guillaume
Related
I'm using WSO2 EI 6.5.0 (latest release),
I'm wondering that Where can i find WSO2 database schema, stores all of things,
Those log files, written on Management console is saved in Database right ?
I am using Oracle DB (PL\SQL)..
I found oracle.sql from dbscripts folder - %E_HOME%,
How to connect WSO2's default database in PLSQL ?
Regards
By default wsoesb use h2 database. You can overwrite default database using oracle. There is documentation how to configure datasource, and there is, i am not sure something like carbon.xml where configure default datasource.
No, the logs are persisted in the files in ESB_HOME/repository/logs folder.
As #srimar mentioned, the default database is embedded H2. You can follow this doc to browse the embedded H2.
But WSO2 didn't recommend the embedded H2 database in the production
To configure the Oracle database you can follow this doc
We are doing a DB Upgradation for WSo2 Governance Registry upgradation from 4.5.3 to 4.6.0. The sql scripts available in the documentation for creating some db schema in staging database is having discrepancy like scripts for creating few tables are missing. Can anyone provide valid scripts for staging database as we are trying out with mySql/Oracle database?
The reference link I am following is shown as below:
https://docs.wso2.com/display/Governance460/Upgrading+from+the+Previous+Release
A standard installation of Identity Server 5.1.0 creates beside the known WSO2CARBON_DB database two other h2 databases: "WSO2METRICS_DB" and "jpadb".
Unfortunately we couldn't find any documentation on this databases. Could someone please provide us with an pointer to the docs or give us a hint how to answer the following questions:
Are these two databases required? For what are they used?
If you configure WSO2 IS against a MySQL database, do I need to create these databases in MySQL as well?
Do I need to backup these databases?
In case of an upgrade of IS 5.0.0 to 5.1.0. How do I handle the two databases?
If you are migrating WSO2 Identity Server 5.0.0 to 5.1.0, you can refer the official documentation [1].
Metrics is a new feature added to Identity Server with 5.1.0 version. It has a separate database and the datasource is defined in repository/conf/datasources/metrics-datasources.xml file. The metrics feature is by default enabled in the config file repository/conf/metrics.xml file. With this feature, you can view JVM metrics by going to Configure -> Metrics -> JVM Metrics feature in the IS management console. All the metrics related data is stored in this new database.
For the metrics database, the database script is located in IS_HOME/dbscripts/metrics directory and there you can find the tables related to this feature which are created in the metrics database.
If you don't wish to use this feature, you may disable it from the metrics.xml file in conf.
The other jpadb is for the workflow feature introduced with IS 5.1.0. You can find documentation in [2]. So in a migration, these should be created separately and you don't need backup as these are new databases.
For your existing database in IS 5.0.0, there are some schema changes for existing tables. You can find DB migration scripts in [1].
[1] https://docs.wso2.com/display/IS510/Upgrading+from+a+Previous+Release#UpgradingfromaPreviousRelease-Upgradingthedatabase
[2] http://wso2.com/library/articles/2015/09/article-wso2-identity-server-5.1.0-workflow-feature-and-use-cases/
This jpabd is used by human task feature to store the task related information.
Identity server ships BPEL and HumanTask features and jpabd is part of that.
WSO2_METRICS_DB is used for WSO2 Carbon Metrics. https://docs.wso2.com/display/ML100/JVM+Metrics
I follow the guide Governance Partition in a Remote Registry found in WSO2 Documentaton. It seems to work fine but I am facing a strange problem. Let me explain my setup first.
Governance registry instalation
Installed GREG 4.5.3
Set the offset to 1 in order to GREG console mgmt runs on port 9444 (carbon.xml)
Create mysql database "wso2greg_reg" (for local/config/governance registry)
Updated datasource WSO2_CARBON_DB to point to wso2greg_reg database (master-datasources.xml)
Enabled clustering (axis2.xml)
Run GREG server with -Dsetup option in order to create all tables
Enterprise Service Bus instalation
Installed ESB 4.6.0
Set the offset to 2 in order to ESB console mgmt runs on port 9445 (carbon.xml)
Create mysql database "wso2esb_reg" (for local/config registry)
Updated datasource WSO2_CARBON_DB to point to wso2esb_reg database (master-datasources.xml)
Added datasource WSO2_GREG_DB to point to wso2greg_reg database (master-datasources.xml)
Enabled clustering (axis2.xml)
Set registry.xml to mount governance registry using wso2greg_reg database
Run ESB server with -Dsetup option in order to create all tables
My problem is happening when I start the two servers, dependening on which was the first server started I have diferent problems on the console managmenet of the secondly started server.
First case:
I start GREG first and ESB in second. When navigating to ESB Console MGMT, I am unable to add a new Pass Through Proxy, the respetive form is not showing and exceptions are logged to the ESB logs (see logs).
Second case:
I start ESB first and GREG in second. When navigating to GREG Console MGMT, the metadata menu is empty and exceptions are loged to the GREG logs (see logs)
Can someone point me to what I am doing wrong?
You need to create only one mysql database. It is this database that is used in the master-datasources.xml config for both G-Reg and ESB instances. What happens is, the mysql database is used as the central database.
Pls try this out and check if you still encounter the issues mentioned.
Cheers,
Gillian
The release 4.5.3 differs from the 4.5.1 in the sense that in the master-datasources.xml appears a new datasource for the WSO2AM_DB
What does this means?
How the two product relate to each other?
If I have a registry host and, API host and a MySQL host how can I have a shared registry?
As for what I configured before API manager was dependent from registry and BAM so I needed to have the DB for the registry and BAM (so install registry than BAM than API).
How do the new datasource change this dependancy path does Registry also be dependant on the API manager, but who creates the DB first?
Thanks
Luca
This does not mean Governance Registry is dependent on Api Manager. This is a datasource defined for API manager to use if available to store it is runtime data. You can use the same WSO2_CARBON_DB if you need but then you need to do some configurations. So this is purely to store API related run-time data additionally to Carbon database. (JNDI lookup for this datasource happens from API manager).
We configured WSO2_CARBON_DB datasource to point to our organization's Oracle database. GReg distribution includes specific scripts required to setup the data model.
In case we need to point WSO2AM_DB datasource to the same Oracle DB, we could not find any scripts or documentation for that.