Apache2, Tomcat 4.1 and mod_jk2 question

C

cji_work

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
 
J

Juha Laiho

(e-mail address removed) 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?
 
N

Noah Fiedel

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
 
C

cji_work

Juha said:
(e-mail address removed) said:

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top