Opened 7 years ago
Closed 7 years ago
#914 closed defect (fixed)
solr port issues
Reported by: | kjdon | Owned by: | ak19 |
---|---|---|---|
Priority: | moderate | Milestone: | 3.09 Release |
Component: | Greenstone3 Ant Code | Severity: | minor |
Keywords: | Cc: |
Description (last modified by )
Solr runs off the tomcat port. ext/solr/gs3-setup.sh is run when we source gs3-setup.sh in top level. This reads build.properties and sets SOLR_PORT and SOLR_HOST env vars based on values of tomcat.port and tomcat.host.
This is all fine until you want to change your tomcat port. gs3-setup.sh can never get re-run in the same terminal, so you can never reset SOLR_PORT variable.
- when port is changed in gs3 server settings, it needs to do something about SOLR_PORT.
- maybe we can make an ant target 'configure' which is called when the top level configure is called? (this is called whenever we start the server). Then SOLR_PORT wil get checked everytime we start the server.
- however, this won't set it in the terminal? cos its not doing a 'source'.
Can we find the solr url a different way, not using environmnet vars??
Change History (3)
comment:1 by , 7 years ago
Description: | modified (diff) |
---|
comment:2 by , 7 years ago
Owner: | changed from | to
---|
comment:3 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Tested on Windows and Linux after reproducing the bugs on both, and after discovering the deactivation/activation bug and fixing it.
The problem appears when the tomcat port (which is the solr port when not using jetty) is changed in build.properties and we rebuild the solr-jdbm-demo collection: the building scripts are still using the old tomcat/solr port, so they can't communicate with the running solr servlet at the solr context localhost:8383/solr.
Dr Bainbridge came up with the following solution: the perl build code should communicate with a new ant target that returns the solr context URL, instead of getting solr host and solr port from the Env Vars. This will then mimic the building code getting the GS3 library URL from a dedicated ant target too.
The solution, along with bugfixes to SOLR building, activating and deactivating, as well as some tidying up of existing code, were implemented in the following changesets
http://trac.greenstone.org/changeset/31488 to http://trac.greenstone.org/changeset/31490, and
http://trac.greenstone.org/changeset/31508
http://trac.greenstone.org/changeset/31507, http://trac.greenstone.org/changeset/31513, http://trac.greenstone.org/changeset/31514
http://trac.greenstone.org/changeset/31515 to http://trac.greenstone.org/changeset/31519