LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-29-2004, 11:48 AM   #1
simplyrahul
LQ Newbie
 
Registered: Oct 2004
Location: India
Posts: 26

Rep: Reputation: 15
Tomcat 4


Hi All,
I'm trying to install tomcat 4.

I have downloaded j2sdk1.4.0_02 and have set the JAVA_HOME to the path of this directory . Also i have added in PATH $JAVA_HOME/bin.
In CLASSPATH i have added $JAVA_HOME/bin

I have downloaded jakarta-tomcat-4.1.31. and added its path to PATH.
now while running ~/jakarta-tomcat-4.1.31/bin/start.sh i got the message

Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.1.31
Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.1.31
Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4.1.31/temp
Using JAVA_HOME: /usr/local/software/j2sdk1.4.0_02


However in browser when i'm gicing the url http://127.0.0.1:8080/ its giving error :

The connetion was refused when attempting to contact 127.0.0.1:8080

Any Suggestions,

Thanks,
Rahul Sinha
 
Old 10-29-2004, 11:50 AM   #2
simplyrahul
LQ Newbie
 
Registered: Oct 2004
Location: India
Posts: 26

Original Poster
Rep: Reputation: 15
Also i got ,

[root@5fwwd163c bin]# service tomcat4 restart
tomcat4: unrecognized service
[root@5fwwd163c bin]#

Any suggestions,

Thanks,
Rahul Sinha
 
Old 10-29-2004, 12:28 PM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Moved: This thread is more suitable in Linux-Software and has been moved accordingly to help your thread/question get the exposure it deserves.

it looks you don't have a script running it in /etc/init.d/ (or a place correct for your distribution). Or you have it and the name is not tomcat4. Take a look into that directory (cd /etc/init.d; ls) and check for the names. Maybe it's jakarta or tomcat in your system?

Connection refused means the service if not listening on that port. Maybe it does on 80? Use 'netstat -l' to see which programs are listening on which ports. You should be also able to specify the port in a configuration file. Unfortunatelly I don't know where it is.

Could you please tell use which distribution you have? It'd really help.
 
Old 10-29-2004, 12:33 PM   #4
simplyrahul
LQ Newbie
 
Registered: Oct 2004
Location: India
Posts: 26

Original Poster
Rep: Reputation: 15
I have Fedora core 1

the config file is i believe is server.xml in ~/conf.

Thanks,
Rahul
 
Old 10-29-2004, 12:40 PM   #5
simplyrahul
LQ Newbie
 
Registered: Oct 2004
Location: India
Posts: 26

Original Poster
Rep: Reputation: 15
[root@5fwwd163c bin]# ./startup.sh
Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.1.31
Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.1.31
Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4.1.31/temp
Using JAVA_HOME: /usr/local/software/j2sdk1.4.0_02


