Apache2, Tomcat 4.1 and mod_jk2 question

Discussion in 'Java' started by cji_work@yahoo.com, Jun 10, 2005.

  1. Guest

    Hi fellows,
    I am trying to make this "Apache2, mod_jk2, Tomcat4.1" working together
    on linux machine and so far no luck.

    One thing that I am not sure is if a regular user can install the above
    packages in his home dir to make it work, not a "root" person? As you
    can see I am installing everything under "/home/cji".

    Here are the details of settings in the files.

    1. In the "workers2.properties" file:
    "
    # workers2.properties

    # Shared memory handling. Needs to be set.
    [shm]
    info=Scoreboard. Required for reconfiguration and status with
    multiprocess servers
    file=/home/cji/jakarta-tomcat-4.1.30/logs/jk2.shm
    size=1048576
    debug=0
    disabled=0

    # UNIX domain socket
    [channel.un:/home/cji/jakarta-tomcat-4.1.30/work/jk2.socket]
    tomcatId=localhost:8009
    debug=0

    # define the worker
    [ajp13:/home/cji/jakarta-tomcat-4.1.30/work/jk2.socket]
    channel=channel.un:/home/cji/jakarta-tomcat-4.1.30/work/jk2.socket

    # Announce a "status" worker
    [status:status]
    info=Status worker. Displays runtime information.

    [uri:/jkstatus/*]
    group=status:status

    # Uri mapping
    [uri:/examples/*]

    "

    2. In the "jk2.properties" file:
    "
    # jk2.properties
    # Configured for channel UNIX
    # Set the desired handler list
    handler.list=apr,request,channelUnix

    # UNIX Domain socket location
    channelUnix.file=/home/cji/jakarta-tomcat-4.1.30/work/jk2.socket

    # Dynamic Library
    serverRoot=/etc/httpd2
    apr.NativeSo=/home/cji/Apache/modules/jkjni.so
    "

    3. I have added following in the "server.xml" file:
    "
    ....
    <Connector port="8009" enableLookups="false" redirectPort="8443"
    debug="1" protocol="AJP/1.3" />
    ....

    "

    The error I have seen in my "<Apache>/logs/errors.log" file is :
    "
    [Thu Jun 09 14:29:32 2005] [error] channelUn.connect() connect failed
    111 Connection refused
    [Thu Jun 09 14:29:32 2005] [error] ajp13.connect() failed
    ajp13:/home/cji/jakarta-tomcat-4.1.30/work/jk2.socket
    [Thu Jun 09 14:29:32 2005] [error] ajp13.service() failed to connect
    endpoint errno=111 Connection refused
    [Thu Jun 09 14:29:32 2005] [error] ajp13.service() Error forwarding
    ajp13:/home/cji/jakarta-tomcat-4.1.30/work/jk2.socket 1 1
    [Thu Jun 09 14:29:32 2005] [error] lb.service() worker failed 120000
    for ajp13:/home/cji/jakarta-tomcat-4.1.30/work/jk2.socket
    [Thu Jun 09 14:29:32 2005] [error] lb_worker.service() all workers in
    error or disabled state
    [Thu Jun 09 14:29:32 2005] [error] mod_jk2.handler() Error connecting
    to tomcat 120000, status 503
    "

    I started the Tomcat first, then the Apache Server.
    One thing that I have noticed is there is NO such "jk2.socket" file
    generated under "<tomcat>/worker/". I have also searched NET and found
    some similar postings. Someone's suggestion was to "touch" that file. I
    did, same result.


    Any Help ?


    Thanks a lot


    -cji
    , Jun 10, 2005
    #1
    1. Advertising

  2. Guest

    , Jun 10, 2005
    #2
    1. Advertising

  3. Juha Laiho Guest

    said:
    >I am trying to make this "Apache2, mod_jk2, Tomcat4.1" working together
    >on linux machine and so far no luck.


    mod_jk should be easier to get working than mod_jk2. Also, mod_jk2
    development has been abandoned, so you'll be better off switching
    to mod_jk.

    By the way, are you certain there are no prebuild packages of the
    needed components for your Linux distribution? Or do you have some
    special needs not catered by the prebuilt packages?
    --
    Wolf a.k.a. Juha Laiho Espoo, Finland
    (GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
    PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
    "...cancel my subscription to the resurrection!" (Jim Morrison)
    Juha Laiho, Jun 10, 2005
    #3
  4. Noah Fiedel Guest

    Hi cji,
    I did a similar setup for a production migration just a few months
    ago. Yes & Yes - you can build & install Apache(2) in any directory you
    want. The default install packages are (as I recall) bound to specific
    non-user directories such as /usr/local/apache2. Tomcat can be
    configured to listen on any port - with the default something like
    8080, which does not require root. You can very easily set this up in a
    user dir/subdir. In fact, I have three different tomcats running under
    my id serving different apache vhosts.
    I agree with Juha - use mod_jk, not mod_jk2. Also - why Tomcat4.1?
    If you are not specifically required to use 4.1 for some compatability
    reason, we've found 5.0.28 to be very stable & 5.5 I hear is also doing
    well.
    best of luck,
    Noah
    Noah Fiedel, Jun 10, 2005
    #4
  5. Guest

    Juha Laiho wrote:
    > said:
    > >I am trying to make this "Apache2, mod_jk2, Tomcat4.1" working together
    > >on linux machine and so far no luck.

    >
    > mod_jk should be easier to get working than mod_jk2. Also, mod_jk2
    > development has been abandoned, so you'll be better off switching
    > to mod_jk.


    My original perpose is to build the mose powerful one of the Apahce,
    mod_jk, mod_jk2. Than I realized that mod_jk2 was in the maintaince
    mode. Since I was in the middle of it, and it also suppose to work, so
    I just continued to work on it. Later on I think I will build another
    one also.

    >
    > By the way, are you certain there are no prebuild packages of the
    > needed components for your Linux distribution? Or do you have some
    > special needs not catered by the prebuilt packages?
    > --

    If you are talking about the pre-built package that has both
    Apache&Tomcat, I do not know anything that are of the open source. I
    have been playing with some of the commercial products. But this time I
    have to work something that costs "0" budget.
    If you are asking why I am building the mod_jk2 libraries, other than
    download the binary one. That is because it makes me easy to tell if
    the package was broken during the compiling time or the run time.

    -cji
    , Jun 10, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Martinoff
    Replies:
    2
    Views:
    4,166
    Alex Martinoff
    Sep 7, 2003
  2. John

    Compiling mod_jk2

    John, Sep 22, 2003, in forum: Java
    Replies:
    0
    Views:
    412
  3. Nelayan
    Replies:
    0
    Views:
    401
    Nelayan
    Sep 22, 2003
  4. John

    mod_jk2 and Apache

    John, Sep 28, 2003, in forum: Java
    Replies:
    1
    Views:
    400
  5. Joe
    Replies:
    0
    Views:
    1,657
Loading...

Share This Page