Tomcat mod_jk2

2004-11-04 Thread Lennart Mordek
Hello


I have a problem with my Tomcat and Apache2 with mod_jk2.
I bacame error logs from the Tomcat:
Can anywhere hepl me?


Lennart Mordek


[Thu Nov 04 11:38:54 CET 2004] Nov 4, 2004 11:38:54 AM
org.apache.jk.common.ChannelSocket processConnection

[Thu Nov 04 11:38:54 CET 2004] SEVERE: Error, closing connection

[Thu Nov 04 11:38:54 CET 2004] java.net.SocketTimeoutException: Read timed
out

[Thu Nov 04 11:38:54 CET 2004] at
java.net.SocketInputStream.socketRead0(Native Method)

[Thu Nov 04 11:38:54 CET 2004] at
java.net.SocketInputStream.read(SocketInputStream.java:129)

[Thu Nov 04 11:38:54 CET 2004] at
java.io.BufferedInputStream.fill(BufferedInputStream.java:183)

[Thu Nov 04 11:38:54 CET 2004] at
java.io.BufferedInputStream.read1(BufferedInputStream.java:222)

[Thu Nov 04 11:38:54 CET 2004] at
java.io.BufferedInputStream.read(BufferedInputStream.java:277)

[Thu Nov 04 11:38:54 CET 2004] at
org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:487)

[Thu Nov 04 11:38:54 CET 2004] at
org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:425)

[Thu Nov 04 11:38:54 CET 2004] at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:540)

[Thu Nov 04 11:38:54 CET 2004] at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:654)

[Thu Nov 04 11:38:54 CET 2004] at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)

[Thu Nov 04 11:38:54 CET 2004] at java.lang.Thread.run(Thread.java:536)





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Apache2/Tomcat/mod_jk2/ajp13

2003-05-30 Thread Geralyn M Hollerman
I want to connect Apache and Tomcat.

The versions I have available to me are:

Apache 2.0.45
Tomcat 4.0.4

I have tried both mod_jk and mod_jk2 with no success. 

I have read several FAQs, HOW-TOs and other documents on the Web and
read countless messages about doing this.

In my server.xml, I am using Ajp13Connector, as I get a ClassNotFound
in catalina.out if I try and use the CoyoteConnector.

As I understand from what I have read, for mod_jk I would need to create
a worker.properties file and put this in my {Tomcat}/conf directory -
this is all it contains:
workers.properties -
workers.tomcat_home=/home/gmh2441/uPortal/Tomcat_4-0-4
workers.java_home=/pkgs2/j2se
ps=/
worker.list=ajp13
worker.ajp13.port=8089
worker.ajp13.host=poivre.ucs.louisiana.edu
worker.ajp13.type=ajp13
---workers.properties -

Then I would have to make some modifications to the Apache httpd.conf
file, like so:

---from httpd.conf ---
  JkWorkersFile
/home/gmh2441/uPortal/Tomcat_4-0-4/conf/workers.properties
  JkLogFile /home/gmh2441/uPortal/Tomcat_4-0-4/logs/mod_jk.log
  JkLogLevel debug
  JkOptions +ForwardDirectories
  Alias /examples /home/gmh2441/uPortal/Tomcat_4-0-4/webapps/examples
  Directory /home/gmh2441/uPortal/Tomcat_4-0-4/webapps/examples
Options Indexes FollowSymLinks
  /Directory  
  Location /examples/WEB-INF/
