You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Matthew Harris <ha...@gmail.com> on 2022/01/27 21:14:04 UTC

Difficulties finding libaio

Hi,

I'm trying to containerize apache-artemis-2.20.0, and right now I'm working
on adding libaio to the container so I can use an AIO journal for faster
performance. I stored the .so files for libaio in a directory in the
container, and I set the LD_LIBRARY_PATH environment variable to point to
the directory containing those files.

However, when I spin up the container and run the broker, it can't find
libaio and defaults to an NIO journal. I see here:
https://activemq.apache.org/components/artemis/documentation/1.1.0/using-server.html#library-path
that java.library.path is specified automatically in the scripts, so I'm
assuming why the JVM isn't using the environment variable to find libaio.

I also see that there's a --java-options argument that can be provided when
the broker is created. Is there a way to overwrite or add a path to
java.library.path this way? It's been a long time since I've worked with
Java so I'm a little lost as to how to point this to the correct directory
and load libaio.

Thanks,
Matthew

Re: Difficulties finding libaio

Posted by Justin Bertram <jb...@apache.org>.
Thanks for following up. I'm glad you got it sorted out.


Justin

On Fri, Jan 28, 2022 at 8:31 AM Matthew Harris <ha...@gmail.com>
wrote:

> It was an issue with how I was creating the container, sorry for any
> confusion.
>
> On Fri, Jan 28, 2022 at 8:12 AM Matthew Harris <ha...@gmail.com>
> wrote:
>
> > Any updates on this? For a bit more context:
> >
> > On my local machine that's able to run the AIO journal, all I have
> > installed are 3 .so files of what I'm assuming are different versions of
> > libaio and some documentation files for the program, or at least that's
> > what I see when I run "rpm -ql libaio". The broker is able to find these
> > and run AIO just fine. I'm actually able to "yum install libaio" as well
> as
> > I build up my image, I just found out, but I'm still unable to run
> Artemis
> > using AIO despite having it enabled even if I build it this way. When I
> run
> > "rpm -ql libaio" on the image, I get the same set of files in the same
> > places as the libaio files on my local machine, so I think they're all
> > installed in the right place.
> >
> > Maybe this is more of an issue with me not setting up the container
> > correctly, but I'm not sure. Has anyone else had an issue like this?
> >
> > On Thu, Jan 27, 2022 at 4:43 PM Matthew Harris <ha...@gmail.com>
> > wrote:
> >
> >> What is the file extension for a libaio kernel module? Also I'm going to
> >> be picking this up again tomorrow but I'm done for today, so there
> might be
> >> a delay in my response, just a heads up.
> >>
> >> On Thu, Jan 27, 2022 at 4:40 PM Justin Bertram <jb...@apache.org>
> >> wrote:
> >>
> >>> You need *both* the libaio kernel module installed as well as the
> shared
> >>> object (i.e. .so) file shipped with ActiveMQ Artemis. I've only seen
> you
> >>> mention the .so file. Do you have the libaio kernel module installed?
> >>>
> >>>
> >>> Justin
> >>>
> >>> On Thu, Jan 27, 2022 at 3:14 PM Matthew Harris <
> harrisman1345@gmail.com>
> >>> wrote:
> >>>
> >>> > Hi,
> >>> >
> >>> > I'm trying to containerize apache-artemis-2.20.0, and right now I'm
> >>> working
> >>> > on adding libaio to the container so I can use an AIO journal for
> >>> faster
> >>> > performance. I stored the .so files for libaio in a directory in the
> >>> > container, and I set the LD_LIBRARY_PATH environment variable to
> point
> >>> to
> >>> > the directory containing those files.
> >>> >
> >>> > However, when I spin up the container and run the broker, it can't
> find
> >>> > libaio and defaults to an NIO journal. I see here:
> >>> >
> >>> >
> >>>
> https://activemq.apache.org/components/artemis/documentation/1.1.0/using-server.html#library-path
> >>> > that java.library.path is specified automatically in the scripts, so
> >>> I'm
> >>> > assuming why the JVM isn't using the environment variable to find
> >>> libaio.
> >>> >
> >>> > I also see that there's a --java-options argument that can be
> provided
> >>> when
> >>> > the broker is created. Is there a way to overwrite or add a path to
> >>> > java.library.path this way? It's been a long time since I've worked
> >>> with
> >>> > Java so I'm a little lost as to how to point this to the correct
> >>> directory
> >>> > and load libaio.
> >>> >
> >>> > Thanks,
> >>> > Matthew
> >>> >
> >>>
> >>
>