[root@5fwwd163c bin]# netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:32768 *:* LISTEN
tcp 0 0 localhost.localdo:32769 *:* LISTEN
tcp 0 0 *:netbios-ssn *:* LISTEN
tcp 0 0 *:sunrpc *:* LISTEN
tcp 0 0 *:http *:* LISTEN
tcp 0 0 *:ftp *:* LISTEN
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 *:smtp *:* LISTEN
tcp 0 0 *:microsoft-ds *:* LISTEN
udp 0 0 *:32768 *:*
udp 0 0 *:syslog *:*
udp 0 0 5fwwd163c.in:netbios-ns *:*
udp 0 0 *:netbios-ns *:*
udp 0 0 5fwwd163c.i:netbios-dgm *:*
udp 0 0 *:netbios-dgm *:*
udp 0 0 *:911 *:*
udp 0 0 *:tftp *:*
udp 0 0 *:sunrpc *:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 15611 /tmp/orbit-root/linc-def-0-4840e4077ff5a
unix 2 [ ACC ] STREAM LISTENING 15627 /tmp/orbit-root/linc-ded-0-59830553b5077
unix 2 [ ACC ] STREAM LISTENING 15735 /tmp/orbit-root/linc-e06-0-27bd44ca2f27
unix 2 [ ACC ] STREAM LISTENING 15745 /tmp/orbit-root/linc-e0d-0-52a278536325
unix 2 [ ACC ] STREAM LISTENING 15769 /tmp/orbit-root/linc-e0b-0-52a278533f1bb
unix 2 [ ACC ] STREAM LISTENING 15817 /tmp/orbit-root/linc-e15-0-52a27853814ef
unix 2 [ ACC ] STREAM LISTENING 15927 /tmp/orbit-root/linc-e27-0-27203a9a478d2
unix 2 [ ACC ] STREAM LISTENING 15960 /tmp/orbit-root/linc-e29-0-27203a9a6153a
unix 2 [ ACC ] STREAM LISTENING 2372 /dev/gpmctl
unix 2 [ ACC ] STREAM LISTENING 16020 /tmp/orbit-root/linc-e1f-0-15e03955e44fb
unix 2 [ ACC ] STREAM LISTENING 15990 /tmp/orbit-root/linc-e2b-0-27203a9aa151e
unix 2 [ ACC ] STREAM LISTENING 16044 /tmp/orbit-root/linc-e2d-0-5fa808a2279d
unix 2 [ ACC ] STREAM LISTENING 3467 /tmp/.gdm_socket
unix 2 [ ACC ] STREAM LISTENING 2515 /tmp/.font-unix/fs7100
unix 2 [ ACC ] STREAM LISTENING 15645 /tmp/.fam_socket
unix 2 [ ACC ] STREAM LISTENING 15886 /tmp/mapping-root
unix 2 [ ACC ] STREAM LISTENING 15528 /tmp/orbit-root/linc-da0-0-5e4cdd0355af7
unix 2 [ ACC ] STREAM LISTENING 15409 /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 15548 /tmp/.ICE-unix/3488
unix 2 [ ACC ] STREAM LISTENING 15509 /tmp/ssh-eIEA3488/agent.3488
unix 2 [ ACC ] STREAM LISTENING 15561 /tmp/orbit-root/linc-deb-0-60d52cc559bd5
unix 2 [ ACC ] STREAM LISTENING 3603 /tmp/orbit-root/linc-a88-0-559d02c54b614
unix 2 [ ACC ] STREAM LISTENING 2588 /var/run/dbus/system_bus_socket
[root@5fwwd163c bin]#

Any clue ???

Thanks,
Rahul Sinha
 
Old 10-29-2004, 12:42 PM   #6
simplyrahul
LQ Newbie
 
Registered: Oct 2004
Location: India
Posts: 26

Original Poster
Rep: Reputation: 15
there was one more instance of tomcat 3.2.x running on the system.

i have uninstalled the rpm.

But same result.

rahul
 
Old 10-29-2004, 12:52 PM   #7
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
tcp 0 0 *:http *:* LISTEN
If you don't have Apache running, Tomcat is on port 80. Look in the configuretion file and there should be something about port it's using.
 
Old 10-29-2004, 01:32 PM   #8
simplyrahul
LQ Newbie
 
Registered: Oct 2004
Location: India
Posts: 26

Original Poster
Rep: Reputation: 15
I have httpd running on port 80
 
Old 10-29-2004, 01:34 PM   #9
simplyrahul
LQ Newbie
 
Registered: Oct 2004
Location: India
Posts: 26

Original Poster
Rep: Reputation: 15
Also Now i have downloaded tomcat rpm .

The config file and the error are as below :

[root@5fwwd163c init.d]# rpm -qa | grep tomcat4
tomcat4-4.0-m4.1
[root@5fwwd163c init.d]#

[root@5fwwd163c init.d]# cat tomcat4
#!/bin/sh
#
# Startup script for Tomcat 4, the Apache Servlet Engine
#
# chkconfig: 345 85 15
# description: Tomcat is the Apache Servlet Engine
# processname: tomcat4
# pidfile: /var/run/tomcat4.pid
# config: /home/tomcat4/conf/tomcat.conf

# Source function library.
. /etc/rc.d/init.d/functions