AllowOverride None
deny from all
  /Location  

  JkMount /examples/jsp/* ajp13
---from httpd.conf 

I tried this, using mod_jk v. 1.2.3; if I browsed to
http://poivre.ucs.louisiana.edu/examples/jsp, I would get the index.html
that displays the list of examples, and I could view their source code.
However, if I clicked on the Execute link (any one), I would get the
source code for the .jsp that was supposed to be executed. I tried some
variations on the JkMount directive, but nothing would make the .jsp be
executed. I couldn't find anything on the Net about my particular
combination of Tomcat and Apache, but I did read that mod_jk2 was
supposed to be a complete re-write of mod_jk, so I thought I'd try that
one.

In looking around the Web for info for jk2, I found a document on
intergrating Apache 2.0.39, Tomcat 4.0.4, and mod_jk2; I followed this
to the letter the best I could. It agreed with another message I read
about how with Apache 2 it was possible to either embed your mod_jk2
configurationinto httpd.conf or use seperate files for it - the person
writing the document said that none of his mod_jk2 configuration was
embedded in his httpd.conf, so that he wouldn't need to reformat the
configs if he needed to change to another version of Tomcat. The only
modification to his httpd.conf file was the line

LoadModule jk2_module modules/mod_jk2.so

For mod_jk2, this jk2 configuration was done using 2 files,
jk2.properties and worker2.properties. 
jk2.properties goes in the {Tomcat}/conf directory, while
workers2.properties goes in {Apache}/conf. jk2.properties is supposed to
allow you to override and set various values on the tomcat side of
mod_jk2 - here's what mine looked like:

---jk2.properties ---
#list of needed handlers
handler.list=apr,channelSocket,request

#Set the derault port for the channelSocket
channelSocket.port=8089

#Information about a UNIX domain socket - we don't have this.
Supposedly, the 
#UNIX domain socket is used for speed only
#if this is used, add channelUnix to the handler.list above
#channel.Unix.file=/home/gmh2441/uPortal/Tomcat_4-0-4/work/jk2.socket

#Dynamic library
serverRoot=/opt/apache

# This will enable the starting of the Tomcat from mod_jk2
apr.jniModeSo=/opt/apache/modules/mod_jk2.so

---jk2.properties ---

And here begin my questions.

- I cannot find a jk2.socket file anywhere - is this somewhere in the
Tomcat configs?

- notice the directory /apache - this is acutally a symbolic link (I'm
on a UNIX system) - the directory is actually called httpd-2.0.45 -
I've tried using the different names for it, and it doesn't seem to
matter - or does it?

- as far as the UNIX domain socket and dynamic library go, the document
said that without the dynamic library section the UNIX domain socket
would fail, but a regular TCP/IP socket would still work. but UNIX
domain sockets were much, much faster. So does that mean I should
removed the part about the dynamic library if I'm using TCP/IP sockets?

Here is workers2.properties, found in {Apache}/conf

---workers2.properties ---
[shm]
file=/var/adm/httpd-shm.mod_jk2
size=1048576

# Example socket channel
[channel.socket:poivre.ucs.louisiana.edu:8089]
info=Ajp13 forwarding over socket
tomcatId=poivre.ucs.louisiana.edu:8089

#Needed for UNIX domain socket - but we don't have that
#[channel.un:/home/gmh2441/uPortal/Tomcat_4-0-4/work/jk2.socket]
#tomcatId=poivre.ucs.louisiana.edu:8089
#debug=0

# define the worker
[ajp13:poivre.ucs.louisiana.edu:8089]
#This uses the TCP/IP socket instead of the UNIX domain socket
channel=channel.socket:poivre.ucs.louisiana.edu:8089
#Uncomment the next line to use the 

Re: Apache2/Tomcat/mod_jk2/ajp13

2003-05-30 Thread Vincent J. Buonassisi
i wish i could better help you but i am having problems as well in 
trying to get these components working together.  but, i will try to 
give you meager comments based on my reading/experience.

one question: were you able to get rid of the mod_jk2 error at startup 
in apache ([error] mod_jk child init 1 0) that you wrote about earlier?

also:

---jk2.properties ---
#list of needed handlers
handler.list=apr,channelSocket,request
#Set the derault port for the channelSocket
channelSocket.port=8089
#Information about a UNIX domain socket - we don't have this.
Supposedly, the
#UNIX domain socket is used for speed only
#if this is used, add channelUnix to the handler.list above
#channel.Unix.file=/home/gmh2441/uPortal/Tomcat_4-0-4/work/jk2.socket
#Dynamic library
serverRoot=/opt/apache
# This will enable the starting of the Tomcat from mod_jk2
apr.jniModeSo=/opt/apache/modules/mod_jk2.so
---jk2.properties ---

And here begin my questions.

- I cannot find a jk2.socket file anywhere - is this somewhere in the
Tomcat configs?
i believe that the file jk2.socket should be created on the tomcat side 
when tomcat starts up and reads the jk2.properties file (i think that 
the file is read if you have defined a jk2 connector in the server.xml 
file).  however, i see that you have the line for creating this socket 
commented out and you also don't list the unix domain socket 
(channelUnix) in the handler list handler.list.

- notice the directory /apache - this is acutally a symbolic link 
(I'm
on a UNIX system) - the directory is actually called httpd-2.0.45 -
I've tried using the different names for it, and it doesn't seem to
matter - or does it?

it shouldn't matter.

- as far as the UNIX domain socket and dynamic library go, the document
said that without the dynamic library section the UNIX domain socket
would fail, but a regular TCP/IP socket would still work. but UNIX
domain sockets were much, much faster. So does that mean I should
removed the part about the dynamic library if I'm using TCP/IP sockets?
Here is workers2.properties, found in {Apache}/conf

---workers2.properties ---
[shm]
file=/var/adm/httpd-shm.mod_jk2
size=1048576
# Example socket channel
[channel.socket:poivre.ucs.louisiana.edu:8089]
info=Ajp13 forwarding over socket
tomcatId=poivre.ucs.louisiana.edu:8089
#Needed for UNIX domain socket - but we don't have that
#[channel.un:/home/gmh2441/uPortal/Tomcat_4-0-4/work/jk2.socket]
#tomcatId=poivre.ucs.louisiana.edu:8089
#debug=0
# define the worker
[ajp13:poivre.ucs.louisiana.edu:8089]
#This uses the TCP/IP socket instead of the UNIX domain socket
channel=channel.socket:poivre.ucs.louisiana.edu:8089
#Uncomment the next line to use the UNIX domain socket
#channel=channel.un:/home/gmh2441/uPortal/Tomcat_4-0-4/work/jk2.socket
#Announce a status worker
[status:status]
# Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
info=Map the whole webapp
worker=ajp13:poivre.ucs.louisiana.edu:8089
#Uncomment the next line to use the UNIX domain socket
#worker=ajp13:/home/gmh2441/uPortal/Tomcat_4-0-4/work/jk2.socket
#info=Map the whole examples webapp
[uri:/jkstatus/*]
worker=status:status
---workers2.properties ---

Something else I've seen, under that #Example socket channel entry is
that the port and host need to be explicity set, thusly:
port=8089
host=130.70.132.204
(127.0.0.1 for localhost)
 - Does this info have to be there as well?a
All this configuration info is based on the document on Apache 2, 
Tomcat
4.0.4 and mod_jk2 I found at http://www.pubbitch.org/jboss/mod_jk2.html
- and according to this document, once these config files have been
written and installed in the correct places, I need to start Tomcat,
then Apache. First, I should view a normal tomcat connection by
referencing a URL ending in 8080, or the port that the standard http
connector is on. Then, (assuming the URL has been mapped in
workers2.properties)(like /examples/*, I assume) try the equivalent
URL by connecting to Apache instead - I take it that this last sentence
means that if the first URL
 I viewed was, say, http://poivre.ucs.louisiana.edu:8080/examples, the
next URL I should try would be http://poivre.ucs.louisiana.edu/examples
- and I should get the same result, if the connector is working.

Well, according to that status worker, and my Apache log, the mod_jk2
connector is installed and working fine. However, all I get going to
that second URL is a blank page - even in the source of the page, all
that's there is htmlbody/body/html. A httpd-xfer log file I 
have
shows that each request returns a 400 (Bad Request), however when I go
to /jkstatus instead, I get a 200 and a page with tables, showing
various values and other information. I have tried this in several
different browsers - that is one reason I haven't been using 
localhost
but instead use my server's name - I can try it on a nearby PC as well.

None of the docs I've found as yet tell me what to do if things don't 
go
right - I'm not sure just 

Re: Apache2/Tomcat/mod_jk2/ajp13

2003-05-30 Thread Geralyn M Hollerman
At 04:51 PM 5/29/2003 -0700,  Vincent J. Buonassisi wrote:
i wish i could better help you but i am having problems as well in trying 
to get these components working together.  but, i will try to give you 
meager comments based on my reading/experience.

Thanks! I appreciate it - it seems I have read so many different views
of 
what to do for this, I'm never sure if I'm understanding everything I
read 
the way it was meant! It's good to hear from someone who is going thru
the 
same thing I am!

one question: were you able to get rid of the mod_jk2 error at startup in 
apache ([error] mod_jk child init 1 0) that you wrote about earlier?

Not today, no. I never got a response to the question about it, but I
guess 
it wasn't hurting anything - at least that I could see. Maybe that's the 
source of all my problems? I don't know!

i believe that the file jk2.socket should be created on the tomcat side 
when tomcat starts up and reads the jk2.properties file (i think that the 
file is read if you have defined a jk2 connector in the server.xml 
file).  however, i see that you have the line for creating this socket 
commented out and you also don't list the unix domain socket (channelUnix) 
in the handler list handler.list.

I read that the jk2.socket file was created by Tomcat - but I thought
I'd 
see a sample one SOMEWHERE. Where did I define the jk2.properties file? 
Hmm, I can't remember right off, but that location sounds right. I
wasn't 
familiar with the notion of a UNIX domain socket, and I didn't come
across 
that until late in my reading, so I don't think that part is vital, as
long 
as TCP/IP sockets are used by default, and of course both Tomcat and
Apache 
have the same references in their configs.

have you looked at all of the tomcat log files (catalina.out, etc) to see 
if there are any errors?  i've noticed that errors will not be identified 
w/ an 'error' tag but will be embedded in w/ the rest of the informational 
logging messages.

Is there some way of getting more informational messages (like adding a 
timestamp) into catalina.out? I haven't looked at that all that much,
but 
about all I see is stuff like Starting service Tomcat Apache - it'd be 
nice(and helpful) to see more info! I *think* I'm looking at the right 
logs...it'd be nice if there was a log for mod_jk2, tho I did see how to 
define a status worker for it to prove to me that mod_jk2 was ok...

i have not tried using tcp/ip sockets to see if i get the same results 
that you do.  but, i will try it to see if i get better results.

Like I mentioned, I didn't use UNIX sockets as I didn't see them
mentioned 
until late in my reading. UNIX sockets are supposed to be  much, much 
faster than TCP/IP sockets and are supposed to offer better performance
- 
well, without this working as it is supposed to, I can't confirm that as 
being true or false!

Now, I have also tried mod_jk; using that gets rid of that first
[error] 
we were talking about (which is something I don't understand - I get the 
error with mod_jk*2*, but the error itself refers to mod_jk - did
someone 
just forget to update the error message?), and I get a little further -
as 
in, instead of getting a blank page and an 400 (bad request) message in
my 
apache log, I get a static page (usually a .html page, like index.html
for 
the Tomcat examples), and then the 400 message in the log when I go to 
execute a .jsp or a .class file.

I think I've beaten server.xml and httpd.conf about to death; maybe
there's 
something in, say, web.xml that I need to be looking at?

Thanks for the reply!

Lynn Hollerman.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache 2.0.40 + Tomcat + mod_jk2 SSL

2002-10-23 Thread Robert L Sowders
Did you uncomment the invoker in the TOMCAT_HOME/conf/web.xml file. It's 
commented out by default.

!-- The mapping for the invoker servlet --
!--
servlet-mapping
servlet-nameinvoker/servlet-name
url-pattern/servlet/*/url-pattern
/servlet-mapping
--

