uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hansen Candrawinata <hansen.candrawin...@gmail.com>
Subject Re: Exception thrown when deploying CAS Processors in managed mode
Date Fri, 04 Dec 2009 00:52:33 GMT
Hi Marshall,

Marshall Schor <msa@...> writes:
> In reading the documentation
>
(http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/references/references.html#ugr.ref.xml.cpe_descriptor.descriptor.cas_processors.individual
> ) it indicates that the "managed" mode (indicated by specifying "local"
> as the deployment option) requires that the "CAS Processor descriptor
> referenced in the |<descriptor>| element must be a Vinci /Service
> Deployment Descriptor/, which configures a CAS Processor for deployment
> as a Vinci service (see Section 3.6, "Working with Remote Services"
>
<http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/tutorials_and_users_guides/tutorials_and_users_guides.html#ugr.tug.application.remote_services>
> in UIMA Tutorial and Developers' Guides)."
> 
> So, that I think is the source of the problem.

Thanks for replying.  Sorry, I missed that part of the documentation.  (I was
too eager to learn fast!)

However, I am still not able to deploy my CAS Processor in managed mode.  I
followed the instructions and changed the CAS Processor descriptor in my CPE
descriptor to be a Vinci service deployment descriptor and then run the CPE code
(cpe.process()), but my CAS Processor wasn't not called at all.  Instead, the
CPM seemed to be stuck for not being able to find the service port.  Here is the
snippet of the log messages:

04/12/2009 10:45:30 AM
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS initialize
INFO: The CPM is about to test its VNS port 9005 for availability. (Thread Name:
BaseCPMImpl-Thread) 
04/12/2009 10:45:30 AM
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS initialize
INFO: The service port 9005 is available on localhost. (Thread Name:
BaseCPMImpl-Thread) 
04/12/2009 10:45:30 AM
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS initialize
INFO: The CPM VNS activity started on port 9005. (Thread Name: BaseCPMImpl-
Thread)
04/12/2009 10:45:30 AM
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS process
INFO: The CPM VNS thread started. (Thread Name: VNS-Thread) VNS Port: 9005 
04/12/2009 10:45:30 AM
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDe
ployer
initialize
INFO: The next port  was retrieved from the service port queue. (Thread Name:
BaseCPMImpl-Thread)
04/12/2009 10:45:30 AM
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDe
ployer
initialize
INFO: The service port is not available yet. There are 5000 retries left to
acquire the port. (Thread Name: BaseCPMImpl-Thread) 
04/12/2009 10:45:31 AM
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDe
ployer
initialize
INFO: The service port is not available yet. There are 4999 retries left to
acquire the port. (Thread Name: BaseCPMImpl-Thread) 
04/12/2009 10:45:31 AM
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDe
ployer
initialize
INFO: The service port is not available yet. There are 4998 retries left to
acquire the port. (Thread Name: BaseCPMImpl-Thread) 
04/12/2009 10:45:31 AM
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDe
ployer
initialize
...

Perhaps I haven't really understood how Vinci works and how it should be used to
deploy a CAS processor in managed mode, so I would like to clarify a few things:
When deploying a CAS processor in managed mode, the corresponding CAS processor
descriptor in a CPE descriptor has to reference a Vinci Service Deployment
Descriptor.  Then, what is the next step?
a. Can I now run "cpe.process()"?  Or
b. I need to manually start the VNS with "startVNS.bat", deploy my CAS processor
as a Vinci service with "startVinciService.bat", and then run "cpe.process()"?

My understanding is it is (a) because a managed deployment mode means that the
CPE will use its internal VNS to start the CAS processor.  Is this correct?  But
as I said, when I tried (a) the CPE was stuck in a retry loop because of not
being able to find the service port (as shown by the log messages above).

In case it's relevant, here is my Vinci service descriptor referenced in the CPE
descriptor:

<deployment name="JOD and TIKA Annotator Service">
  <service name="JodAndTika" provider="vinci">
    <parameter name="resourceSpecifierPath"
value="H:\ttsrc\javasoe\documentconversion\desc\JodAndTika.xml"/>
    <parameter name="numInstances" value="1"/>
  </service>
</deployment>

Thanks,
Hansen


Mime
View raw message