1 2 Previous Next 21 Replies Latest reply on Apr 28, 2011 5:28 AM by jiajiefeng

    libAIO warning

      Hello!

       

      I am using hornetq in my project for the first time. I am using it as a persistence queue only, using in-JVM communication.

       

      Whenever I start the application, I have the following message on the output log:

       

      WARNING: 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

       

      The problem is that I do have libaio-0.3.106-3.2 installed on this Linux box. Is there a way I can help hornetq finding the libraries?

       

      Thanks in advance!

        • 1. Re: libAIO warning
          clebert.suconic
          • 2. Re: libAIO warning
            timfox

            What chip architecture are you running?

             

            You shouldn't have to compile anything if you're you're running x86 or x86_64

            • 3. Re: libAIO warning
              x86... I really don't know what I am doing wrong, I'll try to recompile asap.
              • 4. Re: libAIO warning
                clebert.suconic

                Make sure you're using a proper JDK.

                 

                For instance, I have seen problems once when I was accidently using GCJ. We test it with Sun JDK usually.

                • 5. Re: libAIO warning
                  timfox

                  You won't need to recompile if you're on x86 linux, kernel 2.6 or later and using Sun JDK 5+

                  • 6. Re: libAIO warning

                    Hello all,

                     

                    I am using JDK 1.6.0_03 on a CentOS linux. I just tried to recompile the libAIO library and I still get the warning message.

                     

                    I understand that libAIO is a standard Linux shared library. The JNI bindings for it are included in HornetQ's jars? I have the following jars in my application:

                     

                    hornetq_core-2.0.0.jar

                    hornetq_jms-2.0.0.jar

                    hornetq_logging-2.0.0.jar

                    hornetq_transports-2.0.0.jar

                     

                    I am using hornet to implement persistent queueing in my application, I use it embedded in the JVM.

                    Thanks in advance,

                     

                    Felipe

                    • 7. Re: libAIO warning
                      clebert.suconic

                      I didn't realize you were using it embedded...

                       

                      You need to define -Djava.library.path=<your-path-to-the.SO>

                       

                       

                      look at the /bin/run.sh with the distribution.... you will see it defined to the current directory.

                       

                       

                      You won't probably need to use the recompiled SO if you do this.

                      • 8. Re: libAIO warning

                        Ok, now I see that I didn't copy libHornet* to the server's /usr/lib before starting the application.

                         

                        Now I did that, and I also set java.library.path to /usr/lib, but I still get the warning. Do I need to copy anything else?


                        Thanks,

                         

                        Felipe

                        • 9. Re: libAIO warning
                          clebert.suconic

                          You don't need to copy anything to /usr/lib...

                           

                          All you need is to define the library.path.

                           

                           

                          Do you get the warning when you run the distributed server?

                          • 10. Re: libAIO warning
                            Well, I didn't have those libraries on the server, so I copied them to /usr/lib. I am not sure what you mean with distributed server?
                            • 11. Re: libAIO warning
                              clebert.suconic

                              on the download package, if you go to ./hornetq-dir/bin, you will see a run.sh

                               

                               

                              if you execute that run.sh, what do you see?

                              • 12. Re: libAIO warning
                                That's interesting - I've uploaded the distribuition to the server and ran the script you mentioned. The message is different, it says "Using AIO Journal" instead. Why is that?

                                Thanks for your patience!!!!
                                • 13. Re: libAIO warning
                                  clebert.suconic
                                  Just define the library as defined on run.sh and keep the proper .so on the path defined. It should be pretty simple as it is running on the run.sh. You must be doing some obvious mistake, but it's hard for me to tell. You just need to check your environment. Use the run.sh as the base for your script.
                                  • 14. Re: libAIO warning

                                    Still no luck

                                     

                                    If I use "ps" command line app to find my app's process, I see the following:

                                     

                                    /usr/java/jdk1.6.0_03/bin/java -Dpbid=MORouter -cp :./lib/BWLib_Connection-20090504_1385.jar -Djava.library.path=/usr/lib -Duser.timezone=America/Sao_Paulo com.purecontent.morouter.Main

                                     

                                    And using "ls /usr/lib/|grep -i aio" I get the following list:

                                     

                                    libaio.a
                                    libaio.so
                                    libaio.so.1
                                    libaio.so.1.0.0
                                    libaio.so.1.0.1
                                    libHornetQAIO32.so
                                    libHornetQAIO64.so
                                    libHornetQAIO_ia64.so
                                    librtkaio.a

                                     

                                    So I really don't know what to do

                                    1 2 Previous Next