Re: Difficulties finding libaio

Posted by Matthew Harris <ha...@gmail.com>.
It was an issue with how I was creating the container, sorry for any
confusion.

On Fri, Jan 28, 2022 at 8:12 AM Matthew Harris <ha...@gmail.com>
wrote:

> Any updates on this? For a bit more context:
>
> On my local machine that's able to run the AIO journal, all I have
> installed are 3 .so files of what I'm assuming are different versions of
> libaio and some documentation files for the program, or at least that's
> what I see when I run "rpm -ql libaio". The broker is able to find these
> and run AIO just fine. I'm actually able to "yum install libaio" as well as
> I build up my image, I just found out, but I'm still unable to run Artemis
> using AIO despite having it enabled even if I build it this way. When I run
> "rpm -ql libaio" on the image, I get the same set of files in the same
> places as the libaio files on my local machine, so I think they're all
> installed in the right place.
>
> Maybe this is more of an issue with me not setting up the container
> correctly, but I'm not sure. Has anyone else had an issue like this?
>
> On Thu, Jan 27, 2022 at 4:43 PM Matthew Harris <ha...@gmail.com>
> wrote:
>
>> What is the file extension for a libaio kernel module? Also I'm going to
>> be picking this up again tomorrow but I'm done for today, so there might be
>> a delay in my response, just a heads up.
>>
>> On Thu, Jan 27, 2022 at 4:40 PM Justin Bertram <jb...@apache.org>
>> wrote:
>>
>>> You need *both* the libaio kernel module installed as well as the shared
>>> object (i.e. .so) file shipped with ActiveMQ Artemis. I've only seen you
>>> mention the .so file. Do you have the libaio kernel module installed?
>>>
>>>
>>> Justin
>>>
>>> On Thu, Jan 27, 2022 at 3:14 PM Matthew Harris <ha...@gmail.com>
>>> wrote:
>>>
>>> > Hi,
>>> >
>>> > I'm trying to containerize apache-artemis-2.20.0, and right now I'm
>>> working
>>> > on adding libaio to the container so I can use an AIO journal for
>>> faster
>>> > performance. I stored the .so files for libaio in a directory in the
>>> > container, and I set the LD_LIBRARY_PATH environment variable to point
>>> to
>>> > the directory containing those files.
>>> >
>>> > However, when I spin up the container and run the broker, it can't find
>>> > libaio and defaults to an NIO journal. I see here:
>>> >
>>> >
>>> https://activemq.apache.org/components/artemis/documentation/1.1.0/using-server.html#library-path
>>> > that java.library.path is specified automatically in the scripts, so
>>> I'm
>>> > assuming why the JVM isn't using the environment variable to find
>>> libaio.
>>> >
>>> > I also see that there's a --java-options argument that can be provided
>>> when
>>> > the broker is created. Is there a way to overwrite or add a path to
>>> > java.library.path this way? It's been a long time since I've worked
>>> with
>>> > Java so I'm a little lost as to how to point this to the correct
>>> directory
>>> > and load libaio.
>>> >
>>> > Thanks,
>>> > Matthew
>>> >
>>>
>>

Re: Difficulties finding libaio

Posted by Matthew Harris <ha...@gmail.com>.
Any updates on this? For a bit more context:

On my local machine that's able to run the AIO journal, all I have
installed are 3 .so files of what I'm assuming are different versions of
libaio and some documentation files for the program, or at least that's
what I see when I run "rpm -ql libaio". The broker is able to find these
and run AIO just fine. I'm actually able to "yum install libaio" as well as
I build up my image, I just found out, but I'm still unable to run Artemis
using AIO despite having it enabled even if I build it this way. When I run
"rpm -ql libaio" on the image, I get the same set of files in the same
places as the libaio files on my local machine, so I think they're all
installed in the right place.

