WSO2 Governance Registry - Solr index problems - solr

We're having some problems about the assets in Publisher/Store in WSO2 using MySQL. We load our database of assets into WSO2 but not all of the assets show up in the store or publisher when queried. This also occuries when we try to get the assets using API.
But 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
Using WSO2 database default (H2), this issue didn't happened.
After some research about this issue, we have found some solutions like "deleting solr and update registry.xml" to reindex all the assets that are missing but without success.
This question represents a lot of our issues with missing assets.
WSO2 Governance Not Finding All Assets in JDBC Database
If someone went through this, any help would be appreciated.

In the link you posted for 'WSO2 Governance Not Finding All Assets in JDBC Database' my answer was this:
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.
Basically what we did was create a script that inserted into the REG_LOG table for each asset so each would havea timestamp of NOW() in the table and would be indexed

Thanks to all replies. We returned the database to H2 and the problem was solved. I don't know what happened to our MySQL Database, maybe was a tuning problem to sync with solr. We're gonna investigate this soon.
Sorry to late answer and thanks to all.

If you are using WSO2 API Manager 2.1.0, you can use skipCache property as mentioned in 1. This will directly fetch data from the database.
1 - https://docs.wso2.com/display/AM210/Distributed+Deployment+of+API+Manager

Related

SOLR CLOUD - Uploading LTR features

We have a SOLR Cloud cluster with 4 nodes. Collections are created with 4 shards and 2 replicas.
I was using REST endpoints (pointing to a single instance for all operations), to create feature(s) and model(s).
http://{{SOLRCLOUD-HOST}}:8983/solr/{{ACTIVE_INDEX_NAME}}/schema/feature-store
http://{{SOLRCLOUD-HOST}}:8983/solr/{{ACTIVE_INDEX_NAME}}/schema/model-store
When I execute REST endpoint to fetch the existing feature(s) and models(s)
http://{{SOLRCLOUD-HOST}}:8983/solr/{{ACTIVE_INDEX_NAME}}/schema/feature-store
http://{{SOLRCLOUD-HOST}}:8983/solr/{{ACTIVE_INDEX_NAME}}/schema/model-store
I see my feature/model created sometimes and the other times it says they don't exist.
At this point, when restart my cluster, thre GET calls always return the created features and models.
Couple of questions -
Like config sets, is there a way to upload features and models without using REST endpoint?
Is restart required after uploading features and models.
Should the feature/mode be executed against all collections in the cluster (assume I have more than one collection with the same data created for different purpose, plz don't ask why, I have them)
Are the features/models created available for collections created in the future with the same config set, I ask this question because the feature/model uploaded is seen inside the config set as - _schema_model-store.json and _schema_feature-store.json
Please advice. Thanks!
Did you find any answers?
I was stuck with feature-store not being available on all shards. Your suggestion of restarting solr helped. Is that the permanent solution?
To answer your Question #3:
You need to upload the features/models for each collection, since collection is part of the upload url, notice the "techproducts" in feature upload example from solr doc:
curl -XPUT 'http://localhost:8983/solr/techproducts/schema/feature-store' --data-binary "#/path/myFeatures.json" -H 'Content-type:application/json'
Just reload the collection to make the feature and model json file to be available on all shards of the collection. The restart of solr is not required.

Liferay document checkin issue

I'm still new to Liferay and using Liferay 6.2
what i'm doing:
I am trying to add a document manually into my database using insert statement.
I inserted into dlfileentry, dlfileversion and AssertEntry.
Also, i created a folder with the valid name and file.
The issue:
upon entering the Documents and Media portlet, i can see the document name there but when i click on checkout, it will prompt a error saying that Documents and Media is temporarily unavailable. however i am still able to download the valid document.
Am i doing something wrong? Personally, i feel that i am missing one more table for the database but i'm not sure .
Thanks!
Yes, you're doing something wrong: You should never write to Liferay's database with SQL, as there might be more data required than what's directly visible to you. Obviously, you're running into exactly such an issue.
Liferay has an API which you can use locally, from within the same application server, or remotely as JSON or SOAP service. You should exclusively use this for write access to the database.
Alternatively, you might consider WebDAV access to your document repository as the way to add more documents to the document library.

Joomla Extension Komento Installation Not Creating Database Tables

I am trying to install a Joomla 3.0 plugin called Komento. When I go to Extensions->Extension Manager->Upload Package File and select the extension from the upload package file tab (for Joomla 2.5-3.0) it gives the error
An error has occurred.
SQL=SHOW FIELDS FROM `komento_activities`
The table komento_activities does not exist in my database. It appears as if it is trying to create it, but cannot. I do not see any errors in my logs. The extension website does not offer any troubleshooting for this problem.
Does anyone have any troubleshooting suggestions?
Have you contacted their customer support and send them a ticket on this? I have experience with them and they were very friendly and helpful.
It looks like Joomla is having permission issues creating the table on your site and you should definitely contact their customer support in their official page.

How to add data to the solr's schema

I try to add new data to the solandra according to the solr's schema but I can't find any example about this. My ultimate goal is to integrate solandra with django-solr.
What I understand about the insert and updating in the solr based on the original solr and django-solr is to send the new data on the http protocol to the decent path, for example:
http://localhost:8983/solandra/wikipedia/update/json
However, when I access the url, the browser keep telling me HTTP ERROR: 404.
Can you help me understand the step to add new data and delete the data in the solandra environment?
I also have a look at the reuters-demo, but the procedure to insert data is process in the file of reutersimporter.jar, but I can't see the source as well. So Please help me to understand how the system work in terms of data inserting and deleting.
Thank you.
Since you are using the JSON update handler, this UpdateJSON page on the Solr Wiki has some good examples of inserting data using the JSON handler via curl. Also, the Indexing Data section of the Solr Tutorial shows how you can insert data using the post.jar file that is included with the Solr source.
Are you creating the solr schema.xml and solrconfig.xml and posting it to solandra? If you add the JSON handler then this should work. The reutersdemo uses solrj. django-solr should work as well.

Transfer dotnetnuke database data to new server

I was given a dotnetnuke v4.9.5.5 database (sql-express about 300MB) and I am trying to get it up and running on a different server. I have tried:
Installing the 4.9 version and
loading the database into the app_data folder
loading the database through the SQL page under the host login (forwards to 404 page...)
installing the 5.x version and
loading the database into the app_data folder
loading the database through the SQL page under the host login (forwards to 404 page... again..)
All of which fail. I cannot find any support on this topic at all. What is the correct way to go about this?
EDIT: wrong info please close..
Here is a good blog on the topic HOW TO: Move a DotNetNuke installation .
The basics are:
Copy all the files and the database, the two are closely tied together.
Update the connection string in the web.config.
Update the portal alias' in the PortalAlias table.
If you don't have the rest of the site files, it may be very difficult. While the database will contain most of the site content, you may be missing some important pieces like skin files, module files, and content files.
So, the first thing you should do is see if you can get the files zipped up and sent to you. If so, it should be fairly easy to get the site up and running. You may have to update the ConnectionStrings in the web.config but otherwise it should run as it.
If you can't get the original files, you could try installing version 4.9.5 of DotNetNuke and replacing the supplied database with the database you were given. You'll need to post the error messages you get if it doesn't work out or consult someone with solid DotNetNuke experience.

Resources