File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Connection refuse on tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Connection refuse on tomcat" Watch "Connection refuse on tomcat" New topic
Author

Connection refuse on tomcat

Niti Auekittiroj
Greenhorn

Joined: Dec 31, 2003
Posts: 7
I use tomcat 4.0.30 on linux redhat.
my problem is when I start tomcat by run startup.sh
I got the message "Connection refuse"
and can't start tomcat.

How can I solve this problem ?
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Originally posted by Niti Auekittiroj:
I use tomcat 4.0.30 on linux redhat.
my problem is when I start tomcat by run startup.sh
I got the message "Connection refuse"
and can't start tomcat.

How can I solve this problem ?



I think, this problem about tomcat or another server/programe use port's tomcat(8080) already.


please see process : ps -ef in command line..


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Niti Auekittiroj:
I use tomcat 4.0.30 on linux redhat.
my problem is when I start tomcat by run startup.sh
I got the message "Connection refuse"
and can't start tomcat.

How can I solve this problem ?


It's because there might be another application running on the port that Tomcat is going to use or maybe because some settings on the Tomcat configuration are not properly adjusted to the linux environment that you've got...

Could you provide the error messages in details so that we can see what's happening along the way, while you are starting the Tomcat?


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Niti Auekittiroj
Greenhorn

Joined: Dec 31, 2003
Posts: 7
it's work now.
thank you very much to everyone.

the problem is in catalina.sh
someone edit
JAVA_OPTS="-Xms256m -Xmx1024m"
into catalina.sh

when I get this line out, tomcat is work.

but I don't know why.
do you know about meaning of this line ?
and why does it error with this line ?
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Niti Auekittiroj:
do you know about meaning of this line ?
and why does it error with this line ?


It's some kinda memory allocation for Tomcat... Each environment got its own memory allocation available for it. If you are still using the setting for Windows on Linux, it might raise an error...
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Originally posted by Niti Auekittiroj:
it's work now.
thank you very much to everyone.

the problem is in catalina.sh
someone edit
JAVA_OPTS="-Xms256m -Xmx1024m"
into catalina.sh

when I get this line out, tomcat is work.

but I don't know why.
do you know about meaning of this line ?
and why does it error with this line ?




-Xmsn
Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples:
-Xms6291456
-Xms6144k
-Xms6m


-Xmxn
Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. Examples:
-Xmx83886080
-Xmx81920k
-Xmx80m
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
Hi,
it could potentialy dangerous comment these line. I'm not sure how exactly JVM works on Linux, but I think if you do not setup the max heapsize than the memory could grow to infinity. Of course there is a garbage collector, but my experience is when the memory exceed the limit than it swap to the disk and the application is going to be very slow.


SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection refuse on tomcat