Maybe this is more of an issue with me not setting up the container
correctly, but I'm not sure. Has anyone else had an issue like this?

On Thu, Jan 27, 2022 at 4:43 PM Matthew Harris <ha...@gmail.com>
wrote:

> What is the file extension for a libaio kernel module? Also I'm going to
> be picking this up again tomorrow but I'm done for today, so there might be
> a delay in my response, just a heads up.
>
> On Thu, Jan 27, 2022 at 4:40 PM Justin Bertram <jb...@apache.org>
> wrote:
>
>> You need *both* the libaio kernel module installed as well as the shared
>> object (i.e. .so) file shipped with ActiveMQ Artemis. I've only seen you
>> mention the .so file. Do you have the libaio kernel module installed?
>>
>>
>> Justin
>>
>> On Thu, Jan 27, 2022 at 3:14 PM Matthew Harris <ha...@gmail.com>
>> wrote:
>>
>> > Hi,
>> >
>> > I'm trying to containerize apache-artemis-2.20.0, and right now I'm
>> working
>> > on adding libaio to the container so I can use an AIO journal for faster
>> > performance. I stored the .so files for libaio in a directory in the
>> > container, and I set the LD_LIBRARY_PATH environment variable to point
>> to
>> > the directory containing those files.
>> >
>> > However, when I spin up the container and run the broker, it can't find
>> > libaio and defaults to an NIO journal. I see here:
>> >
>> >
>> https://activemq.apache.org/components/artemis/documentation/1.1.0/using-server.html#library-path
>> > that java.library.path is specified automatically in the scripts, so I'm
>> > assuming why the JVM isn't using the environment variable to find
>> libaio.
>> >
>> > I also see that there's a --java-options argument that can be provided
>> when
>> > the broker is created. Is there a way to overwrite or add a path to
>> > java.library.path this way? It's been a long time since I've worked with
>> > Java so I'm a little lost as to how to point this to the correct
>> directory
>> > and load libaio.
>> >
>> > Thanks,
>> > Matthew
>> >
>>
>

Re: Difficulties finding libaio

Posted by Matthew Harris <ha...@gmail.com>.
What is the file extension for a libaio kernel module? Also I'm going to be
picking this up again tomorrow but I'm done for today, so there might be a
delay in my response, just a heads up.

On Thu, Jan 27, 2022 at 4:40 PM Justin Bertram <jb...@apache.org> wrote:

> You need *both* the libaio kernel module installed as well as the shared
> object (i.e. .so) file shipped with ActiveMQ Artemis. I've only seen you
> mention the .so file. Do you have the libaio kernel module installed?
>
>
> Justin
>
> On Thu, Jan 27, 2022 at 3:14 PM Matthew Harris <ha...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I'm trying to containerize apache-artemis-2.20.0, and right now I'm
> working
> > on adding libaio to the container so I can use an AIO journal for faster
> > performance. I stored the .so files for libaio in a directory in the
> > container, and I set the LD_LIBRARY_PATH environment variable to point to
> > the directory containing those files.
> >
> > However, when I spin up the container and run the broker, it can't find
> > libaio and defaults to an NIO journal. I see here:
> >
> >
> https://activemq.apache.org/components/artemis/documentation/1.1.0/using-server.html#library-path
> > that java.library.path is specified automatically in the scripts, so I'm
> > assuming why the JVM isn't using the environment variable to find libaio.
> >
> > I also see that there's a --java-options argument that can be provided
> when
> > the broker is created. Is there a way to overwrite or add a path to
> > java.library.path this way? It's been a long time since I've worked with
> > Java so I'm a little lost as to how to point this to the correct
> directory
> > and load libaio.
> >
> > Thanks,
> > Matthew
> >
>

Re: Difficulties finding libaio

Posted by Justin Bertram <jb...@apache.org>.
You need *both* the libaio kernel module installed as well as the shared
object (i.e. .so) file shipped with ActiveMQ Artemis. I've only seen you
mention the .so file. Do you have the libaio kernel module installed?


Justin

