12 Replies Latest reply on Apr 1, 2010 9:18 AM by Clebert Suconic

    AIO journal on JBoss AS

    Tim Fox Master

      Apparently HornetQ is not finding AIO when running in JBoss AS - I suspect LD_LIBRARY_PATH hasn't been set up correctly?

       

      Also it's only using 2 files for the journal - this is too small, should be raised in the config.

        • 1. Re: AIO journal on JBoss AS
          Tim Fox Master

          Also Mr de Wolf has reported that sometimes journal start up seems to block on the spinLimiter.acquire call in the TimedBuffer.start.

           

          From code perusal, the only way I think that could happen is if some other thread has tried to use the TimedBuffer before it's been started, and acquired the semaphore.

           

          Perhaps there is some missing dependency between some service in JBoss AS that uses HornetQ and HornetQ service.

           

          I've added some sanity checks in timed buffer, which will throw IlegalStateException if it's used in a non started state.

          • 2. Re: AIO journal on JBoss AS
            Tim Fox Master

            Also... can someone add checks for server.isStarted() on all our control methods (HornetQServerControl, QueueControl, JMSServerControl) etc.

             

            Right now there are no checks, so these could be used before the server is started (maybe that is what is happening)

            • 3. Re: AIO journal on JBoss AS
              Jeff Mesnil Master

              Tim Fox wrote:

               

              Also... can someone add checks for server.isStarted() on all our control methods (HornetQServerControl, QueueControl, JMSServerControl) etc.

               

              Right now there are no checks, so these could be used before the server is started (maybe that is what is happening)

              I'll add a checkStarted() to our management classes

              • 5. Re: AIO journal on JBoss AS
                Tim Fox Master

                Tim Fox wrote:

                 

                Apparently HornetQ is not finding AIO when running in JBoss AS - I suspect LD_LIBRARY_PATH hasn't been set up correctly?


                Is this done yet?

                • 6. Re: AIO journal on JBoss AS
                  Carlo de Wolf Master

                  If we're talking about AIO, I don't see any native JNI libraries for AsynchronousFileImpl within the AS distribution. So regardless of having libaio installed or not, it won't come up.

                  I haven't looked into the compilation requirements, but that might pose a problem with different architectures.

                  • 7. Re: AIO journal on JBoss AS
                    Clebert Suconic Master

                    I just committed the fix for the .so on their right places.

                     

                    I've created /bin/native/lib for linux32 and /bin/native/lib64 for linux64.

                     

                    The run.sh was already looking for .so on those places.

                    • 8. Re: AIO journal on JBoss AS
                      Carlo de Wolf Master
                      11:04:31,155 INFO  [JournalStorageManager] Using AIO Journal
                      

                       

                      • 9. Re: AIO journal on JBoss AS
                        Carlo de Wolf Master

                        The check is paying off:

                        11:04:23,755 INFO  [HornetQConfigParserDeployer] Main Config = org.hornetq.core.config.impl.ConfigurationImpl@5a3c843d
                        11:04:23,823 INFO  [HornetQJMSParserDeployer] Config = org.hornetq.jms.server.config.impl.JMSConfigurationImpl@52194e8b
                        11:04:28,086 INFO  [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://localhost/jndi/rmi://localhost:1090/jmxconnector
                        11:04:29,569 INFO  [MailService] Mail Service bound to java:/Mail
                        11:04:31,000 INFO  [HornetQServerImpl] live server is starting..
                        11:04:31,155 INFO  [JournalStorageManager] Using AIO Journal
                        11:04:31,213 WARNING [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.
                        11:04:34,468 SEVERE [JMSServerManagerImpl] Failed to start jms deployer: java.lang.IllegalStateException: HornetQ Server is not started. It can not be managed yet
                            at org.hornetq.core.management.impl.HornetQServerControlImpl.checkStarted(HornetQServerControlImpl.java:1547)
                            at org.hornetq.core.management.impl.HornetQServerControlImpl.deployQueue(HornetQServerControlImpl.java:563)
                            at org.hornetq.jms.server.impl.JMSServerManagerImpl.internalCreateQueue(JMSServerManagerImpl.java:1079)
                            at org.hornetq.jms.server.impl.JMSServerManagerImpl.initJournal(JMSServerManagerImpl.java:1502)
                            at org.hornetq.jms.server.impl.JMSServerManagerImpl.activated(JMSServerManagerImpl.java:179)
                            at org.hornetq.core.server.impl.HornetQServerImpl.callActivateCallbacks(HornetQServerImpl.java:855)
                            at org.hornetq.core.server.impl.HornetQServerImpl.initialisePart2(HornetQServerImpl.java:1052)
                            at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:307)
                            at org.hornetq.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:228)
                        
                        • 10. Re: AIO journal on JBoss AS
                          Tim Fox Master

                          Carlo de Wolf wrote:

                           

                          The check is paying off:

                          11:04:23,755 INFO  [HornetQConfigParserDeployer] Main Config = org.hornetq.core.config.impl.ConfigurationImpl@5a3c843d
                          11:04:23,823 INFO  [HornetQJMSParserDeployer] Config = org.hornetq.jms.server.config.impl.JMSConfigurationImpl@52194e8b
                          11:04:28,086 INFO  [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://localhost/jndi/rmi://localhost:1090/jmxconnector
                          11:04:29,569 INFO  [MailService] Mail Service bound to java:/Mail
                          11:04:31,000 INFO  [HornetQServerImpl] live server is starting..
                          11:04:31,155 INFO  [JournalStorageManager] Using AIO Journal
                          11:04:31,213 WARNING [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.
                          11:04:34,468 SEVERE [JMSServerManagerImpl] Failed to start jms deployer: java.lang.IllegalStateException: HornetQ Server is not started. It can not be managed yet
                              at org.hornetq.core.management.impl.HornetQServerControlImpl.checkStarted(HornetQServerControlImpl.java:1547)
                              at org.hornetq.core.management.impl.HornetQServerControlImpl.deployQueue(HornetQServerControlImpl.java:563)
                              at org.hornetq.jms.server.impl.JMSServerManagerImpl.internalCreateQueue(JMSServerManagerImpl.java:1079)
                              at org.hornetq.jms.server.impl.JMSServerManagerImpl.initJournal(JMSServerManagerImpl.java:1502)
                              at org.hornetq.jms.server.impl.JMSServerManagerImpl.activated(JMSServerManagerImpl.java:179)
                              at org.hornetq.core.server.impl.HornetQServerImpl.callActivateCallbacks(HornetQServerImpl.java:855)
                              at org.hornetq.core.server.impl.HornetQServerImpl.initialisePart2(HornetQServerImpl.java:1052)
                              at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:307)
                              at org.hornetq.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:228)
                          

                          Cool, so I guess this is due to a missing dependency whose existence we were previously speculating about.

                          • 11. Re: AIO journal on JBoss AS
                            Carlo de Wolf Master

                            Tim Fox wrote:

                             

                            Cool, so I guess this is due to a missing dependency whose existence we were previously speculating about.

                            Well, it is a missing dependency, whether it is the one we were speculating about remains to be seen.

                            • 12. Re: AIO journal on JBoss AS
                              Clebert Suconic Master

                              Tim Fox wrote:

                               

                              Carlo de Wolf wrote:

                               

                              The check is paying off:

                              11:04:23,755 INFO  [HornetQConfigParserDeployer] Main Config = org.hornetq.core.config.impl.ConfigurationImpl@5a3c843d
                              11:04:23,823 INFO  [HornetQJMSParserDeployer] Config = org.hornetq.jms.server.config.impl.JMSConfigurationImpl@52194e8b
                              11:04:28,086 INFO  [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://localhost/jndi/rmi://localhost:1090/jmxconnector
                              11:04:29,569 INFO  [MailService] Mail Service bound to java:/Mail
                              11:04:31,000 INFO  [HornetQServerImpl] live server is starting..
                              11:04:31,155 INFO  [JournalStorageManager] Using AIO Journal
                              11:04:31,213 WARNING [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.
                              11:04:34,468 SEVERE [JMSServerManagerImpl] Failed to start jms deployer: java.lang.IllegalStateException: HornetQ Server is not started. It can not be managed yet
                                  at org.hornetq.core.management.impl.HornetQServerControlImpl.checkStarted(HornetQServerControlImpl.java:1547)
                                  at org.hornetq.core.management.impl.HornetQServerControlImpl.deployQueue(HornetQServerControlImpl.java:563)
                                  at org.hornetq.jms.server.impl.JMSServerManagerImpl.internalCreateQueue(JMSServerManagerImpl.java:1079)
                                  at org.hornetq.jms.server.impl.JMSServerManagerImpl.initJournal(JMSServerManagerImpl.java:1502)
                                  at org.hornetq.jms.server.impl.JMSServerManagerImpl.activated(JMSServerManagerImpl.java:179)
                                  at org.hornetq.core.server.impl.HornetQServerImpl.callActivateCallbacks(HornetQServerImpl.java:855)
                                  at org.hornetq.core.server.impl.HornetQServerImpl.initialisePart2(HornetQServerImpl.java:1052)
                                  at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:307)
                                  at org.hornetq.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:228)
                              

                              Cool, so I guess this is due to a missing dependency whose existence we were previously speculating about.

                               

                               

                              This one was a mistake I made right before uploading a new snapshot. Jeff has it fixed on trunk