Yes, you just have to use NIO as the journal type, since Java cannot open files using
direct I/O.
Andy
----- Original Message -----
From: "Arun Gupta" <arun.gupta(a)gmail.com>
To: "Andrig Miller" <anmiller(a)redhat.com>
Cc: "WildFly Dev" <wildfly-dev(a)lists.jboss.org>, "Jason Greene"
<jason.greene(a)redhat.com>
Sent: Friday, November 22, 2013 11:39:53 AM
Subject: Re: [wildfly-dev] HornetQException[errorType=NATIVE_ERROR_CANT_OPEN_CLOSE_FILE
message=Can't open file]
Can I disable that functionality for systems where direct file access
is not permitted ?
On Fri, Nov 22, 2013 at 9:50 AM, Andrig Miller <anmiller(a)redhat.com>
wrote:
> If you use the ASYNC I/O capabilities, which requires both libaio
> on Linux and the HornetQ native code library, it opens the journal
> file(s) (for persitent messages) using the direct I/O.
>
> You probaby know what that means, but its the way HornetQ squeezes
> the most of our persistent messaging performance and scalability,
> so its more than just native asynchronous I/O.
>
> Andy
>
> ----- Original Message -----
>> From: "Arun Gupta" <arun.gupta(a)gmail.com>
>> To: "Jason Greene" <jason.greene(a)redhat.com>
>> Cc: "WildFly Dev" <wildfly-dev(a)lists.jboss.org>
>> Sent: Friday, November 22, 2013 9:48:28 AM
>> Subject: Re: [wildfly-dev]
>> HornetQException[errorType=NATIVE_ERROR_CANT_OPEN_CLOSE_FILE
>> message=Can't open file]
>>
>> Why is the direct filesystem access required ?
>>
>> IMHO that's a typical usecase if the server is running in cloud
>> anyway.
>>
>> Arun
>>
>>
>> On Fri, Nov 22, 2013 at 7:00 AM, Jason Greene
>> <jason.greene(a)redhat.com> wrote:
>> > IMO it looks like it finds libaio, which is on most linux
>> > systems.
>> > It looks like the problem is that it can’t create the file in
>> > the
>> > first place, which can certainly happen if the underlying FS
>> > doesn’t allow direct access.
>> >
>> > On Nov 22, 2013, at 7:45 AM, Arun Gupta <arun.gupta(a)gmail.com>
>> > wrote:
>> >
>> >> Opened
https://issues.jboss.org/browse/HORNETQ-1286
>> >>
>> >> Tests are running on a CI server and do not have the rights to
>> >> install
>> >> any system level libraries.
>> >>
>> >> Is there a CLI option to force NIO ?
>> >>
>> >> Arun
>> >>
>> >>
>> >>
>> >> Arun
>> >>
>> >> On Fri, Nov 22, 2013 at 1:17 AM, Jeff Mesnil
>> >> <jmesnil(a)redhat.com>
>> >> wrote:
>> >>>
>> >>> On 22 Nov 2013, at 06:00, Arun Gupta <arun.gupta(a)gmail.com>
>> >>> wrote:
>> >>>
>> >>>> And how would I do that ? :-)
>> >>>
>> >>> in the XML configuration, you would add
>> >>>
>> >>> <journal-type>NIO</journal-type>
>> >>>
>> >>> to the messaging subsystem configuration.
>> >>>
>> >>>> On Thu, Nov 21, 2013 at 6:41 PM, Jason Greene
>> >>>> <jgreene(a)redhat.com> wrote:
>> >>>>> Sounds like the CI system doesn't have a file system
that
>> >>>>> supports direct access. Try setting the journal type to
NIO.
>> >>>
>> >>> There is something else going on here. If HornetQ is running
>> >>> on a
>> >>> system without AIO, it’d log a warning and revert to NIO:
>> >>>
>> >>> 10:11:28,080 WARN [org.jboss.as.messaging] (MSC service
>> >>> thread
>> >>> 1-15) JBAS011600: 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
>> >>>
>> >>> Either the detection of AIO is buggy or there is a real
>> >>> problem
>> >>> with the file.
>> >>>
>> >>> Arun, could you open a bug on HornetQ issue tracker with a
>> >>> copy
>> >>> of your journal file?
>> >>>
>> >>> jeff
>> >>>
>> >>>>>
>> >>>>> Sent from my iPhone
>> >>>>>
>> >>>>>> On Nov 21, 2013, at 4:20 PM, Arun Gupta
>> >>>>>> <arun.gupta(a)gmail.com>
>> >>>>>> wrote:
>> >>>>>>
>> >>>>>> Trying to run Java EE 7 unit tests and the complete log
is
>> >>>>>> at:
>> >>>>>>
>> >>>>>>
https://arungupta.ci.cloudbees.com/job/Java%20EE%207%20Samples%20on%20Wil...
>> >>>>>>
>> >>>>>> HornetQ throws the following error:
>> >>>>>>
>> >>>>>> [0m [0m10:51:36,892 INFO
[org.jboss.ws.common.management]
>> >>>>>> (MSC
>> >>>>>> service thread 1-2) JBWS022052: Starting JBoss Web
Services
>> >>>>>> -
>> >>>>>> Stack
>> >>>>>> CXF Server 4.2.3.Final
>> >>>>>> [0m [33m10:51:37,031 WARN [org.hornetq.core.server]
>> >>>>>> (ServerService
>> >>>>>> Thread Pool -- 58) HQ222010: Critical IO Error,
shutting
>> >>>>>> down
>> >>>>>> the
>> >>>>>> server.
>> >>>>>> file=AIOSequentialFile:/scratch/jenkins/workspace/Java
>> >>>>>> EE 7
>> >>>>>> Samples on
>> >>>>>>
WildFly-cb/wildfly-8.0.0.Beta2-SNAPSHOT/standalone/data/messagingjournal/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-2.4.0.Beta2.jar:]
>> >>>>>> at
>> >>>>>>
org.hornetq.core.asyncio.impl.AsynchronousFileImpl.open(AsynchronousFileImpl.java:220)
>> >>>>>> [hornetq-journal-2.4.0.Beta2.jar:]
>> >>>>>> at
>> >>>>>>
org.hornetq.core.journal.impl.AIOSequentialFile.open(AIOSequentialFile.java:190)
>> >>>>>> [hornetq-journal-2.4.0.Beta2.jar:]
>> >>>>>>
>> >>>>>> Several test deployments are failing with the
following
>> >>>>>> reason:
>> >>>>>>
>> >>>>>> Caused by: java.lang.Exception: {"JBAS014771:
Services with
>> >>>>>> missing/unavailable dependencies" =>
>> >>>>>>
["jboss.naming.context.java.module.test.test.DefaultJMSConnectionFactory
>> >>>>>> is missing
>> >>>>>>
[jboss.naming.context.java.jboss.DefaultJMSConnectionFactory]"]}
>> >>>>>> at
>> >>>>>>
org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getActionResult(ServerDeploymentPlanResultFuture.java:134)
>> >>>>>> at
>> >>>>>>
org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getResultFromNode(ServerDeploymentPlanResultFuture.java:123)
>> >>>>>>
>> >>>>>> If I run in the default Web profile then this error
does
>> >>>>>> not
>> >>>>>> occur as shown at:
>> >>>>>>
>> >>>>>>
https://arungupta.ci.cloudbees.com/job/Java%20EE%207%20Samples%20on%20Wil...
>> >>>>>>
>> >>>>>> But JMS tests fail.
>> >>>>>>
>> >>>>>> I can't reproduce this issue with the latest
workspace on
>> >>>>>> my
>> >>>>>> machine.
>> >>>>>>
>> >>>>>> Any suggestions ?
>> >>>>>>
>> >>>>>> Arun
>> >>>>>>
>> >>>>>> --
>> >>>>>>
http://blog.arungupta.me
>> >>>>>>
http://twitter.com/arungupta
>> >>>>>>
>> >>>>>> _______________________________________________
>> >>>>>> wildfly-dev mailing list
>> >>>>>> wildfly-dev(a)lists.jboss.org
>> >>>>>>
https://lists.jboss.org/mailman/listinfo/wildfly-dev
>> >>>>
>> >>>>
>> >>>>
>> >>>> --
>> >>>>
http://blog.arungupta.me
>> >>>>
http://twitter.com/arungupta
>> >>>> _______________________________________________
>> >>>> wildfly-dev mailing list
>> >>>> wildfly-dev(a)lists.jboss.org
>> >>>>
https://lists.jboss.org/mailman/listinfo/wildfly-dev
>> >>>
>> >>> --
>> >>> Jeff Mesnil
>> >>> JBoss, a division of Red Hat
>> >>>
http://jmesnil.net/
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >>
http://blog.arungupta.me
>> >>
http://twitter.com/arungupta
>> >>
>> >> _______________________________________________
>> >> wildfly-dev mailing list
>> >> wildfly-dev(a)lists.jboss.org
>> >>
https://lists.jboss.org/mailman/listinfo/wildfly-dev
>> >
>> > --
>> > Jason T. Greene
>> > WildFly Lead / JBoss EAP Platform Architect
>> > JBoss, a division of Red Hat
>> >
>>
>>
>>
>> --
>>
http://blog.arungupta.me
>>
http://twitter.com/arungupta
>>
>> _______________________________________________
>> wildfly-dev mailing list
>> wildfly-dev(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/wildfly-dev
>>
--
http://blog.arungupta.me
http://twitter.com/arungupta