Hornetq not starting, error: NATIVE_ERROR_CANT_OPEN_CLOSE_FILE

everything. I'm trying to start using a torque application server (JBoss AS7) and everything looks fine except for the messaging subsystem. At first I thought it was a mistake with my torque setting, but then I downloaded standalone HornetQ (end 2.3.0) and tried to run bin / start.sh. The same error occurred:

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 with more information: https://issues.jboss.org/browse/HORNETQ-818 (last post from Gintaras)

Any ideas on something wrong?

+4
source share
3 answers

It seems you are starting the system in a configuration that does not support direct I / O. 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 requires direct access to files, that is, DMA and direct recording, and an additional layer is added to the file with the attached file, so you cannot have direct access to files.

If you need, you can use NIO, which will use regular Java NIO files.

If you do not need to, you will have to move the log directory from the files specified in the file.

I also wrote in the topic you mentioned: https://community.jboss.org/message/750503

+8
source

As far as I know, disk encryption should not be a problem as long as the partition is mounted as, say, ext4. FWIW, you added a lot of information to this error report, but you didn’t indicate the exact version of libaio that you are using (which was the source of the problem with the original error reported in this case).

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

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

+1
source

In my case, it was caused by libaio1 installed as a dependency on Amarok and MySQL. I did not use any of them, so I just deleted it, and HornetMQ started fine.

0
source

All Articles