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:
所有人。我正在尝试使用一个torquebox应用服务器(JBoss AS7),一切看起来都很好,除了消息子系统。起初我以为是我的torquebox设置出错了,但后来我下载了独立的HornetQ (2.3.0 final),并尝试运行bin/start.sh。同样的错误发生:
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)
我还在这里添加了一些信息:https://www.jboss.org/browse/hornetq -818 (Gintaras的最后一篇文章)
Any ideas whats wrong?
任何想法是什么错了吗?
3 个解决方案
#1
8
It seems you are starting the system on a configuration that doesn't support direct IO. you can just switch it to NIO.
似乎您正在启动一个不支持直接IO的配置。你可以把它换成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.
libAIO需要直接访问这些文件,这意味着DMA和direct写入,而一个被压缩的文件会添加一个额外的层,这样你就无法直接访问这些文件。
If you need that you can use NIO which will use regular java NIO files.
如果您需要,您可以使用NIO,它将使用常规的java NIO文件。
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
我还写了您在这里提到的线程:https://community.jboss.org/message/750503。
#2
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).
据我所知,磁盘加密不应该是一个问题,只要分区挂载到ext4。FWIW,您在这个bug报告中添加了很多信息,但是没有您使用的libaio的确切版本(这是原始bug报告的根源)。
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. * works well for simple objective questions, but for something that requires a discussion, a user forum is probably a better place to go.
你应该考虑把这个问题带到HornetQ用户论坛,那里有更多的人(有HQ经验)可以和你分享他们的经验。*可以很好地解决简单的客观问题,但是对于需要讨论的东西,用户论坛可能是一个更好的去处。
https://community.jboss.org/en/hornetq?view=discussions
https://community.jboss.org/en/hornetq?view=discussions
#3
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.
在我的例子中,它是由libaio1安装的,它是Amarok和MySQL的依赖项。我没有使用任何两个,所以我只是卸载了它,HornetMQ正常启动。
#1
8
It seems you are starting the system on a configuration that doesn't support direct IO. you can just switch it to NIO.
似乎您正在启动一个不支持直接IO的配置。你可以把它换成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.
libAIO需要直接访问这些文件,这意味着DMA和direct写入,而一个被压缩的文件会添加一个额外的层,这样你就无法直接访问这些文件。
If you need that you can use NIO which will use regular java NIO files.
如果您需要,您可以使用NIO,它将使用常规的java NIO文件。
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
我还写了您在这里提到的线程:https://community.jboss.org/message/750503。
#2
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).
据我所知,磁盘加密不应该是一个问题,只要分区挂载到ext4。FWIW,您在这个bug报告中添加了很多信息,但是没有您使用的libaio的确切版本(这是原始bug报告的根源)。
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. * works well for simple objective questions, but for something that requires a discussion, a user forum is probably a better place to go.
你应该考虑把这个问题带到HornetQ用户论坛,那里有更多的人(有HQ经验)可以和你分享他们的经验。*可以很好地解决简单的客观问题,但是对于需要讨论的东西,用户论坛可能是一个更好的去处。
https://community.jboss.org/en/hornetq?view=discussions
https://community.jboss.org/en/hornetq?view=discussions
#3
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.
在我的例子中,它是由libaio1安装的,它是Amarok和MySQL的依赖项。我没有使用任何两个,所以我只是卸载了它,HornetMQ正常启动。