rls





Chris Ramsay [EMAIL PROTECTED]
10/23/2002 04:40 AM
Please respond to Tomcat Users List

 
To: [EMAIL PROTECTED]
cc: 
Subject:Apache 2.0.40 + Tomcat + mod_jk2 SSL

Hi,
I am having problems getting Apache to pass SSL connections to Tomcat via 
mod_jk2.
Standard connections work fine but when opening to 
https://mysite.com/project/servlet/MyServlet I get an Apache 404 error.
https://mysite.com works fine as well.

The versions I am using are:
OS: Red Hat Linux 8.0 (Kernel 2.4.18-14smp)
Apache 2.0.40
Tomcat 4.1.12
mod_jk2

Apart from that the SSL config is pretty much the standard one, as is the 
Apache config. I can send the jk2 properties files if necessary.

Thanks for any help,
Chris.



_
Internet access plans that fit your lifestyle -- join MSN. 
http://resourcecenter.msn.com/access/plans/default.asp


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org





--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Apache 2.0.40 + Tomcat + mod_jk2 SSL

2002-10-23 Thread Chris Ramsay
Hi,
I am having problems getting Apache to pass SSL connections to Tomcat via 
mod_jk2.
Standard connections work fine but when opening to 
https://mysite.com/project/servlet/MyServlet I get an Apache 404 error.
https://mysite.com works fine as well.

