Problem in stopping Karaf sever on Unix machine

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem in stopping Karaf sever on Unix machine

Prithviraj
Hi ,

We have using Apache Karaf on unix  machine.
We have deployed our application on different 2 instaces(unix machines)
Each instance is having its own broker url configured .
the borker.xml  file  on each instance looks like as below
on 10.50.51.92 machine
        <broker:broker useJmx="true" persistent="true" brokerName="localbroker" schedulerSupport="false">
                <broker:transportConnectors>
                    <broker:transportConnector uri="activeMQ.url=tcp://10.50.51.92:61616" />
                </broker:transportConnectors> 
                        ......

on 10.50.51.93 machine
        <broker:broker useJmx="true" persistent="true" brokerName="localbroker" schedulerSupport="false">
                <broker:transportConnectors>
                    <broker:transportConnector uri="activeMQ.url=tcp://10.50.51.93:61616" />
                </broker:transportConnectors> 
                        ......

                       
Both instances are pointing sharing  same Database credentials.
In bean.xml file we have configued org.apache.activemq.ActiveMQConnectionFactory as below

<bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
                <property name="brokerURL" value="failover://(tcp://10.50.51.93:61616,tcp://10.50.51.92:61616)" />               
                <property name="useAsyncSend" value="true" />
        </bean>
       
Due to this 10.50.51.93 became primary and 10.50.51.92 became  secondary .
So when we started 10.50.51.93 first in sequence all bundle get started properly  and when we  start 10.50.51.92 afterword, broker bundle goes to starting mode  since *.93 is running state.
When we  stop 10.50.51.93 , broker bundle from 10.50.51.92  goes to running state  and everything is working as expected.
Now  when we trying to stop 10.50.51.92 by  ./stop  script , karaf server not getting stop  properly and  it  get  running in the back ground .
we need to kill karaf process  manully by kill commannd .

what could be reason for this ?
Are we missed anything in configuration  ?
Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Problem in stopping Karaf sever on Unix machine

jbonofre
Hi,

you use a master/slave config of ActiveMQ.

The broker.xml files use Spring or Blueprint ?

Is the behavior the same if you use activemq-blueprint (instead of spring) ?

Regards
JB

On 02/03/2015 11:33 AM, Prithviraj wrote:

> Hi ,
>
> We have using Apache Karaf on unix  machine.
> We have deployed our application on different 2 instaces(unix machines)
> Each instance is having its own broker url configured .
> the borker.xml  file  on each instance looks like as below
> on 10.50.51.92 machine
> <broker:broker useJmx="true" persistent="true" brokerName="localbroker"
> schedulerSupport="false">
>        <broker:transportConnectors>
>            <broker:transportConnector
> uri="activeMQ.url=tcp://10.50.51.92:61616" />
>        </broker:transportConnectors>
> ......
>
> on 10.50.51.93 machine
> <broker:broker useJmx="true" persistent="true" brokerName="localbroker"
> schedulerSupport="false">
>        <broker:transportConnectors>
>            <broker:transportConnector
> uri="activeMQ.url=tcp://10.50.51.93:61616" />
>        </broker:transportConnectors>
> ......
>
>
> Both instances are pointing sharing  same Database credentials.
> In bean.xml file we have configued
> org.apache.activemq.ActiveMQConnectionFactory as below
>
> <bean id="jmsConnectionFactory"
> class="org.apache.activemq.ActiveMQConnectionFactory">
> <property name="brokerURL"
> value="failover://(tcp://10.50.51.93:61616,tcp://10.50.51.92:61616)" />
> <property name="useAsyncSend" value="true" />
> </bean>
>
> Due to this 10.50.51.93 became primary and 10.50.51.92 became  secondary .
> So when we started 10.50.51.93 first in sequence all bundle get started
> properly  and when we  start 10.50.51.92 afterword, broker bundle goes to
> starting mode  since *.93 is running state.
> When we  stop 10.50.51.93 , broker bundle from 10.50.51.92  goes to running
> state  and everything is working as expected.
> Now  when we trying to stop 10.50.51.92 by  ./stop  script , karaf server
> not getting stop  properly and  it  get  running in the back ground .
> we need to kill karaf process  manully by kill commannd .
>
> what could be reason for this ?
> Are we missed anything in configuration  ?
> Thanks in advance.
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Problem-in-stopping-Karaf-sever-on-Unix-machine-tp4038249.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Problem in stopping Karaf sever on Unix machine

Prithviraj
Hi JB,

Actually we are using blue print configuration for broker .
Please  find below file


<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:broker="http://activemq.apache.org/schema/core"
        xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
  xmlns:enc="http://karaf.apache.org/xmlns/jasypt/v1.0.0"
        xsi:schemaLocation="http://activemq.apache.org/schema/core
             http://activemq.apache.org/schema/core/activemq-core.xsd
             ">
       
   <ext:property-placeholder>
    <ext:location>file:etc/db.cfg</ext:location>
  </ext:property-placeholder>
  <ext:property-placeholder  placeholder-prefix="${[[" placeholder-suffix="]]}">
        <ext:location>file:etc/jasypt_enc_passwords.cfg</ext:location>
 </ext:property-placeholder>
 
  <enc:property-placeholder>
    <enc:encryptor class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
      <property name="config">
        <bean class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
          <property name="algorithm" value="PBEWithMD5AndDES" />
          <property name="password" value="${[[REN_JASYPT_ENCRYPTION_PASSWORD_DB]]}" />
        </bean>
      </property>
    </enc:encryptor>
  </enc:property-placeholder>
 
        <bean id="oracle-ds2" class="oracle.jdbc.pool.OracleDataSource">
                <property name="URL" value="${db.url.app}" />
                <property name="user" value="${db.user.app}" />
                <property name="password" value="${db.password.app}" />
        </bean>
        <service interface="javax.sql.DataSource" ref="oracle-ds2">
                <service-properties>
                        <entry key="osgi.jndi.service.name" value="jdbc/oracleds2" />
                </service-properties>
        </service>
       
        <broker:broker useJmx="true" persistent="true" brokerName="localbroker" schedulerSupport="false">

               
                <broker:persistenceAdapter>
                        <broker:jdbcPersistenceAdapter
                                dataSource="#oracle-ds2" />
                </broker:persistenceAdapter>
               
                <broker:transportConnectors>
                    <broker:transportConnector uri="${activeMQ.url}" />
                </broker:transportConnectors>

        <broker:systemUsage>
            <broker:systemUsage>
                <broker:memoryUsage>
      <broker:memoryUsage limit="256 mb" />
    </broker:memoryUsage>
    <broker:storeUsage>
      <broker:storeUsage limit="20 gb" />
    </broker:storeUsage>
    <broker:tempUsage>
      <broker:tempUsage limit="10 gb" />
    </broker:tempUsage>
            </broker:systemUsage>
        </broker:systemUsage>
               
                 
    <broker:destinationPolicy>
      <broker:policyMap>
        <broker:policyEntries>
          <broker:policyEntry queue=">" memoryLimit="5mb" />
          <broker:policyEntry topic=">" memoryLimit="5mb">
           
          </broker:policyEntry>
        </broker:policyEntries>
      </broker:policyMap>
    </broker:destinationPolicy>
       
         
         
         
               
        </broker:broker>
</blueprint> 


Reply | Threaded
Open this post in threaded view
|

Re: Problem in stopping Karaf sever on Unix machine

Prithviraj
Hi JB,

Do you get chance to look at file ?