5 Replies Latest reply on May 21, 2015 10:40 AM by jbertram

    Issue in HornetQ:java.lang.IllegalStateException: Invalid logic on buffer allocation

    kaluibu

      Hi,

       

      I am using Hornetq 2.0.0.GA as my JMS server. Once I start using it, sometimes I am geting aa runtime esception as follows.

       

      java.lang.IllegalStateException: Invalid logic on buffer allocation         at org.hornetq.core.journal.impl.JournalImpl.appendRecord(JournalImpl.java:2820)         at org.hornetq.core.journal.impl.JournalImpl.appendAddRecordTransactional(JournalImpl.java:968)         at org.hornetq.core.persistence.impl.journal.JournalStorageManager.storeMessageTransactional(JournalStorageManager.java:567)         at org.hornetq.core.postoffice.impl.PostOfficeImpl.processRoute(PostOfficeImpl.java:900)         at org.hornetq.core.postoffice.impl.PostOfficeImpl.route(PostOfficeImpl.java:665)         at org.hornetq.core.postoffice.impl.PostOfficeImpl.route(PostOfficeImpl.java:539)         at org.hornetq.core.paging.impl.PagingStoreImpl.onDepage(PagingStoreImpl.java:1006)         at org.hornetq.core.paging.impl.PagingStoreImpl.readPage(PagingStoreImpl.java:698)         at org.hornetq.core.paging.impl.PagingStoreImpl.access$200(PagingStoreImpl.java:64)         at org.hornetq.core.paging.impl.PagingStoreImpl$DepageRunnable.run(PagingStoreImpl.java:1181)         at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:96)         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)         at java.lang.Thread.run(Thread.java:662)

       

      Also I have faced another issue where I got deployement error. The application was running fine and when I try to restart, I am getting the error. Then I need to clear some data folder from the server which result in pending data getting lost.

      Please see the logs below.

       

       

      [main] 13:31:08,733 INFO [org.hornetq.integration.bootstrap.HornetQBootstrapServer]  Starting HornetQ Server

      [main] 13:31:10,608 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  live server is starting..

      [main] 13:31:10,657 WARNING [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal

      [main] 13:31:10,657 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  Using NIO Journal

      [main] 13:31:10,689 WARNING [org.hornetq.core.server.impl.HornetQServerImpl]  Security risk! It has been detected that the cluster admin user and password have not been changed from the installation default. Please see the HornetQ user guide, cluster chapter, for instructions on how to do this.

      [main] 13:31:11,478 WARNING [org.hornetq.core.journal.impl.JournalImpl]  Temporary files were left unnatended after a crash on journal directory, deleting invalid files now

      [main] 13:31:11,478 WARNING [org.hornetq.core.journal.impl.JournalImpl]  Deleting unnatended file hornetq-data-101668.hq.cmp

      [main] 13:31:11,588 SEVERE [org.hornetq.integration.bootstrap.HornetQBootstrapServer]  Failed to start server

      1. java.lang.IllegalStateException: Incompletely deployed:

       

      DEPLOYMENTS IN ERROR:

        Deployment "JMSServerManager" is in error due to: java.nio.BufferUnderflowException

       

      at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:278)

      at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:174)

      at org.hornetq.integration.bootstrap.HornetQBootstrapServer.bootstrap(HornetQBootstrapServer.java:159)

      at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:83)

      at org.hornetq.integration.bootstrap.HornetQBootstrapServer.run(HornetQBootstrapServer.java:117)

      at org.hornetq.integration.bootstrap.HornetQBootstrapServer.main(HornetQBootstrapServer.java:73)

      Exception in thread "main" java.lang.IllegalStateException: Incompletely deployed:

       

      DEPLOYMENTS IN ERROR:

        Deployment "JMSServerManager" is in error due to: java.nio.BufferUnderflowException

       

      at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:278)

      at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:174)

      at org.hornetq.integration.bootstrap.HornetQBootstrapServer.bootstrap(HornetQBootstrapServer.java:159)

      at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:83)

      at org.hornetq.integration.bootstrap.HornetQBootstrapServer.run(HornetQBootstrapServer.java:117)

      at org.hornetq.integration.bootstrap.HornetQBootstrapServer.main(HornetQBootstrapServer.java:73)

       

       

       

      R's

      Khaleel

        • 1. Re: Issue in HornetQ:java.lang.IllegalStateException: Invalid logic on buffer allocation
          jbertram

          I think the first thing you should do is upgrade your HornetQ server.  HornetQ 2.0.0.GA is positively ancient at this point.  Try using 2.4.0.Final.  It contains hundreds of bug-fixes and improvements over 2.0.0.GA.

          • 2. Re: Issue in HornetQ:java.lang.IllegalStateException: Invalid logic on buffer allocation
            kaluibu

            Hi Justin,

             

            If the above case is a bug in hornetq 2.0, can you please tell me which version has the fix for the bug?

             

            R's

            Khaleel

            • 3. Re: Issue in HornetQ:java.lang.IllegalStateException: Invalid logic on buffer allocation
              jbertram

              I can't say with certainty that the issue described above was a bug in HornetQ 2.0.  My point simply was the user needed to upgrade in case it was a bug that was already fixed in a later release which was likely since 2.0 was so old.  If the issue can be reproduced on a recent release then it's worth investigating.  Otherwise it's not.

              • 4. Re: Issue in HornetQ:java.lang.IllegalStateException: Invalid logic on buffer allocation
                kaluibu

                But the case here is that I am unable to upgrade my JBOSS AS due to a lot of other dependencies. I know that JBOSS AS 5.1 is relatively ancient.

                If I get a confirmation from you hornetq developers that I need to upgrade my AS, then I can start working on migrating my application to AS7 or wildfly. But what I require is a confirmation from you.

                 

                For making the test scenarios, I tried to work with different hornetq versions.

                 

                When I used both hornetq 2.4 and 2.3 with Jboss 5.1, I was getting unexpected exceptions. When I searched, the below thread helped.

                Trouble Installing HornetQ (2.3.0 Final) into JBoss 5.1

                Here it suggests upgrading Jboss AS.

                 

                SO I thought of using 2.1 version considering the age of JBOSS 5.1 version. At that time I ended up with another bug which was then fixed in newer version.

                Please see the below thread.

                 

                Compatability between HQ (JMS) client and server libraries

                 

                I don't really know what to do. If JBOSS AS upgradation is the best solution, please suggest.

                 

                Thanks in Advance

                Khaleel

                • 5. Re: Issue in HornetQ:java.lang.IllegalStateException: Invalid logic on buffer allocation
                  jbertram

                  Here's the bottom line...Community support (i.e. what you get for free on a forum or mailing list like this) is all about the latest and greatest.  Just about anybody from the community who helps you is going to have a job whose primary role is something other than providing free support.  Since resources are limited it's unlikely anybody is going to devote much effort into investigating issues in old releases that have probably already been fixed.  If you can reproduce the issue on a current release then that confirms there is a real issue which means you're more likely to get some help.

                   

                  If you're stuck on old versions for whatever reason you're simply not likely to get any help.  However, if you did the work to make your problems easily reproducible (e.g. a test-case like I've mentioned) then you'd be more likely to get help.  You're stuck on old software and you won't provide a reproducible test-case (despite multiple requests).

                   

                  At this point I recommend you upgrade to the latest stable release of Wildfly, and the next time you start a project think about your upgrade path.  If you think you're going to get stuck on a particular version and you still want support then consider purchasing support from Red Hat.