Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TOMCAT configuration problem

Status
Not open for further replies.

amimusa

IS-IT--Management
Jun 7, 2006
3
ES
Hello All,

It's my first incursion in tomcat, in fact I know it 'cos one user of my free-server ( need it. I don't know nothing about java.

I installed the .deb packages of
tomcat4.1
apache-mod-jk

and finally i decided to install java-sun instead free-java from sun site.

I followed instructions founded in the WEB to set up PATHs, and so.

I run the starup script as root.

govinda:~# sh /usr/share/tomcat4/bin/startup.sh
Using CATALINA_BASE: /usr/share/tomcat4
Using CATALINA_HOME: /usr/share/tomcat4
Using CATALINA_TMPDIR: /usr/share/tomcat4/temp
Using JAVA_HOME: /usr/lib/jdk

All look like fine, but i can't access to
I've opened the port 8080 in the router pointing to the server. (I've already have done before)

I checked the log and I have the error talking about the NOT existence of
/usr/share/tomcat4/webapps/tomcat-docs

I've created it.

I run again, and now I don¡t get new log message.

The result is that when I try to access to I have an alert window which inform me that the connection was refused.

Please, I'm lost. Any help ?

Thanks for your time.
 
Is the tomcat process is up? Have you found any errors in catalina.out and localhost_access_log files.

Try and find out whether port is open
#netstat -a |grep 8080
if open then try and connect to port
#telnet localhost 8080
you should be able to see something like below
******
Trying...
Connected to localhost.
Escape character is '^]'.
******

Post the server.xml file contents here.


aixnag
IBM Certified Specialist - P-series AIX 5L Administration
IBM Certified Specialist - AIX V4 HACMP
IBM eServer Certified Specialist – p690 Technical Support
IBM Certified Solutions Expert - DB2 UDB V7.1 Database Administration for Unix, Linux, Windows and OS/2
 
I can't connect via telnet but I don't have telnet enabled. Anyway, here is my NAPT Server in the router:

Command-> show naptserver
--- NAPT Server Information

Transport Service Server
tcp imap /143 192.168.0.9
tcp ssh /22 192.168.0.9
tcp ftp /21 192.168.0.9
tcp 8080 192.168.0.9
tcp http /80 192.168.0.9
tcp smtp /25 192.168.0.9
udp domain/53 192.168.0.9
tcp 995 192.168.0.9
tcp 993 192.168.0.9
tcp pop3 /110 192.168.0.9
tcp domain/53 192.168.0.9

I type netstat | grep 8080 and i don't get nothing.

Now I go with the server.xml paste, but i didn't edit this file. Note: ... too long !!! :)

Since I saw the configuration of the server to 8005 port, I opened that port instead the other one...

Thanks for your time. If you have time and want, I can open the door to the server if you can help me to fix that. If this is the case, please give me your private address to send you the data.

Me and overall arjun (the man who needs) will be eternally thankfull.

To know about the philosophy of .:: Govinda ::. you can check
- -
Thank you very much for your time.

<Server port="8005" shutdown="SHUTDOWN" debug="0">


<!-- Uncomment these entries to enable JMX MBeans support -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
debug="0"/>

<!-- Global JNDI resources -->
<GlobalNamingResources>

<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>

<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved">
</Resource>
<ResourceParams name="UserDatabase">
<parameter>
<name>factory</name>
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
</parameter>
<parameter>
<name>pathname</name>
<value>conf/tomcat-users.xml</value>
</parameter>
</ResourceParams>

</GlobalNamingResources>

<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" (and therefore the web applications visible
within that Container). Normally, that Container is an "Engine",
but this is not required.

Note: A "Service" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->

<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Tomcat-Standalone">

<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Each Connector passes requests on to the
associated "Container" (normally an Engine) for processing.
-->

<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8180 -->
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8180" minProcessors="5" maxProcessors="75"
enableLookups="true" acceptCount="10" debug="0"
connectionTimeout="20000" useURIValidationHack="false" />

<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8009" minProcessors="5" maxProcessors="75"
enableLookups="true" acceptCount="10" debug="0"
connectionTimeout="20000" useURIValidationHack="false"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host). -->

<!-- Define the top level container in our container hierarchy -->
<Engine name="Standalone" defaultHost="localhost" debug="0">

<!-- Global logger unless overridden at lower levels -->
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_" suffix=".log" timestamp="true"/>

<!-- Because this Realm is here, an instance will be shared globally -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
debug="0" resourceName="UserDatabase"/>

<!-- Define the default virtual host -->
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">

<!-- Logger shared by all Contexts related to this virtual host. -->
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="localhost_" suffix=".log"
timestamp="true"/>

<!-- Allow symlinks for the tomcat-docs webapp. This is required in
the Debian packages to make the Servlet/JSP API docs work. -->
<Context path="/tomcat-docs" docBase="tomcat-docs" debug="0">
<Resources className="org.apache.naming.resources.FileDirContext"
allowLinking="true" />
</Context>

</Host>

</Engine>

</Service>

<!-- Define an Apache-Connector Service -->
<!--
<Service name="Tomcat-Apache">

<Connector className="org.apache.catalina.connector.warp.WarpConnector"
port="8008" minProcessors="5" maxProcessors="75"
enableLookups="true" appBase="webapps"
acceptCount="10" debug="0"/>

<Engine className="org.apache.catalina.connector.warp.WarpEngine"
name="Apache" debug="0">

<Logger className="org.apache.catalina.logger.FileLogger"
prefix="mod_webapp_" suffix=".log" timestamp="true"/>

<Realm className="org.apache.catalina.realm.MemoryRealm" />

</Engine>

</Service>
-->

</Server>
 
Hi

****************
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8180" minProcessors="5" maxProcessors="75"
enableLookups="true" acceptCount="10" debug="0"
connectionTimeout="20000" useURIValidationHack="false" />
****************

The above lines in server.xml indicates server is configured to run on 8180 instead of 8080.

In this case try
#netstat -a |grep 8180
If you found port open, then you can access


aixnag
IBM Certified Specialist - P-series AIX 5L Administration
IBM Certified Specialist - AIX V4 HACMP
IBM eServer Certified Specialist – p690 Technical Support
IBM Certified Solutions Expert - DB2 UDB V7.1 Database Administration for Unix, Linux, Windows and OS/2
 
Iep thanks a lot for the tries...

I've opened all the ports I saw in the server file but it seems to be a napt problem.

I open the ports in the same way I did it with the others, I don't undrestand why they not work.

When I type netstat -a <port> I have never get an entry. Either for well-known ports as 80 21 22,...

There is a ftp server, ssh server, apacher server running, so I guess the ports are ok.

Thank you for your time
 
Hi,

If the services are running, it should show in #netstat -a|grep <portnumber>.

It seems to me, something problem with your tcpip deamons. Can you do the following check
#ps -ef|grep portmap or #lssrc -s portmap
#ps -ef|grep inetd or #lssrc -s inetd

if either of the services not up. you need to restart them in following sequence.
#stopsrc -s inetd
#startsrc -s inetd
#stopsrc -s portmap
#startsrc -s portmap

Hope it helps.





aixnag
IBM Certified Specialist - P-series AIX 5L Administration
IBM Certified Specialist - AIX V4 HACMP
IBM eServer Certified Specialist – p690 Technical Support
IBM Certified Solutions Expert - DB2 UDB V7.1 Database Administration for Unix, Linux, Windows and OS/2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top