ffischer
(usa Red Hat)
Enviado em 06/02/2012 - 17:14h
Pessoal,
Estou com uma máquina Linux RedHat com uma instância de Jboss+Solr rodando, preciso colocar outra instância em outra porta, um vai servir com oescrita o outro leitura.
Configurei o arquivo /server/default/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml da seguinte forma:
<!-- The actual SBM from which services obtain binding information -->
<bean name="ServiceBindingManager" class="org.jboss.services.binding.ServiceBindingManager">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.system:service=ServiceBindingManager", exposedInterface=org.jboss.services.bindin
g.ServiceBindingManagerMBean.class, registerDirectly=true)</annotation>
<!-- Here we use the ServiceBindingManagementObject as a factory to create the SBM -->
<constructor factoryMethod="getServiceBindingManager">
<factory bean="ServiceBindingManagementObject"/>
</constructor>
</bean>
<!-- Provides management tools with a ProfileService ManagementView
interface to the SBM and its components -->
<bean name="ServiceBindingManagementObject"
class="org.jboss.services.binding.managed.ServiceBindingManagementObject">
<constructor>
<!-- The name of the set of bindings to use for this server -->
<parameter>${jboss.service.binding.set:ports-default}</parameter>
<!-- The binding sets -->
<parameter>
<set>
<inject bean="PortsDefaultBindings"/>
<inject bean="Ports01Bindings"/>
<inject bean="Ports02Bindings"/>
<inject bean="Ports03Bindings"/>
</set>
</parameter>
<!-- Base binding metadata that is used to create bindings for each set -->
<parameter><inject bean="StandardBindings"/></parameter>
</constructor>
<!-- The ports-01 bindings are obtained by taking the base bindings and adding 100 to each port value -->
<bean name="Ports01Bindings" class="org.jboss.services.binding.impl.ServiceBindingSet">
<constructor>
<!-- The name of the set -->
<parameter>ports-01</parameter>
<!-- Default host name -->
<parameter>${jboss.service.binding.set:8080}</parameter>
<!-- The port offset -->
<parameter>100</parameter>
<!-- Set of bindings to which the "offset by X" approach can't be applied -->
<parameter><null/></parameter>
</constructor>
</bean>
<!-- The ports-02 bindings are obtained by taking ports-default and adding 200 to each port value -->
<bean name="Ports02Bindings" class="org.jboss.services.binding.impl.ServiceBindingSet">
<constructor>
<!-- The name of the set -->
<parameter>ports-02</parameter>
<!-- Default host name -->
<parameter>${jboss.service.binding.set:9080}</parameter>
<!-- The port offset -->
<parameter>200</parameter>
Startei a primeira instancia sem problemas, quando starto a segunda da o seguinte erro:
16:54:14,155 ERROR [AbstractKernelController] Error installing to Start: name=jboss.messaging:service=Connector,transport=bisocket state=Create mode=Manual requiredState=Installed
java.io.IOException: SocketServerInvoker[192.168.0.78:4457] error creating ServerSocket[192.168.0.78:4457]: Address already in use
Fiz o start da primeira instancia da seguinte forma:
nohup ./run.sh -b "IP" -Dsolr.solr.home=/opt/solr -Dsolr.data.dir=/opt/solr/data -Djboss.server.log.threshold=INFO &
E da segunda assim:
nohup ./run.sh -b "IP" -Dsolr.solr.home=/opt/solr -Djboss.service.binding.set=9080 -Dsolr.data.dir=/opt/solr/data -Djboss.server.log.threshold=INFO &
Alguem com alguma experiencia, alguem que ja tenha passado por isso ae pra me dar uma luz???
Agradecido
Fábio Fischer