Hi Samisa,

I think some of the instructions like setting the LD_LIBRARY_PATH is
missing. Also I think we should add a faq saying what are the things that
can go wrong when we deploy in Apache and possible solutions to that.

Supun..

On Thu, Jul 17, 2008 at 11:57 AM, Samisa Abeysinghe <[EMAIL PROTECTED]> wrote:

> Supun,
>   Arn't these steps on the manual?
> Samisa...
>
> Supun Kamburugamuva wrote:
>
>> Hi Alex,
>>
>> Nice description of the problem. Couldn't think of a better way to do it.
>>
>> This is what you need to do.
>>
>> You have the axis2/c distribution in /home/alex/axis2c-dist right? You
>> should have the lib, modules and services directories under that directory.
>> Also you need to have the axis2.xml file in that directory.
>>
>> Please add the lib directory to your LD_LIBRARY_PATH or do an equivalent
>> of this (ldconfig).
>>  Please remove all your  LoadFile directives from your Apache
>> configuration.
>>
>> Make sure your Axis2/C configuration in httpd.conf is correct. The
>> required entries are:
>>
>> LoadModule axis2_module MOD_AXIS2_SO_PATH
>> Axis2RepoPath AXIS2C_INSTALL_DIR
>> Axis2LogFile  PATH_TO_LOG_FILE
>> Axis2LogLevel LOG_LEVEL
>> <Location /axis2>
>>    SetHandler axis2_module
>> </Location>
>>
>>
>> Also make sure that Apache has read access to the /home/alex/axis2c-dist
>> directory. Start Apache and everything should work fine.
>>
>> Supun..
>>
>> On Thu, Jul 17, 2008 at 8:09 AM, Rajika Kumarasiri <[EMAIL PROTECTED]<mailto:
>> [EMAIL PROTECTED]>> wrote:
>>
>>
>>
>>    On Thu, Jul 17, 2008 at 2:25 AM, Alex Bolgarov <[EMAIL PROTECTED]
>>    <mailto:[EMAIL PROTECTED]>> wrote:
>>
>>        Well, our server machine is not supposed to have development
>>        tools at
>>        all. So I can't compile the Axis2/C on it.
>>
>>        Then, how it is supposed to work if I use the Axis2C binary
>>        distribution?
>>
>>    1. Unzip the binary to a location,
>>    2. Copy the mod_axis2.so to the Apache module directory.
>>    3. Set the LoadModule and the Axis2RepoPath in httpd.conf
>>    Restart the Apache server.
>>
>>    -Rajika
>>
>>
>>
>>        And it should have nothing to do with environment variables
>>        settings
>>        (other then possible LD_LIBRARY_PATH) because Apache can't
>>        load the
>>        module at all, because the ldopen() can't find the shared
>>        libraries
>>        that this module refers to, and I can't load those shared
>>        libraries
>>        manually using LoadFile directive because of the circular
>>        reference
>>        problem as I described. So at the moment of failure no Axis2/C
>>        code
>>        has executed yet that could have a chance to fix something
>>        (like, to
>>        find and load libraries from the location pointed by the
>>        AXIS2C_HOME
>>        or by any parameter in the Apache config file. Or am I wrong here?
>>
>>        What I don't understand is why (and how) it works if I run the
>>        Apache
>>        server on the machine where I compile the Axis2C. Does the linker,
>>        when it builds the libmod_axis2.so, embeds into this library the
>>        pathes to the other Axis2/C libraries so, when I copy the
>>        mod_axis2.so
>>        into the Apache modules directory on the same machine, it
>>        finds them
>>        using those embedded pathes?
>>
>>
>>        Thank you,
>>
>>           alex.
>>
>>        On Wed, Jul 16, 2008 at 3:28 PM, lahiru gunathilake
>>        <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
>>        > Hi Alex,
>>        >
>>        > I think you have to set AXIS2C_HOME environment variable on
>>        your server
>>        > machine. And why are you copying libraries from one machine
>>        to another why
>>        > don't you compile Axis2C on you server machine.AFAIK if your
>>        first machine
>>        > and the second machine are different,different in the sense
>>        first machine is
>>        > dual core and the server machine is core 2 duo or something
>>        else you have to
>>        > recompile Axis2C on your server machine and create
>>        libmod_axis2.so otherwise
>>        > previously compiled library won't work on the server machine.
>>        >
>>        > Regards
>>        > Lahiru
>>        >
>>        > On Thu, Jul 17, 2008 at 12:03 AM, Alex Bolgarov
>>        <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
>>        >>
>>        >> Hi,
>>        >>
>>        >> How do you load a mod_axis2.so module into the Apache when
>>        you copy
>>        >> the Axis2/C libraries to some directory - for example, when
>>        you are
>>        >> using the binary Axis2/C distribution, or just build
>>        Axis2/C from
>>        >> source on one machine (and installed itto some directory)
>>        and then
>>        >> copy Axis2/C module and libraries to some directory on some
>>        othar
>>        >> machine with Apache server?
>>        >>
>>        >> Well, here is a longer description of the problem:
>>        >>
>>        >> Say I'm using a source distribution. I download the .tar.gz
>>        source
>>        >> tarball, untar, configure it with some install directory
>>        (--prefix)
>>        >> and build/install it, now I have this install directory
>>        with the build
>>        >> by me Axis2/C.
>>        >>
>>        >> I have Apache server running in this machine, so I copy
>>        mod_axis2.so
>>        >> into the Apache installation, I update the Apache config to
>>        load the
>>        >> module, I define the Axis2/C repository, I develop a web
>>        service and
>>        >> run tests against it. All is fine up to this point.
>>        >>
>>        >> Now I want to use the Axis2/C with the Apache server that
>>        is running
>>        >> on another machine.
>>        >>
>>        >> I copy everything from the install directory from the build
>>        machine
>>        >> into some directory on this other machine with Apache
>>        (let's call this
>>        >> directory "/home/alex/axis2c-dist").
>>        >>
>>        >> I rename libmod_axis2.so.0.4.0 to mod_axis2.so and copy it
>>        into the
>>        >> Apache's modules directory.
>>        >>
>>        >> Now I change the Apache config file so that it contains the
>>        line
>>        >>
>>        >>    LoadModule axis2_module modules/mod_axis2.so
>>        >>
>>        >> I try to start Apache:
>>        >>
>>        >>    $ apachectl start
>>        >>
>>        >> and see following error:
>>        >>
>>        >> Cannot load /home/alex/httpd/modules/mod_axis2.so into server:
>>        >> libaxis2_engine.so.0: cannot open shared object file: No
>>        such file or
>>        >> directory
>>        >>
>>        >> Now, I happen to know about the LoadFile Apache directive :)
>>        >>
>>        >> I add the LoadFile directive for the libaxis2_engine.so so
>>        that Apache
>>        >> loads it from the /home/alex/axis2c-dist directory, now the
>>        Apache
>>        >> config looks like this:
>>        >>
>>        >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>>        >>    LoadModule axis2_module modules/mod_axis2.so
>>        >>
>>        >> I try to start Apache again:
>>        >>
>>        >>    $ apachectl start
>>        >>
>>        >> and now see:
>>        >>
>>        >> Cannot load
>>        /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 into
>>        >> server: libneethi.so.0: cannot open shared object file: No
>>        such file
>>        >> or directory
>>        >>
>>        >> OK, I add LoadFile directives for the libneethi.so, and so
>>        on, when I
>>        >> finally arrive to the following config:
>>        >>
>>        >>    LoadFile /home/alex/axis2c-dist/lib/libaxutil.so.0.4.0
>>        >>    LoadFile /home/alex/axis2c-dist/lib/libguththila.so.0.4.0
>>        >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_parser.so.0.4.0
>>        >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_axiom.so.0.4.0
>>        >>    LoadFile /home/alex/axis2c-dist/lib/libneethi.so.0.4.0
>>        >>    LoadFile
>>        /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>>        >>    LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0
>>        >>
>>        >>    LoadModule axis2_module modules/mod_axis2.so
>>        >>
>>        >> But now, after I try to start Apache, I see new error:
>>        >>
>>        >> Cannot load
>>        /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0
>>        >> into server:
>>        /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0:
>>        >> undefined symbol: axis2_handler_invoke
>>        >>
>>        >> Which means that the libaxis2_engine.so depends on the
>>        >> libaxis2_http_common.so, and requires it to be loaded by
>>        Apache first,
>>        >> but the libaxis2_http_common.so contains a reference to
>>        undefined
>>        >> symbol "axis2_handler_invoke", that is defined by the
>>        >> libaxis2_engine.so. (Yes, I used 'nm libaxis2_engine.so | grep
>>        >> axis2_handler_invoke" to check that this symbol is indeed
>>        defined in
>>        >> this library.)
>>        >>
>>        >> Circular dependency?
>>        >>
>>        >> How do I break it?
>>        >>
>>        >> (note that the same thing happens if I download the binary
>>        >> distribution, untar it into some directory and copy the
>>        mod_axis2 into
>>        >> the Apache moddules directory. Up to the same point I can
>>        use LoadFile
>>        >> to load Axis2/C libraries, but then again I see this circular
>>        >> dependency)
>>        >>
>>        >>
>>        >> Thank you,
>>        >>
>>        >>    alex.
>>        >>
>>        >>
>>
>>  ---------------------------------------------------------------------
>>        >> To unsubscribe, e-mail:
>>        [EMAIL PROTECTED]
>>        <mailto:[EMAIL PROTECTED]>
>>        >> For additional commands, e-mail:
>>        [EMAIL PROTECTED]
>>        <mailto:[EMAIL PROTECTED]>
>>        >>
>>        >
>>        >
>>
>>
>>  ---------------------------------------------------------------------
>>        To unsubscribe, e-mail: [EMAIL PROTECTED]
>>        <mailto:[EMAIL PROTECTED]>
>>        For additional commands, e-mail:
>>        [EMAIL PROTECTED]
>>        <mailto:[EMAIL PROTECTED]>
>>
>>
>>
>>
>>    --    comp.lang.c - http://groups.google.com/group/comp.lang.c/topics
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database:
>> 270.5.0/1556 - Release Date: 7/16/2008 4:56 PM
>>
>>
>
>
> --
> Samisa Abeysinghe Director, Engineering; WSO2 Inc.
>
> http://www.wso2.com/ - "The Open Source SOA Company"
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to