The versions I am using are:
OS: Red Hat Linux 8.0 (Kernel 2.4.18-14smp)
Apache 2.0.40
Tomcat 4.1.12
mod_jk2

Apart from that the SSL config is pretty much the standard one, as is the 
Apache config. I can send the jk2 properties files if necessary.

Thanks for any help,
Chris.



_
Internet access plans that fit your lifestyle -- join MSN. 
http://resourcecenter.msn.com/access/plans/default.asp


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org



Re: Apache 2.0.40 + Tomcat + mod_jk2 SSL

2002-10-23 Thread Chris Ramsay
Hi,
I managed to correct my own problem.
Needed to add:
Location /myproject
  JkUriSet worker ajp13:localhost:8009
/Location

into the VirtualHost part of my ssl.conf file.
Another problem I seem to be having is that only 1 tomcat thread is running. 
Anyone else having this problem (if it is a problem)?




Hi,
I am having problems getting Apache to pass SSL connections to Tomcat via 
mod_jk2.
Standard connections work fine but when opening to 
https://mysite.com/project/servlet/MyServlet I get an Apache 404 error.
https://mysite.com works fine as well.

The versions I am using are:
OS: Red Hat Linux 8.0 (Kernel 2.4.18-14smp)
Apache 2.0.40
Tomcat 4.1.12
mod_jk2

Apart from that the SSL config is pretty much the standard one, as is the 
Apache config. I can send the jk2 properties files if necessary.

Thanks for any help,
Chris.



_
Internet access plans that fit your lifestyle -- join MSN. 
http://resourcecenter.msn.com/access/plans/default.asp


--
To unsubscribe, e-mail:   
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: 
mailto:tomcat-user-help;jakarta.apache.org


_
Get faster connections -- switch to MSN Internet Access! 
http://resourcecenter.msn.com/access/plans/default.asp


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org