问题
I'm new to WSO2 and working on an existing application that uses WSO2. We load our database of assets into wso2 but not all of the assets show up in the store or publisher when queried. It seems there is some disconnect between what is in the database/carbon and what can be seen in store/publisher.
the missing assets can be found by:
- Calling the database directly
- looking them up in carbon
- using the store or publisher url with the asset id
- the governance rest api through id only
the assets are missing in:
doing searches in the store/publisher gui
doing searches with the governance api
All the ones missing have invalid asset names according to our rxt definitions. I removed these validations in carbon but still was not able to find them.
We have validations in the rxt files for asset names, would this affect what is seen in store/publisher?
Is there a way to sync up the governance registry with the database so that it would show all the assets in the store and publisher?
Any help is much appreciated!!
回答1:
I'm facing the same problem with store/publisher. After searching for a solution, we found some info about this issue. WSO2 is not indexing some assets in Solr.
You could try to reindex the assets with this steps:
1 - Backup the solr folder which resides in /solr and remove from API Manager home location.
2 - Open /repository/conf/registry.xml
3 - Under indexingConfiguration tag there is a value called lastAccessTimeLocation.
Default value is
/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime
Change that value to
/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime1
4 - Restart the server
For me this didn't work, but in some questions here many people said that could be the best solution for this issue.
WSO2 loss APIs after changes in docker container
WSO2 API Manager issues with solr
回答2:
After some long investigating, I found that some entries weren't in the REG_LOG table and some dates in the REG_LOG table made entries not be indexed. The solution for this was adding to the REG_LOG table with current timestamps which forced a reindex and then the missing assets were able to be searched for in the web ui.
来源:https://stackoverflow.com/questions/47188295/wso2-governance-not-finding-all-assets-in-jdbc-database