eclipse-sw360 / sw360

SW360 project
https://www.eclipse.org/sw360/
Other
121 stars 98 forks source link

steps to mitigate lucene search issue in sw360 18.1.0 (bare metal) #2541

Open dineshr93 opened 2 months ago

dineshr93 commented 2 months ago

Description

Hi @ag4ums @KoukiHama in the last sw360 meeting I raised an issue regarding lucene search being not working after upgrading to 18.1.0. You have mentioned some steps to resolve it. Please can you mentioned what I need to do?. We deploy bare metal without using docker.

shi9qiu commented 2 months ago

Here is the manual for installing version 18.1.0. It seems that we missed how to install couchdb-lucene there:

https://eclipse.dev/sw360/docs/deployment/legacy/nativeinstall/native-install-sw360-version-18.1.0/

dineshr93 commented 2 months ago

https://eclipse.dev/sw360/docs/deployment/legacy/nativeinstall/native-install-sw360-version-18.1.0/

Hi @shi9qiu Thanks for your reply. I compared my existing installation with the one in above link

my /etc/sw360/sw360.properties is just

backend.url= http://localhost:8080

## API Token generation sw360.properties
#rest.api.write.access.token.in.preferences.enabled=true
rest.apitoken.generator.enable=true
rest.apitoken.read.validity.days=360
rest.apitoken.write.validity.days=360
rest.apitoken.hash.salt=$2a$04$Software360RestApiSalt
sw360.liferay.company.id=20098

And I see the above API token generation is missing in sw360.properties in https://eclipse.dev/sw360/docs/deployment/legacy/nativeinstall/native-install-sw360-version-18.1.0/#ref6

and contains lot more texts than my sw360.properties

my question is is API token feature removed in 18.1.0 ?

And for couchdb-lucene

It seems that we missed how to install couchdb-lucene there:

do you mean below steps?

mvn -s /appsrc/sw360/scripts/docker-config/mvn-proxy-settings.xml clean install war:war
cp ./target/*.war /opt/liferay-ce-portal-7.4.3.18-ga18/tomcat-9.0.56/webapps/couchdb-lucene.war
shi9qiu commented 2 months ago

my question is is API token feature removed in 18.1.0 ?

I think it's not removed. However, many features are not listed there. You can simply add the feature you want to use in /etc/sw360/sw360.properties.

do you mean below steps?

Yes. And don't forget these steps:

cd third-party/couchdb-lucene/`
sed -i "s/allowLeadingWildcard=false/allowLeadingWildcard=true/" ./src/main/resources/couchdb-lucene.ini 
sed -i "s/localhost:5984/COUCHDB_USER:COUCHDB_USER@localhost:5984/" ./src/main/resources/couchdb-lucene.ini