Ticket #649 (closed defect: fixed)

Opened 6 years ago

Last modified 5 years ago

network.ports.plosone variable not resolving in plosone.xml for fedoragsearch urls

Reported by: russ Assigned to: pradeep
Priority: critical Milestone:
Component: ambra Version: 0.8
Keywords: search configuration Cc:
Blocking: Blocked By:

Description

it looks like this has changed in 0.8, and there's no example config in defaults.xml that i can see...

Dependency Graph

Change History

09/20/07 10:06:31 changed by amit

  • owner changed from jsuttor to russ.

Russ, nothing has changed in this regard that I am aware of. What is missing?

09/20/07 10:14:23 changed by russ

  • owner changed from russ to amit.

there used to be a fedoragsearch section in the topaz block, but i don't see this section in defaults.xml, so i'm not sure if i can/should do the same thing?

    <fedoragsearch>
      <urls>
        <url>http://${hosts.plosone}:${ports.plosone}/ws-search-webapp/services/FedoraGenericSearchServicePort</url>
        <url>http://plostopaz01.localdomain:${ports.plosone}/ws-search-webapp/services/FedoraGenericSearchServicePort</url>
      </urls>
      <repository>Topaz</repository>
      <index>TopazIndex</index>
      <indexDocXslt>topazFoxmlToLucene</indexDocXslt>
      <resultPageXslt>copyXml</resultPageXslt>
      <fgsrepository>
        <fedoraSoap>${topaz.services.fedora.base-url}services</fedoraSoap>
        <fedoraUser>fedoraAdmin</fedoraUser>
        <fedoraPass>QjufL2Ky</fedoraPass>
      </fgsrepository>
    </fedoragsearch>

09/20/07 10:22:06 changed by amit

  • owner changed from amit to russ.

Russ, looks like Eric moved this from defaults.xml to global-defaults.xml in r3060, so yes, that means you can override it.

09/20/07 10:24:24 changed by amit

I believe you can override this in /etc/plosone.xml. Please see wiki:ConfigImplementation.

09/20/07 10:42:24 changed by amit

It was added in global-defaults.xml in r2830, but looks like an override still existing in defaults.xml. This was cleaned up in r3060. Looks like the configuration structure is still not easy to understand and maintain. We still have cleanup in the area.

09/20/07 10:56:58 changed by amit

  • keywords set to search configuration.
  • milestone set to 0.8.

09/20/07 11:09:23 changed by russ

  • owner changed from russ to amit.

hmm. okay, i'll try it.

do i need to define the whole section or can i just do the <urls> subsection and let the rest come from global-defaults?

    <fedoragsearch>
      <urls>
        <url>http://${hosts.plosone}:${ports.plosone}/ws-search-webapp/services/FedoraGenericSearchServicePort</url>
        <url>http://plostopaz01.localdomain:${ports.plosone}/ws-search-webapp/services/FedoraGenericSearchServicePort</url>
      </urls>
    </fedoragsearch>

i can't find a global-defaults.xml in /usr/local/topaz/plosone - is that normal?

[root@plostopaz01 plosone]# find . -name defaults.xml
./webapps/plosone-doi-resolver/WEB-INF/classes/org/plos/configuration/defaults.xml
./webapps/ROOT/WEB-INF/classes/org/plos/configuration/defaults.xml
[root@plostopaz01 plosone]# find . -name global-defaults.xml
[root@plostopaz01 plosone]#

sorry, i know i'm changing the subject, just curious...a

09/20/07 11:17:49 changed by amit

  • owner changed from amit to russ.

Russ, I believe you can override only the needed portion. So

    <fedoragsearch>
      <urls>
        <url>http://${hosts.plosone}:${ports.plosone}/ws-search-webapp/services/FedoraGenericSearchServicePort</url>
        <url>http://plostopaz01.localdomain:${ports.plosone}/ws-search-webapp/services/FedoraGenericSearchServicePort</url>
      </urls>
    </fedoragsearch>

should be fine.

global-defaults.xml is probably sitting within a jar file. I suspect conf-helper-0.8.xxx.jar. Yes, that is normal. Reason is that we don't expect users to edit that file, since all the information can be controlled via the top level plosone.xml file.

09/20/07 11:34:23 changed by russ

  • status changed from new to closed.
  • resolution set to fixed.

thanks! i'll pay close attention to lucene on our first live ingest with 0.8

09/24/07 14:36:01 changed by russ

  • status changed from closed to reopened.
  • resolution deleted.

nope, that didn't work.

here's what's in global-config.xml:

<fedoragsearch>
<urls>
<url>http://${network.hosts.plosone}:${network.ports.plosone}/ws-search-webapp/services/FedoraGenericSearchServicePort</url>
</urls>

i copied that into plosone.xml and added a second server:

<fedoragsearch>
<urls>
<url>http://${network.hosts.plosone}:${network.ports.plosone}/ws-search-webapp/services/FedoraGenericSearchServicePort</u\
rl>
<url>http://plostopaz02.localdomain:${network.ports.plosone}/ws-search-webapp/services/FedoraGenericSearchServicePort</ur\
l>
</urls>

here's what i get when we try to ingest:

Error ingesting: pone.0000922.zip - javax.xml.rpc.ServiceException: Invalid fedoragsearch URL 'http://plostopaz01.localdomain:${network.ports.plosone}/ws-search-webapp/services/FedoraGenericSearchServicePort' 
Error ingesting: pone.0000923.zip - javax.xml.rpc.ServiceException: Invalid fedoragsearch URL 'http://plostopaz01.localdomain:${network.ports.plosone}/ws-search-webapp/services/FedoraGenericSearchServicePort' 
Error ingesting: pone.0000924.zip - javax.xml.rpc.ServiceException: Invalid fedoragsearch URL 'http://plostopaz01.localdomain:${network.ports.plosone}/ws-search-webapp/services/FedoraGenericSearchServicePort' 
Error ingesting: pone.0000925.zip - javax.xml.rpc.ServiceException: Invalid fedoragsearch URL 'http://plostopaz01.localdomain:${network.ports.plosone}/ws-search-webapp/services/FedoraGenericSearchServicePort' 

09/24/07 14:36:32 changed by russ

  • owner changed from russ to amit.
  • status changed from reopened to new.

09/24/07 14:37:05 changed by russ

sorry, i meant to say global-defaults.xml

09/24/07 15:10:29 changed by russ

  • priority changed from critical to medium.

we're happy after hard-coding the port numbers.

09/24/07 15:46:13 changed by amit

  • owner changed from amit to pradeep.
  • milestone changed from 0.8 to 0.81.

09/26/07 14:01:14 changed by russ

  • type changed from clarification to defect.
  • summary changed from how do i set up multiple lucene servers in plosone.xml so both are updated on ingest? to network.ports.plosone variable not resolving in plosone.xml for fedoragsearch urls.

09/26/07 22:54:01 changed by amit

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in r3798.

09/26/07 23:00:08 changed by pradeep

(In [3798]) Fix #649. Using CompositeConfiguration? for overrides is incorrect. CombinedConfiguration? with an OverrideCombiner? is what we need.

It used to work fine in 0.7 because we were using ConfigurationFactory? and that built the CompositeConfiguration? correctly (by doing the combining on its own instead of using the new NodeCombiner? concept).

09/27/07 02:13:13 changed by amit

  • status changed from closed to reopened.
  • resolution deleted.

Afraid this fix broke something else. I cannot bring up the publishing application anymore from head. Here is what the logs say:

2007-09-27 01:54:29,417 INFO  WebAppListener()> Loading 'file:/etc/topaz/plosone.xml' (file:///etc/topaz/plosone.xml) configured via default [main org.plos.configuration.WebAppListener]
2007-09-27 01:54:29,512 INFO  ConfigurationStore()> Added URL 'file:/etc/topaz/plosone.xml' [main org.plos.configuration.ConfigurationStore]
2007-09-27 01:54:29,513 INFO  ConfigurationStore()> Added 0 instances of resource 'org/plos/configuration/defaults.xml' to configuration [main org.plos.configuration.ConfigurationStore]
2007-09-27 01:54:29,527 INFO  ConfigurationStore()> Added resource '/org/plos/configuration/global-defaults.xml' [main org.plos.configuration.ConfigurationStore]
2007-09-27 01:54:30,803 INFO  WebAppListener()> Loading 'file:/etc/topaz/plosone.xml' (file:///etc/topaz/plosone.xml) configured via default [main org.plos.configuration.WebAppListener]
2007-09-27 01:54:30,936 INFO  ConfigurationStore()> Added URL 'file:/etc/topaz/plosone.xml' [main org.plos.configuration.ConfigurationStore]
2007-09-27 01:54:30,977 INFO  ConfigurationStore()> Added 1 instances of resource 'org/plos/configuration/defaults.xml' to configuration [main org.plos.configuration.ConfigurationStore]
2007-09-27 01:54:30,991 INFO  ConfigurationStore()> Added resource '/org/plos/configuration/global-defaults.xml' [main org.plos.configuration.ConfigurationStore]
2007-09-27 01:54:31,906 WARN  WebAppListenerInitModels()> bootstrap of models failed [main org.plos.bootstrap.WebAppListenerInitModels]
java.net.MalformedURLException: no protocol: ${topaz.services.itql.uri}
        at java.net.URL.<init>(URL.java:567)
        at java.net.URL.<init>(URL.java:464)
        at java.net.URL.<init>(URL.java:413)
        at org.topazproject.mulgara.itql.ItqlHelper.createStub(ItqlHelper.java:224)
        at org.topazproject.mulgara.itql.ItqlHelper.<init>(ItqlHelper.java:190)
        at org.plos.bootstrap.WebAppListenerInitModels.initModels(WebAppListenerInitModels.java:63)
        at org.plos.bootstrap.WebAppListenerInitModels.contextInitialized(WebAppListenerInitModels.java:51)

09/27/07 02:13:46 changed by amit

  • status changed from reopened to new.

09/27/07 02:15:26 changed by amit

  • priority changed from medium to critical.

09/27/07 05:35:46 changed by pradeep

commons-config 1.3 has a bug related to subset(). Fixed in 1.4.

09/27/07 07:06:12 changed by pradeep

  • status changed from new to closed.
  • resolution set to fixed.

(In [3804]) Upgrade to commons-configuration 1.4. 1.4 fixes numerous bugs related to interpolation (variable substitution in configs) and also related to subset(). The full list of fixes are available at:

http://commons.apache.org/configuration/changes-report.html#Release1_4

This update brought the following changes in the war file composition for plosone:

commons-beanutils : changed from 1.4 to 1.7.0 commons-digestor : changed from 1.6 to 1.8

Also added tests to check subset() operations.

Closes #649

07/16/08 11:00:24 changed by

  • milestone deleted.

Milestone 0.8.1 deleted