4

all. I am trying to start using a torquebox application server (JBoss AS7) and everything seems to be ok, except the messaging subsystem. At first I thought it was an error with my torquebox setup, but then I downloaded standalone HornetQ (2.3.0 final) and tried to run the bin/start.sh. The same error occured:

21:29:03,128 WARN  [org.hornetq.core.server] HQ222010: Critical IO Error, shutting down the server. file=AIOSequentialFile:/home/gintaras/Downloads/hornetq-2.3.0.Final/bin/../data/journal/hornetq-data-1.hq.tmp, message=Can't open file: HornetQException[errorType=NATIVE_ERROR_CANT_OPEN_CLOSE_FILE message=Can't open file]
at org.hornetq.core.asyncio.impl.AsynchronousFileImpl.init(Native Method) [hornetq-journal.jar:]
at org.hornetq.core.asyncio.impl.AsynchronousFileImpl.open(AsynchronousFileImpl.java:220) [hornetq-journal.jar:]
at org.hornetq.core.journal.impl.AIOSequentialFile.open(AIOSequentialFile.java:190) [hornetq-journal.jar:]

I also added a comment here with some more info: https://issues.jboss.org/browse/HORNETQ-818 (last post by Gintaras)

Any ideas whats wrong?

2
  • Which file-system are you using for the HornetQ files? HornetQ achieves its speed by (among many other things) doing very low level file access. Depending on the file system you use, these calls will fail. Make sure you are using something standard like ext4.
    – Francisco
    Apr 29, 2013 at 10:52
  • I have an encrypted ext4 disk (single ssd with ubuntu 13.04 on it), seems fairly standard to me. One guy here community.jboss.org/message/750503 mentioned he solved the issue by moving hornetQ files from his encrypted home partition. Though that seems impossible to me since the whole disk is encrypted (I think it is, its been some time since I installed it). Thanks for Your attention to my question, I really appreciate any help I can get here.
    – HouseMD
    Apr 30, 2013 at 5:28

3 Answers 3

8

It seems you are starting the system on a configuration that doesn't support direct IO. you can just switch it to NIO.

   <subsystem xmlns="urn:jboss:domain:messaging:1.1">
        <hornetq-server>
            <persistence-enabled>true</persistence-enabled>
            ...
            **<journal-type>NIO</journal-type>**

libAIO needs direct access to the files, meaning DMA and direct writes, and an encripted file will put an extra layer so you won't be able to have direct access to the files.

If you need that you can use NIO which will use regular java NIO files.

If you don't need that you will have to move the journal directory away from the encripted files.

I have also written at the thread you mentioned here: https://community.jboss.org/message/750503

1
  • This fixes it - FYI in standalone mode just add the journal-type bit along with the other journal options in the hornetq-configuration.xml. I found this issue was caused by installing mysql-server with installed a different version of libaio1. (on Ubuntu 13.04)
    – Dan
    May 1, 2013 at 8:38
1

As far as I know, disk encryption should not be a problem for as long as the partition is mounted as, say, ext4. FWIW, you added a lot information to that bug report but nothing on the exact version of the libaio that you are using (which was the source of the problem of the original bug reported of that case).

You should consider bringing this issue to the HornetQ Users forum where more people (with HQ experience) would be able to share their experience with you. Stackoverflow works well for simple objective questions, but for something that requires a discussion, a user forum is probably a better place to go.

https://community.jboss.org/en/hornetq?view=discussions

0

In my case it was caused by the libaio1 installed as a dependency of Amarok and MySQL. I haven't used any of the two so I just uninstalled it and HornetMQ started normally.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.