tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Volker <tom...@webchannel.de>
Subject Re: Problems after updating from Tomcat 3.3 to 4.1: http tunneling servlet not working anymore
Date Wed, 27 Jul 2011 11:08:33 GMT
Hallo Felix,

I considered all tips you gave. Thanks again.

Like mentioned before my configuration was running correctly but I could 
not notice that because the http tunneling does need much more time 
(first request of the httptunnelingdc-Servlet (I check this out in 
Apache?s log-file) than my former configuration with tomcat.

Now I wonder how I can tune something (Simultaneously I will install 
tomcat 7.x) because I do not know if the slow-performance-problem 
depends on tomcat settings or maybe on the Diablo-Java-Settings?

The combination with tomcat 3.3, apj12, mod_jk, Diablo JRE 1.5 and 
apache 1.3 results in opening the chat window via http tunneling in *a 
few seconds* if you blocked all ports except port 80 before for Java 
(Browser).
With tomcat 4.1 the same procedure needs nearly 3 minutes.

Any idea?

Thanks and best regards

V o l k e r


Am 26.07.2011 19:54, schrieb Felix Schumacher:
> Hi Volker,
>
> Am Dienstag, den 26.07.2011, 16:29 +0200 schrieb Volker:
>> Hello,
>>
>> my current system configuration is like following:
>>
>> - FreeBSD 8.2
>> - apache-2.2.17_2
>> - mod_jk-ap2-1.2.31_1 Apache2 JK
>> - tomcat 4.1.36_2
> As you said elsewhere in this thread, that you are willing to upgrade to
> a newer tomcat as well, I will assume, that you will use tomcat 6 or
> even tomcat 7.
>> - diablo-jdk1.6.0
>>
>> In order to provide a http tunneling for a chat server I have been
>> using*tomcat 3.3*, FreeBSD 5.4, Apache 1.3, mod_jk (ajp12 Connector) and
>> diablo-jre1.5.0 in combination with a certain http tunneling servlet
>> *without any problems* for several years.
>> That http tunneling servlet is passed via a chat applet via "<PARAM
>> NAME='HttpServlet'
>> VALUE='http://test.Domain.com/servlet/*HttpTunnelingServletdc*'>
>> The configuration for that system above _*can be found below*_ *=>
>> Configuration for tomcat 3.3
> That looks like you are using the strongly discouraged dispatcher
> servlet. That is still available, but disabled by default. And you
> should leave it that way.
> ...
>> Thanks a lot and best regards
>>
>> Volker
>> *
>> ============================================================================
>> NOT WORKING
>> Configuration for Tomcat 4.1.36 (FreeBSD 8.2, Apache 2.2.17,
>> mod_jk-ap2-1.2.31, Diablo JDK 1.6)
>> **============================================================================
>>
>> The servlet classes result in:
>> */usr/local/apache-tomcat4.1/webapps/ROOT/WEB-INF/classes*
>> */usr/local/apache-tomcat4.1/webapps/ROOT/WEB-INF/classes*/*com/....*
>> */usr/local/apache-tomcat4.1/webapps/ROOT/WEB-INF/classes/digi/...
> I read that as: There are some files and directories under
> WEB-INF/classes in your ROOT webapp and that /usr/local/apache-tomcat4.1
> is your CATALINA_BASE and probably CATALINA_HOME too.
>> ...
>> *
>> httpd.conf
>> *JkWorkersFile "/usr/local/etc/apache22/workers.properties"
>> JkLogFile "/usr/local/apache-tomcat4.1/logs/mod_jk.log"
>> JkShmFile /var/log/jk-runtime-status
>> JkLogLevel info
> Looks OK.
>> *
>> workers.properties
>> *workers.java_home=/usr/local/diablo-jdk1.6.0
>> workers.tomcat_home=/usr/local/apache-tomcat4.1
> Remove both deprecated config options java_home and tomcat_home. They
> are not needed anymore.
>> worker.list=jsp-hostname
>> worker.jsp-hostname.port=8009
>> worker.jsp-hostname.host=127.0.0.1
>> worker.jsp-hostname.type=ajp13
>> worker.jsp-hostname.lbfactor=1*
>>
>> **server.xml*
> Copy the server.xml from a fresh tomcat download and replace your
> port-numbers in there.
>
>> <Service name="Tomcat-Standalone">
> ...
>
>> <!-- Tomcat Root Context -->
>>
>> <Context path="/ROOT" docBase="ROOT" debug="0" reloadable="true"
>> crossContext="true">
>> <Logger className="org.apache.catalina.logger.FileLogger"
>> prefix="ROOT-http-tunneling_log." suffix=".txt" timestamp="true"/>
>> </Context>
>>
>> <!-- Tomcat Examples Context -->
>> <Context path="/examples" docBase="examples" debug="1" reloadable="true"
>> crossContext="true">
>> <Logger className="org.apache.catalina.logger.FileLogger"
>> prefix="localhost_examples_log." suffix=".txt" timestamp="true"/>
>> <Ejb   name="ejb/EmplRecord" type="Entity"
>>                    home="com.wombat.empl.EmployeeRecordHome"
>>                  remote="com.wombat.empl.EmployeeRecord"/>
> Your context descriptions for ROOT and example would be placed in newly
> created files named ROOT.xml and example.xml under
> $CATALINA_BASE/conf/Catalina/localhost. But I seriously doubt, that you
> need example.xml and ROOT.xml is not needed, if all you want to achieve
> is logging. Look at http://tomcat.apache.org/tomcat-7.0-doc/logging.html
> for more info about simple logging.
>>
>> *web.xml*
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> <!DOCTYPE web-app
>>       PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>>       "http://java.sun.com/dtd/web-app_2_3.dtd">
> You could update your webapp to a newer version by replacing the above
> values, but they should do no harm.
>> <web-app>
>> <servlet>
>> <servlet-name>
>>        HttpTunnelingServletdc
>> </servlet-name>
>> <servlet-class>
>> *com.diginet.digichat.util.tunnel3.HttpTunnelingServlet*
>> </servlet-class>
>> <init-param>
>> <param-name>Host</param-name>
>> <param-value>localhost</param-value>
>> </init-param>
>> <load-on-startup>1</load-on-startup>
>> </servlet>
>> <servlet-mapping>
>> <servlet-name>invoker</servlet-name>
>> <url-pattern>/servlet/*</url-pattern>
>> </servlet-mapping>
>> <servlet-mapping>
>> <servlet-name>HttpTunnelingServletdc</servlet-name>
>> <url-pattern>/HttpTunnelingServletdc</url-pattern>
>> </servlet-mapping>
> Instead of mapping a not configured servlet named invoker to /servlet/*
> you should map your servlet named HttpTunnelingServletdc
> to /servlet/HttpTunnelingServletdc or alternatively change your applet
> configuration from top of your post.
>
> So remove
> <servlet-mapping><servlet-name>invoker</servlet-name>...</servlet-mapping>
> and change url-pattern in the<servlet-mapping>
> from /HttpTunnelingServletdc to /servlet/HttpTunnelingServletdc
>> </web-app>
>>
> ...
>> *description* _The server encountered an internal error () that
>> prevented it from fulfilling this request._
>>
>> *exception*
>>
>> javax.servlet.ServletException
>> 	at com.diginet.digichat.util.tunnel3.HttpTunnelingServlet.doGet([DashoPro-V1.3BETA-091199])
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> ...
>> 	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
>> 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
>> 	at java.lang.Thread.run(Thread.java:619)
>>
>> *root cause*
>>
>> java.lang.NullPointerException
>> 	at com.diginet.digichat.util.tunnel3.HttpTunnelingServlet.doGet([DashoPro-V1.3BETA-091199])
> Hopefully you have the source code for HttpTunnelingServlet since this
> line means, your servlet gets invoked, but it is not happy to work :)
> That might come from the fact, that you configured the servlet
> HttpTunnelingServletdc, but used the invoker-servlet. Chances are, that
> the proposed configuration chages in web.xml fix this.
>
> HTH
>   Felix
>
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199)
>> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145)
> ...
>> ------------------------------------------------------------------------
>>
>>
>>        Apache Tomcat/4.1.3
>>
>>
>> ===================================================================================
>> *WORKING
>> Configuration for tomcat 3.3 (FreeBSD 5.4, Apache 1.3.41, Tomcat 3.3.2,
>> mod_jk 1.2.15, Diablo JRE 1.5)
>> **============================================================================*
>> *
>> SERVER.XML
>> * (jakarta-tomcat3.3/conf)
>> <Ajp12Connector port="8007" />
>>
>> *web.xml*
>> (/jakarta-tomcat3.3/webapps/ROOT/WEB-INF)
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>
>> <!DOCTYPE web-app
>>       PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>>       "http://java.sun.com/dtd/web-app_2_3.dtd"><web-app>
>> <servlet>
>> <servlet-name>
>>        HttpTunnelingServletdc
>> </servlet-name>
>> <servlet-class>
>>        com.diginet.digichat.util.tunnel3.HttpTunnelingServlet
>> </servlet-class>
>> <init-param>
>> <param-name>Host</param-name>
>> <param-value>localhost</param-value>
>> </init-param>
>> <load-on-startup>1</load-on-startup>
>> </servlet>
>> <servlet-mapping>
>> <servlet-name>HttpTunnelingServlet</servlet-name>
>> <url-pattern>/HttpTunnelingServlet</url-pattern>
>> </servlet-mapping>
>> </web-app>
>>
>> *workers.properties*
>> worker.ajp12.type=ajp12
>> worker.ajp12.port=8007
>> worker.ajp12.host=localhost
>> worker.ajp12.lbfactor=1
>>
>> *mod_jk.conf*
>> <IfModule !mod_jk.c>
>>     LoadModule jk_module /usr/local/libexec/apache/mod_jk.so
>> </IfModule>
>> JkWorkersFile "/usr/local/jakarta-tomcat3.3/conf/jk/workers.properties"
>> JkLogFile "/usr/local/jakarta-tomcat3.3/logs/mod_jk.log"
>> JkShmFile /var/log/jk-runtime-status
>> JkLogLevel info
>> JkMount /servlet/* ajp12
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message