You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Geralyn M Hollerman <gm...@louisiana.edu> on 2003/05/29 21:10:36 UTC

Apache2/Tomcat/mod_jk2/ajp13

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 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?

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 <html><body></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 where to look to solve this. I would
appreciate any ideas/comments/questions/etc.

TIA,

Lynn.
-- 
Lynn Hollerman.

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


Re: Tomcat under UML

Posted by Benjamin Temko <bt...@cxri.net>.
Hi again all,

After much pain and utterances of phrases to profane to repeat here, I have 
found the solution to the "Tomcat under UML" problem.  Simply, you have to 
have a version of UML >=2.5.50, as this fixes a SEGV crash when running some 
Java apps. Our version of UML came from apt-getting the package, which is 
older than that on the "woody" version of debian.

I give the solution here so that anyone else who has this problem can find it 
faster than I did.

Ben

On Friday 30 May 2003 10:26 am, Benjamin Temko wrote:
> Greetings, all -
>
> I have searched many different sources for information about Tomcat running
> in a UML server, and the only things I can find are documents protesting
> that it's possible.  It certainly seems as if it ought to be, since Apache
> runs right out of the box, and java applications compile and execute with
> no difficulties.  I myself have not been so lucky.  I have been running
> Tomcat for several months now under "normal" linux, happily building
> projects - this has surpassed my capacity for googling the answers.  I
> apologize in advance if this topic has been covered before - with the
> mail-archive server down it's not possible for me to check historical
> records.
>
> The pertinents:
>
> Tomcat 4.x, 5.x
> Debian Linux 4.2.18 UML
> JDK 1.3, 1.4.x
>
> I have tried all combinations of Tomcat and JDKs, but no matter what I do,
> Tomcat barfs upon startup with this message (4.x version, jdk 4.1.2beta):
>
> ===============================

<log file snipped>

> ========================================================
>
> It's not a very helpful message, as you can see - something outside of the
> JVM SEGVd, which makes sense given that I get this message no matter what
> JDK I use.  I suspect an important thread is getting inadvertantly killed
> somewhere if only because I've seen SEGV messages when killing some java
> applications which are multi-threaded (in the sense that I multi-threaded
> it myself). This is actually a little further than it usually gets, too. 
> Typically it barfs right after the line near the very top that says:
>
> Apache Tomcat/4.1.24
>
> The interesting thing is that all of the versions of the libraries in this
> UML server (I do not know why it lists each library twice in this core-dump
> sort of listing) are the same versions as the libraries on the machine
> hosting the UML server, and tomcat runs perfectly well on that machine
> (also debian 4.2.18) *outside* of the UML server.  It doesn't matter what
> version of tomcat or the JVM I use, I always get this message immediately
> after startup - I don't even get a chance to make any requests to the
> tomcat before it barfs.  It starts up, it dies.  It's always PC=0x89000000,
> and it never knows where it's happening.
>
> I've tried using Debian's apt-get to let it install everything it thinks it
> needs to run Tomcat, and it doesn't work.  I've tried installing the
> packages myself, and it doesn't work.  Has anyone else out there gotten
> Tomcat to run under UML?  What's the secret?


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


Tomcat under UML

Posted by Benjamin Temko <bt...@cxri.net>.
Greetings, all -

I have searched many different sources for information about Tomcat running in 
a UML server, and the only things I can find are documents protesting that 
it's possible.  It certainly seems as if it ought to be, since Apache runs 
right out of the box, and java applications compile and execute with no 
difficulties.  I myself have not been so lucky.  I have been running Tomcat 
for several months now under "normal" linux, happily building projects - this 
has surpassed my capacity for googling the answers.  I apologize in advance 
if this topic has been covered before - with the mail-archive server down 
it's not possible for me to check historical records.

The pertinents:

Tomcat 4.x, 5.x
Debian Linux 4.2.18 UML
JDK 1.3, 1.4.x

I have tried all combinations of Tomcat and JDKs, but no matter what I do, 
Tomcat barfs upon startup with this message (4.x version, jdk 4.1.2beta):

===============================
May 29, 2003 6:08:06 PM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
May 29, 2003 6:08:06 PM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
May 29, 2003 6:08:09 PM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
May 29, 2003 6:08:11 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 82
Starting service Tomcat-Standalone
Apache Tomcat/4.1.24
May 29, 2003 6:08:38 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 82
May 29, 2003 6:08:38 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x89000000
Function=[Unknown.]
Library=(N/A)

NOTE: We are unable to locate the function name symbol for the error
      just occurred. Please refer to release documentation for possible
      reason and solutions.


Current Java thread:

Dynamic libraries:
08048000-0804e000 r-xp 00000000 62:00 131035     
/usr/local/j2sdk1.4.2/bin/java
0804e000-0804f000 rw-p 00005000 62:00 131035     
/usr/local/j2sdk1.4.2/bin/java
40000000-40013000 r-xp 00000000 62:00 96489      /lib/ld-2.2.5.so
40013000-40014000 rw-p 00013000 62:00 96489      /lib/ld-2.2.5.so
40014000-40018000 rw-s 00000000 62:00 115096     /tmp/hsperfdata_root/2909
40018000-40025000 r-xp 00000000 62:00 96525      /lib/libpthread-0.9.so
40025000-4002c000 rw-p 0000d000 62:00 96525      /lib/libpthread-0.9.so
4002d000-4002f000 r-xp 00000000 62:00 96505      /lib/libdl-2.2.5.so
4002f000-40030000 rw-p 00001000 62:00 96505      /lib/libdl-2.2.5.so
40030000-40143000 r-xp 00000000 62:00 96495      /lib/libc-2.2.5.so
40143000-40149000 rw-p 00113000 62:00 96495      /lib/libc-2.2.5.so
4014d000-40542000 r-xp 00000000 62:00 82880      
/usr/local/j2sdk1.4.2/jre/lib/i386/client/libjvm.so
40542000-4055e000 rw-p 003f4000 62:00 82880      
/usr/local/j2sdk1.4.2/jre/lib/i386/client/libjvm.so
40570000-40581000 r-xp 00000000 62:00 96513      /lib/libnsl-2.2.5.so
40581000-40582000 rw-p 00010000 62:00 96513      /lib/libnsl-2.2.5.so
40584000-405a4000 r-xp 00000000 62:00 96510      /lib/libm-2.2.5.so
40584000-405a4000 r-xp 00000000 62:00 96510      /lib/libm-2.2.5.so
405a4000-405a5000 rw-p 0001f000 62:00 96510      /lib/libm-2.2.5.so
405a5000-405ad000 r-xp 00000000 62:00 82874      
/usr/local/j2sdk1.4.2/jre/lib/i386/native_threads/libhpi.so
405ad000-405ae000 rw-p 00007000 62:00 82874      
/usr/local/j2sdk1.4.2/jre/lib/i386/native_threads/libhpi.so
405ae000-405b8000 r-xp 00000000 62:00 96514      /lib/libnss_compat-2.2.5.so
405b8000-405b9000 rw-p 00009000 62:00 96514      /lib/libnss_compat-2.2.5.so
405b9000-405c9000 r-xp 00000000 62:00 82885      
/usr/local/j2sdk1.4.2/jre/lib/i386/libverify.so
405c9000-405cb000 rw-p 0000f000 62:00 82885      
/usr/local/j2sdk1.4.2/jre/lib/i386/libverify.so
405cb000-405eb000 r-xp 00000000 62:00 82886      
/usr/local/j2sdk1.4.2/jre/lib/i386/libjava.so
405eb000-405ed000 rw-p 0001f000 62:00 82886      
/usr/local/j2sdk1.4.2/jre/lib/i386/libjava.so
405ed000-40601000 r-xp 00000000 62:00 82888      
/usr/local/j2sdk1.4.2/jre/lib/i386/libzip.so
40601000-40604000 rw-p 00013000 62:00 82888      
/usr/local/j2sdk1.4.2/jre/lib/i386/libzip.so
40604000-406dd000 r--s 00000000 62:00 163037     
/usr/local/tomcat4/common/endorsed/xercesImpl.jar
406dd000-406fc000 r--s 00000000 62:00 163038     
/usr/local/tomcat4/common/endorsed/xmlParserAPIs.jar
406fc000-4207f000 r--s 00000000 62:00 83033      
/usr/local/j2sdk1.4.2/jre/lib/rt.jar
420c9000-420df000 r--s 00000000 62:00 82910      
/usr/local/j2sdk1.4.2/jre/lib/sunrsasign.jar
420df000-421b9000 r--s 00000000 62:00 82980      
/usr/local/j2sdk1.4.2/jre/lib/jsse.jar
421b9000-421ca000 r--s 00000000 62:00 82911      
/usr/local/j2sdk1.4.2/jre/lib/jce.jar
421ca000-42723000 r--s 00000000 62:00 82981      
/usr/local/j2sdk1.4.2/jre/lib/charsets.jar
447cb000-447ce000 r--s 00000000 62:00 98856      
/usr/local/j2sdk1.4.2/jre/lib/ext/dnsns.jar
447ce000-447d0000 r--s 00000000 62:00 146942     
/usr/local/tomcat4/server/lib/servlets-invoker.jar
4c850000-4c86c000 r--s 00000000 62:00 98855      
/usr/local/j2sdk1.4.2/jre/lib/ext/sunjce_provider.jar
4c86c000-4c879000 r--s 00000000 62:00 98858      
/usr/local/j2sdk1.4.2/jre/lib/ext/ldapsec.jar
4c879000-4c935000 r--s 00000000 62:00 98972      
/usr/local/j2sdk1.4.2/jre/lib/ext/localedata.jar
4c935000-4ce11000 r--s 00000000 62:00 99079      
/usr/local/j2sdk1.4.2/lib/tools.jar
4ce11000-4ce18000 r--s 00000000 62:00 98828      
/usr/local/tomcat4/bin/bootstrap.jar
4ce18000-4ce1b000 r--s 00000000 62:00 98827      
/usr/local/tomcat4/bin/commons-daemon.jar
4ce1b000-4ce2f000 r--s 00000000 62:00 98838      
/usr/local/tomcat4/common/lib/servlet.jar
4ce2f000-4ce74000 r--s 00000000 62:00 98839      
/usr/local/tomcat4/common/lib/mail.jar
4ce74000-4ce79000 r--s 00000000 62:00 98840      
/usr/local/tomcat4/common/lib/commons-logging-api.jar
4ce79000-4cea2000 r--s 00000000 62:00 98841      
/usr/local/tomcat4/common/lib/commons-collections.jar
4cea2000-4ceb7000 r--s 00000000 62:00 98842      
/usr/local/tomcat4/common/lib/jdbc2_0-stdext.jar
4ceb7000-4cebf000 r--s 00000000 62:00 98843      
/usr/local/tomcat4/common/lib/commons-pool.jar
4cebf000-4ceec000 r--s 00000000 62:00 98844      
/usr/local/tomcat4/common/lib/jasper-compiler.jar
4ceec000-4cef1000 r--s 00000000 62:00 98845      
/usr/local/tomcat4/common/lib/naming-factory.jar
4cef1000-4cf0a000 r--s 00000000 62:00 98846      
/usr/local/tomcat4/common/lib/jndi.jar
4cf0a000-4cf16000 r--s 00000000 62:00 98847      
/usr/local/tomcat4/common/lib/activation.jar
4cf16000-4cf28000 r--s 00000000 62:00 98848      
/usr/local/tomcat4/common/lib/jasper-runtime.jar
4cf28000-4cf32000 r--s 00000000 62:00 98849      
/usr/local/tomcat4/common/lib/naming-resources.jar 
4cf32000-4cf39000 r--s 00000000 62:00 98850      
/usr/local/tomcat4/common/lib/naming-common.jar
4cf39000-4cf49000 r--s 00000000 62:00 98851      
/usr/local/tomcat4/common/lib/commons-dbcp.jar
4cf49000-4cff9000 r--s 00000000 62:00 98852      
/usr/local/tomcat4/common/lib/ant.jar
4cff9000-4cffc000 r--s 00000000 62:00 98853      
/usr/local/tomcat4/common/lib/jta.jar
4cff9000-4cffc000 r--s 00000000 62:00 98853      
/usr/local/tomcat4/common/lib/jta.jar
4cffc000-4d050000 r--s 00000000 62:00 146938     
/usr/local/tomcat4/server/lib/mx4j-jmx.jar
4d050000-4d057000 r--s 00000000 62:00 146939     
/usr/local/tomcat4/server/lib/commons-logging.jar
4d057000-4d070000 r--s 00000000 62:00 146940     
/usr/local/tomcat4/server/lib/commons-digester.jar
4d070000-4d075000 r--s 00000000 62:00 146943     
/usr/local/tomcat4/server/lib/servlets-manager.jar
4d075000-4d07d000 r--s 00000000 62:00 146944     
/usr/local/tomcat4/server/lib/commons-modeler.jar
4d07d000-4d082000 r--s 00000000 62:00 146945     
/usr/local/tomcat4/server/lib/servlets-default.jar
4d082000-4d08c000 r--s 00000000 62:00 146946     
/usr/local/tomcat4/server/lib/tomcat-http11.jar
4d08c000-4d090000 r--s 00000000 62:00 146948     
/usr/local/tomcat4/server/lib/commons-fileupload-1.0-beta-1.jar
4d090000-4d0b7000 r--s 00000000 62:00 146949     
/usr/local/tomcat4/server/lib/tomcat-util.jar
4d0b7000-4d16d000 r--s 00000000 62:00 146950     
/usr/local/tomcat4/server/lib/catalina.jar  
4d16d000-4d18a000 r--s 00000000 62:00 146951     
/usr/local/tomcat4/server/lib/commons-beanutils.jar
4d18a000-4d19a000 r--s 00000000 62:00 146952     
/usr/local/tomcat4/server/lib/tomcat-coyote.jar
4d19a000-4d1b4000 r--s 00000000 62:00 146953     
/usr/local/tomcat4/server/lib/jaas.jar
4d1b4000-4d1b6000 r--s 00000000 62:00 146955     
/usr/local/tomcat4/server/lib/servlets-common.jar
4d1b6000-4d1bc000 r--s 00000000 62:00 146956     
/usr/local/tomcat4/server/lib/servlets-webdav.jar
4d1bc000-4d1c2000 r--s 00000000 62:00 146957     
/usr/local/tomcat4/server/lib/tomcat-warp.jar
4d1c2000-4d1c6000 r--s 00000000 62:00 146958     
/usr/local/tomcat4/server/lib/catalina-ant.jar
4d1c6000-4d1da000 r--s 00000000 62:00 146959     
/usr/local/tomcat4/server/lib/tomcat-jk2.jar
4d1da000-4d1e2000 r--s 00000000 62:00 146960     
/usr/local/tomcat4/server/lib/jakarta-regexp-1.2.jar
4d1e2000-4d1f2000 r--s 00000000 62:00 146961     
/usr/local/tomcat4/server/lib/tomcat-jk.jar
4d1f2000-4d202000 r-xp 00000000 62:00 82891      
/usr/local/j2sdk1.4.2/jre/lib/i386/libnet.so
4d202000-4d203000 rw-p 0000f000 62:00 82891      
/usr/local/j2sdk1.4.2/jre/lib/i386/libnet.so 
4d207000-4d20f000 r-xp 00000000 62:00 96516      /lib/libnss_files-2.2.5.so
4d20f000-4d210000 rw-p 00007000 62:00 96516      /lib/libnss_files-2.2.5.so
4d210000-4d261000 r--s 00000000 62:00 66854      
/usr/local/tomcat4/server/webapps/admin/WEB-INF/lib/struts.jar
4d2b2000-4d303000 r--s 00000000 62:00 66854      
/usr/local/tomcat4/server/webapps/admin/WEB-INF/lib/struts.jar

Heap at VM Abort:
Heap
 def new generation   total 576K, used 523K [0x447d0000, 0x44870000, 
0x44cb0000)
  eden space 512K,  99% used [0x447d0000, 0x4484ffa8, 0x44850000)
  from space 64K,  18% used [0x44850000, 0x44852ff8, 0x44860000)
  to   space 64K,   0% used [0x44860000, 0x44860000, 0x44870000)
 tenured generation   total 4576K, used 3722K [0x44cb0000, 0x45128000, 
0x487d0000)
   the space 4576K,  81% used [0x44cb0000, 0x45052a78, 0x45052c00, 0x45128000)
 compacting perm gen  total 6400K, used 6232K [0x487d0000, 0x48e10000, 
0x4c7d0000)
   the space 6400K,  97% used [0x487d0000, 0x48de6218, 0x48de6400, 0x48e10000)

Local Time = Thu May 29 18:08:39 2003
Elapsed Time = 36
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2-beta-b19 mixed mode)
#
# An error report file has been saved as hs_err_pid2909.log.
# Please refer to the file for further information.
#
========================================================

It's not a very helpful message, as you can see - something outside of the JVM 
SEGVd, which makes sense given that I get this message no matter what JDK I 
use.  I suspect an important thread is getting inadvertantly killed somewhere 
if only because I've seen SEGV messages when killing some java applications 
which are multi-threaded (in the sense that I multi-threaded it myself).  
This is actually a little further than it usually gets, too.  Typically it 
barfs right after the line near the very top that says:

Apache Tomcat/4.1.24

The interesting thing is that all of the versions of the libraries in this UML 
server (I do not know why it lists each library twice in this core-dump sort 
of listing) are the same versions as the libraries on the machine hosting the 
UML server, and tomcat runs perfectly well on that machine (also debian 
4.2.18) *outside* of the UML server.  It doesn't matter what version of 
tomcat or the JVM I use, I always get this message immediately after startup 
- I don't even get a chance to make any requests to the tomcat before it 
barfs.  It starts up, it dies.  It's always PC=0x89000000, and it never knows 
where it's happening.  

I've tried using Debian's apt-get to let it install everything it thinks it 
needs to run Tomcat, and it doesn't work.  I've tried installing the packages 
myself, and it doesn't work.  Has anyone else out there gotten Tomcat to run 
under UML?  What's the secret?

Best regards,

Ben


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


Re: Apache2/Tomcat/mod_jk2/ajp13

Posted by Geralyn M Hollerman <gm...@louisiana.edu>.
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Apache2/Tomcat/mod_jk2/ajp13

Posted by "Vincent J. Buonassisi" <vj...@vuit.com>.
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 <html><body></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 where to look to solve this. I would
> appreciate any ideas/comments/questions/etc.
>

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.

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.

cheers,


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