Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2005

Tip: Looking for answers? Try searching our database.

Apache2, Tomcat 4.1 and mod_jk2 question

Thread view: 
cji_work@yahoo.com - 10 Jun 2005 00:51 GMT
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
iksrazal@terra.com.br - 10 Jun 2005 14:24 GMT
I haven't done this in a while, but when I did, an article that helped
me a lot was from here:

http://galatea.com/flashguides/home

Good luck,
iksrazal
Juha Laiho - 10 Jun 2005 17:00 GMT
cji_work@yahoo.com 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?
Signature

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)

cji_work@yahoo.com - 10 Jun 2005 19:01 GMT
> cji_work@yahoo.com said:
> >I am trying to make this "Apache2, mod_jk2, Tomcat4.1" working together
[quoted text clipped - 3 lines]
> 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
Noah Fiedel - 10 Jun 2005 17:56 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.