# Setup JAVA_HOME to your JDK home dir
#export JAVA_HOME=/usr/jdk118
#export TOMCAT_HOME=/home/tomcat4
export PATH=$PATH:/opt/IBMJava2-13/bin:/opt/IBMJava2-13/jre/bin:/usr/local/software/j2sdk1.4.0_02/bin
#export JAVA_HOME=/opt/IBMJava2-13

export CLASSPATH=$CLASSPATH:/usr/local/software/j2sdk1.4.0_02/bin

export JAVA_HOME=/usr/local/software/j2sdk1.4.0_02

export TOMCAT_HOME=/var/tomcat4

export TOMCAT_USER="root"

# See how we were called.
case "$1" in
start)
echo -n "Starting tomcat4: "
daemon tomcat4 start
echo
touch /var/lock/subsys/tomcat4
;;
stop)
echo -n "Shutting down tomcat4: "
daemon tomcat4 stop
echo
rm -f /var/lock/subsys/tomcat4
rm -f /var/run/tomcat4.pid
;;
restart)
$0 stop
sleep 2
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac

exit 0
[root@5fwwd163c init.d]# service tomcat4 restart
Shutting down tomcat4: Using CLASSPATH: /var/tomcat4/bin/bootstrap.jar:/var/tomcat4/bin/servlet.jar:/usr/local/software/j2sdk1.4.0_02/lib/tools.jar
Error: failed /usr/local/software/j2sdk1.4.0_02/jre/lib/i386/client/libjvm.so, because libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory
[FAILED]
Starting tomcat4: [ OK ]
[root@5fwwd163c init.d]#


Any clue ??

Thanks,
Rahul
 
Old 10-29-2004, 01:58 PM   #10
simplyrahul
LQ Newbie
 
Registered: Oct 2004
Location: India
Posts: 26

Original Poster
Rep: Reputation: 15
Shutting down tomcat4: Using CLASSPATH: /var/tomcat4/bin/bootstrap.jar:/var/tomcat4/bin/servlet.jar:/usr/local/software/j2sdk1.4.0_02/lib/tools.jar
Error: failed /usr/local/software/j2sdk1.4.0_02/jre/lib/i386/client/libjvm.so, because libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory
[FAILED]
Starting tomcat4: [ OK ]


Getting this error,

Any suggestions,
Thanks
 
Old 10-29-2004, 02:31 PM   #11
simplyrahul
LQ Newbie
 
Registered: Oct 2004
Location: India
Posts: 26

Original Poster
Rep: Reputation: 15
After installing the following RPM the previous error is gone.However new one appears clearly mentioning that "CONNECTION REFUSED"

[root@5fwwd163c soft]# rpm -Uvh compat-libstdc++-7.3-2.96.118.i386.rpm
Preparing... ########################################### [100%]
package compat-libstdc++-7.3-2.96.118 is already installed
[root@5fwwd163c soft]# service tomcat4 restart
Shutting down tomcat4: Using CLASSPATH: /var/tomcat4/bin/bootstrap.jar:/var/tomcat4/bin/servlet.jar:/usr/local/software/j2sdk1.4.0_02/lib/tools.jar
Catalina.stop: java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
at java.net.Socket.connect(Socket.java:425)
at java.net.Socket.connect(Socket.java:375)
at java.net.Socket.<init>(Socket.java:290)
at java.net.Socket.<init>(Socket.java:118)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:689)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:598)
at org.apache.catalina.startup.Catalina.process(Catalina.java:169)
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:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:133)
[FAILED]
Starting tomcat4: [ OK ]
[root@5fwwd163c soft]#


Any guess ??

Thanks Rahul
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
help regarding tomcat farhank Linux - Software 2 03-24-2008 07:00 AM
is it possible for tomcat wangjinyi Programming 3 05-24-2005 01:59 PM
tomcat digdog Linux - Software 0 12-10-2004 11:09 PM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 01:31 AM
Why use Apache with Tomcat rather than just Tomcat itself? davee Linux - Software 1 08-21-2003 09:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration