Connectivity issues between Tomcat 6.0.35 and Apache 2.2 Web Server
Hi,
I am new to linux and been trying to setup and configure Different servers on my own obviously with many difficulties :) I have been trying to configure Tomcat Server with Apache through mod_jk. Have configured the servers but seems that the connectivity is broken somewhere. I am guessing this for two reasons 1: When i am opening the link to my site which is hosted on a vps server. I could see the html pages but the JSP pages opens as an html or it displays the whole code. There is no error message displayed. 2:The mod_jk.log file does not have anything, its empty. Also when i checked the error_logs I cud see only a suucceful meesage for apche nothing about mod_jk Mentioned bellow is the configuration in the httpd.conf Workers.properties server.xml httpd.conf LoadModule jk_module modules/mod_jk.so JkWorkersFile /etc/httpd/conf/workers.properties JkLogFile conf/mod_jk.log JkLogLevel error JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 Workers.properties workers.tomcat_home=/opt/tomcat/apache-tomcat-6.0.35 workers.java_home=/opt/java/jdk1.6.0_26 ps=/ worker.list=tomcat,loadbalancer worker.tomcat.port=8009 worker.tomcat.host=111.118.214.126 #worker.tomcat.host=localhost worker.tomcat.type=ajp13 worker.tomcat.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=tomcat worker.loadbalancer.sticky_session=1 |
Hi,
AFAIK in recent apache/mod_jk versions, the mod_jk related derectives should be inside a vhost container. E.g. Code:
<VritualHost *:80> Quote:
Quote:
Code:
JkMount /*.jsp tomcat Regards |
Thanks for the Promt response , bathory. I did change the definition for the workers in the properties file as as you suggested but am still facing the same issue.
However, when I looked at the catalina.output i saw this which seems to be a problem, NFO: Deploying web application directory _notes Jan 15, 2012 1:18:18 AM org.apache.coyote.http11.Http11Protocol start SEVERE: Error starting endpoint java.net.BindException: Address already in use <null>:80 at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:549) at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:565) at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:203) at org.apache.catalina.connector.Connector.start(Connector.java:1122) at org.apache.catalina.core.StandardService.start(StandardService.java:540) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: java.net.BindException: Address already in use I kept changing the port in server.xml from 8080 to 8085 and finally 80 but its the same error message. Mentioned below are the parameters from my server.xml <!-- A "Connector" represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html (blocking & non-blocking) Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL HTTP/1.1 Connector on port 8080 --> <Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> I read somewhere that Tomcat server cud only suffice to the requirement of hosting html + jsp pages but its usually slow. Is this true.. ? Are there any setbacks using Tomcat only as the web server. In a panic mode I thot i must try this and I closed Apache server and with all the settings and changes in place started Tomcat and checked on the broswer Where i was welcomed by a jakarta page , however when i changed the address to "www.mydomain.com/folder where i am keeping my files/index.html it opened the html page. And alll the JSP pages were working. Could anyone of you please suggest how can i tell Tomcat to point the domain to Index.html In apache i have made a virtual server and then have directed it to use the the path where all my jsp + html pages are located. Many Thanks for your help |
Quote:
Quote:
Quote:
Regards |
Thanks a lot , bathory. That solved my problem .. For now I am using Tomcat as a server even in production wanted to perform some testing but wud look side by side at the issues with Apache and tomcat server integration at my end. Seems I must be missing something here or there at my end.
Would take that further again on the same thread maybe. Many Thanks for your help Cheers!! |
All times are GMT -5. The time now is 10:26 PM. |