On Thu, Jan 27, 2022 at 3:14 PM Matthew Harris <ha...@gmail.com>
wrote:

> Hi,
>
> I'm trying to containerize apache-artemis-2.20.0, and right now I'm working
> on adding libaio to the container so I can use an AIO journal for faster
> performance. I stored the .so files for libaio in a directory in the
> container, and I set the LD_LIBRARY_PATH environment variable to point to
> the directory containing those files.
>
> However, when I spin up the container and run the broker, it can't find
> libaio and defaults to an NIO journal. I see here:
>
> https://activemq.apache.org/components/artemis/documentation/1.1.0/using-server.html#library-path
> that java.library.path is specified automatically in the scripts, so I'm
> assuming why the JVM isn't using the environment variable to find libaio.
>
> I also see that there's a --java-options argument that can be provided when
> the broker is created. Is there a way to overwrite or add a path to
> java.library.path this way? It's been a long time since I've worked with
> Java so I'm a little lost as to how to point this to the correct directory
> and load libaio.
>
> Thanks,
> Matthew
>

Re: Difficulties finding libaio

Posted by Matthew Harris <ha...@gmail.com>.
Hi,

I'm unable to run installs like that in my build, but I have the .so files
for libaio so I should be able to run an AIO journal if I can set up the
environment correctly. Thanks for the suggestion, but I really need
something more in line with the approach I laid out.

Thanks,
Matthew

On Thu, Jan 27, 2022 at 4:20 PM Vilius Šumskas <vi...@rivile.lt>
wrote:

> Hi,
>
> most of the distributions have libaio packaged and ready. You just need to
> "dnf install" or "apt-get" it in your container image.
>
> --
>     Vilius
>
> -----Original Message-----
> From: Matthew Harris <ha...@gmail.com>
> Sent: Thursday, January 27, 2022 11:14 PM
> To: users@activemq.apache.org
> Subject: Difficulties finding libaio
>
> Hi,
>
> I'm trying to containerize apache-artemis-2.20.0, and right now I'm
> working on adding libaio to the container so I can use an AIO journal for
> faster performance. I stored the .so files for libaio in a directory in the
> container, and I set the LD_LIBRARY_PATH environment variable to point to
> the directory containing those files.
>
> However, when I spin up the container and run the broker, it can't find
> libaio and defaults to an NIO journal. I see here:
>
> https://activemq.apache.org/components/artemis/documentation/1.1.0/using-server.html#library-path
> that java.library.path is specified automatically in the scripts, so I'm
> assuming why the JVM isn't using the environment variable to find libaio.
>
> I also see that there's a --java-options argument that can be provided
> when the broker is created. Is there a way to overwrite or add a path to
> java.library.path this way? It's been a long time since I've worked with
> Java so I'm a little lost as to how to point this to the correct directory
> and load libaio.
>
> Thanks,
> Matthew
>

RE: Difficulties finding libaio

Posted by Vilius Šumskas <vi...@rivile.lt>.
Hi,

most of the distributions have libaio packaged and ready. You just need to "dnf install" or "apt-get" it in your container image.

-- 
    Vilius

-----Original Message-----
From: Matthew Harris <ha...@gmail.com> 
Sent: Thursday, January 27, 2022 11:14 PM
To: users@activemq.apache.org
Subject: Difficulties finding libaio

Hi,

I'm trying to containerize apache-artemis-2.20.0, and right now I'm working on adding libaio to the container so I can use an AIO journal for faster performance. I stored the .so files for libaio in a directory in the container, and I set the LD_LIBRARY_PATH environment variable to point to the directory containing those files.

However, when I spin up the container and run the broker, it can't find libaio and defaults to an NIO journal. I see here:
https://activemq.apache.org/components/artemis/documentation/1.1.0/using-server.html#library-path
that java.library.path is specified automatically in the scripts, so I'm assuming why the JVM isn't using the environment variable to find libaio.

I also see that there's a --java-options argument that can be provided when the broker is created. Is there a way to overwrite or add a path to java.library.path this way? It's been a long time since I've worked with Java so I'm a little lost as to how to point this to the correct directory and load libaio.

Thanks,
Matthew