You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by khandelwalanuj <kh...@gmail.com> on 2014/07/04 16:41:13 UTC

ActiveMQ 5.10 compatibility with KahaDB

Hi,

I am using ActiveMQ 5.8 and trying to switch to ActiveMQ 5.10. The problem
here is that I have to clear the kahaDB before switch otherwise I get error.
This also happens if I want to switch back from 5.10 to 5.8. 

Everytime we need to clear the kahaDB 

Error: 

"java.io.IOException: Could not load journal record. Invalid location:
1:978"



Thanks,
Anuj






--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-10-compatibility-with-KahaDB-tp4682812.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.10 compatibility with KahaDB

Posted by Johan Edstrom <se...@gmail.com>.
Patches happily accepted.

Sent from my pressure cooker.

> On Jul 6, 2014, at 5:18, khandelwalanuj <kh...@gmail.com> wrote:
> 
> But ideally it should be supported.
> 
> It may be possible that after switching broker to 5.10, broker or clients
> can face some issues. In such scenerios, we revert broker back to 5.8. It
> should be backward compatible. 
> 
> Thanks,
> Anuj 
> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-10-compatibility-with-KahaDB-tp4682812p4682845.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.10 compatibility with KahaDB

Posted by Gary Tully <ga...@gmail.com>.
before an upgrade, take a copy/backup of the data directory that can
be used as a fallback.

On 6 July 2014 12:18, khandelwalanuj <kh...@gmail.com> wrote:
> But ideally it should be supported.
>
> It may be possible that after switching broker to 5.10, broker or clients
> can face some issues. In such scenerios, we revert broker back to 5.8. It
> should be backward compatible.
>
> Thanks,
> Anuj
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-10-compatibility-with-KahaDB-tp4682812p4682845.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
http://redhat.com
http://blog.garytully.com

Re: ActiveMQ 5.10 compatibility with KahaDB

Posted by Timothy Bish <ta...@gmail.com>.
On 07/06/2014 07:18 AM, khandelwalanuj wrote:
> But ideally it should be supported.
>
> It may be possible that after switching broker to 5.10, broker or clients
> can face some issues. In such scenerios, we revert broker back to 5.8. It
> should be backward compatible.
>
> Thanks,
> Anuj
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-10-compatibility-with-KahaDB-tp4682812p4682845.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
The source is there, if you'd like to start working on adding in that 
sort of support we accept contributions.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: ActiveMQ 5.10 compatibility with KahaDB

Posted by khandelwalanuj <kh...@gmail.com>.
But ideally it should be supported.

It may be possible that after switching broker to 5.10, broker or clients
can face some issues. In such scenerios, we revert broker back to 5.8. It
should be backward compatible. 

Thanks,
Anuj 



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-10-compatibility-with-KahaDB-tp4682812p4682845.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.10 compatibility with KahaDB

Posted by Timothy Bish <ta...@gmail.com>.
On 07/05/2014 07:54 AM, khandelwalanuj wrote:
> Hi Gary,
>
> When i switch my broker from 5.8 to 5.10, everything seems to be normal and
> works fine. But when I switch back from 5.10 to 5.8, I am seeing issues.
>
>
> Below are the details of my configuration:
> 1. Using MultikahaDB.
>
> Configuration:
>
> *       <amq:persistenceAdapter>
>              <amq:mKahaDB directory="/u/khandela/activemq/kahadb"
> journalMaxFileLength="64mb">
>                  <amq:filteredPersistenceAdapters>
>                      <amq:filteredKahaDB queue="flow.>">
>                          <amq:persistenceAdapter>
>                              <amq:kahaDB/>
>                          </amq:persistenceAdapter>
>                      </amq:filteredKahaDB>
>
>                      <amq:filteredKahaDB queue="gear.>">
>                          <amq:persistenceAdapter>
>                              <amq:kahaDB/>
>                          </amq:persistenceAdapter>
>                      </amq:filteredKahaDB>
>
>                     
>                      <amq:filteredKahaDB>
>                          <amq:persistenceAdapter>
>                              <amq:kahaDB/>
>                          </amq:persistenceAdapter>
>                      </amq:filteredKahaDB>
>
>                 </amq:filteredPersistenceAdapters>
>              </amq:mKahaDB>
>          </amq:persistenceAdapter>
>
> *
>
>
>
>
> Details of my test case:
>
> Started broker with 5.8, stopped and started with 5.10 (works fine) but
> again stopped and started broker with 5.8 (Not working). Please note that I
> have tested this with two case: (i) clients are conencted (ii) clients are
> not connected, and in both the cases the same issue observed.
>
> Error is provided below:
> --------------------
> [20140705 16:47:14.724 IST (main)
> org.apache.activemq.store.kahadb.MessageDatabase#recover 562 INFO] -
> Recovering from the journal ...
> [20140705 16:47:14.725 IST (main)
> org.apache.activemq.broker.BrokerService#start 556 ERROR] - Failed to start
> Apache ActiveMQ (anujmqbrokerdev, null). Reason: java.io.IOException: Could
> not load journal record. Invalid location: 1:978
>         at
> org.apache.activemq.store.kahadb.MessageDatabase.load(MessageDatabase.java:972)
>          at
> org.apache.activemq.store.kahadb.MessageDatabase.recover(MessageDatabase.java:564)
>          at
> org.apache.activemq.store.kahadb.MessageDatabase.open(MessageDatabase.java:369)
>          at
> org.apache.activemq.store.kahadb.MessageDatabase.load(MessageDatabase.java:387)
>          at
> org.apache.activemq.store.kahadb.MessageDatabase.doStart(MessageDatabase.java:240)
>          at
> org.apache.activemq.store.kahadb.KahaDBStore.doStart(KahaDBStore.java:180)
>          at
> org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)
>          at
> org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.doStart(KahaDBPersistenceAdapter.java:220)
>          at
> org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)
>          at
> org.apache.activemq.store.kahadb.MultiKahaDBPersistenceAdapter.start(MultiKahaDBPersistenceAdapter.java:322)
>          at
> org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter(BrokerService.java:598)
>          at
> org.apache.activemq.broker.BrokerService.startPersistenceAdapter(BrokerService.java:587)
>          at
> org.apache.activemq.broker.BrokerService.start(BrokerService.java:552)
>          at
> org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> --------------------
>
>
> Thanks,
> Anuj
>
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-10-compatibility-with-KahaDB-tp4682812p4682831.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
We don't really do version downgrades on the store, going forward should 
work fine, going backwards doesn't really make much sense and is not 
supported.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: ActiveMQ 5.10 compatibility with KahaDB

Posted by khandelwalanuj <kh...@gmail.com>.
Hi Gary,

When i switch my broker from 5.8 to 5.10, everything seems to be normal and
works fine. But when I switch back from 5.10 to 5.8, I am seeing issues. 


Below are the details of my configuration: 
1. Using MultikahaDB. 

Configuration: 

*       <amq:persistenceAdapter>
            <amq:mKahaDB directory="/u/khandela/activemq/kahadb"
journalMaxFileLength="64mb">
                <amq:filteredPersistenceAdapters>
                    <amq:filteredKahaDB queue="flow.>">
                        <amq:persistenceAdapter>
                            <amq:kahaDB/>
                        </amq:persistenceAdapter>
                    </amq:filteredKahaDB>

                    <amq:filteredKahaDB queue="gear.>">
                        <amq:persistenceAdapter>
                            <amq:kahaDB/>
                        </amq:persistenceAdapter>
                    </amq:filteredKahaDB>

                   
                    <amq:filteredKahaDB>
                        <amq:persistenceAdapter>
                            <amq:kahaDB/>
                        </amq:persistenceAdapter>
                    </amq:filteredKahaDB>

               </amq:filteredPersistenceAdapters>
            </amq:mKahaDB>
        </amq:persistenceAdapter>

*




Details of my test case: 

Started broker with 5.8, stopped and started with 5.10 (works fine) but
again stopped and started broker with 5.8 (Not working). Please note that I
have tested this with two case: (i) clients are conencted (ii) clients are
not connected, and in both the cases the same issue observed. 

Error is provided below: 
--------------------
[20140705 16:47:14.724 IST (main)
org.apache.activemq.store.kahadb.MessageDatabase#recover 562 INFO] -
Recovering from the journal ... 
[20140705 16:47:14.725 IST (main)
org.apache.activemq.broker.BrokerService#start 556 ERROR] - Failed to start
Apache ActiveMQ (anujmqbrokerdev, null). Reason: java.io.IOException: Could
not load journal record. Invalid location: 1:978 
       at
org.apache.activemq.store.kahadb.MessageDatabase.load(MessageDatabase.java:972)
        at
org.apache.activemq.store.kahadb.MessageDatabase.recover(MessageDatabase.java:564)
        at
org.apache.activemq.store.kahadb.MessageDatabase.open(MessageDatabase.java:369)
        at
org.apache.activemq.store.kahadb.MessageDatabase.load(MessageDatabase.java:387)
        at
org.apache.activemq.store.kahadb.MessageDatabase.doStart(MessageDatabase.java:240)
        at
org.apache.activemq.store.kahadb.KahaDBStore.doStart(KahaDBStore.java:180)
        at
org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)
        at
org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.doStart(KahaDBPersistenceAdapter.java:220)
        at
org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)
        at
org.apache.activemq.store.kahadb.MultiKahaDBPersistenceAdapter.start(MultiKahaDBPersistenceAdapter.java:322)
        at
org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter(BrokerService.java:598)
        at
org.apache.activemq.broker.BrokerService.startPersistenceAdapter(BrokerService.java:587)
        at
org.apache.activemq.broker.BrokerService.start(BrokerService.java:552)
        at
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

--------------------


Thanks,
Anuj






--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-10-compatibility-with-KahaDB-tp4682812p4682831.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.10 compatibility with KahaDB

Posted by Gary Tully <ga...@gmail.com>.
That is not good. We try and do auto updates  - the test is at
https://github.com/apache/activemq/blob/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBVersionTest.java

I wonder what is different in your store?
You could just rebuild the index, use forceRecoverIndex on kahaDB for
the first restart after an upgrade and that should work ok.

It would be great if you could modify the exisitng test case we have,
to demonstrate the failure.

On 4 July 2014 15:41, khandelwalanuj <kh...@gmail.com> wrote:
> Hi,
>
> I am using ActiveMQ 5.8 and trying to switch to ActiveMQ 5.10. The problem
> here is that I have to clear the kahaDB before switch otherwise I get error.
> This also happens if I want to switch back from 5.10 to 5.8.
>
> Everytime we need to clear the kahaDB
>
> Error:
>
> "java.io.IOException: Could not load journal record. Invalid location:
> 1:978"
>
>
>
> Thanks,
> Anuj
>
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-10-compatibility-with-KahaDB-tp4682812.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
http://redhat.com
http://blog.garytully.com