LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-10-2002, 08:44 AM   #1
simonh
LQ Newbie
 
Registered: Dec 2002
Posts: 4

Rep: Reputation: 0
Question Stopping Tomcat causes java.net.ConnectException and also unable to connect to 8080


afternoon all, (in the uk at least)
having a few issues with Tomcat 4.0 installation and running...

ok, I installed the j2sdk, installed Tomcat 4.0 ok, set the environment variables, JAVA_HOME, CATALINA_HOME etc. The tomcat 4 service starts fine at boot time as set in the services configurator gui, but there are two issues that I think are closely related:

1) when I point my browser to http://localhost:8080 then the connection is refused

2) when I stop tomcat 4 through the service configurator the app throws this Exception:

tomcat4 failed. The error was: Stopping tomcat4: Using CATALINA_BASE: /var/tomcat4
Using CATALINA_HOME: /var/tomcat4
Using CATALINA_TMPDIR: /var/tomcat4/temp
Using JAVA_HOME: /usr/local/java/j2sdk1.4.1_01
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:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:426)
at java.net.Socket.connect(Socket.java:376)
at java.net.Socket.<init>(Socket.java:291)
at java.net.Socket.<init>(Socket.java:119)
at org.apache.catalina.startup.Catalina.stop(Unknown Source)
at org.apache.catalina.startup.Catalina.execute(Unknown Source)
at org.apache.catalina.startup.Catalina.process(Unknown Source)
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(Unknown Source)
[FAILED]


anyone have any ideas?

cheers
Simon
 
Old 12-10-2002, 09:02 AM   #2
simonh
LQ Newbie
 
Registered: Dec 2002
Posts: 4

Original Poster
Rep: Reputation: 0
additional : checked the catalina.out log file :

I checked the log file to see if there were any error messages relating to boot /start up and sure enough when it thinks it has started successfully in fact there was an exception :

10-Dec-2002 14:52:03 org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
10-Dec-2002 14:52:04 org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
10-Dec-2002 14:52:04 org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
10-Dec-2002 14:52:06 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1
java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/examples does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(Unknown Source)
at org.apache.catalina.core.StandardContext.start(Unknown Source)
at org.apache.catalina.core.ContainerBase.start(Unknown Source)
at org.apache.catalina.core.StandardHost.start(Unknown Source)
at org.apache.catalina.core.ContainerBase.start(Unknown Source)
at org.apache.catalina.core.StandardEngine.start(Unknown Source)
at org.apache.catalina.core.StandardService.start(Unknown Source)
at org.apache.catalina.core.StandardServer.start(Unknown Source)
at org.apache.catalina.startup.Catalina.start(Unknown Source)
at org.apache.catalina.startup.Catalina.execute(Unknown Source)
at org.apache.catalina.startup.Catalina.process(Unknown Source)
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(Unknown Source)

which sure enough I check the permissions to Document base /var/tomcat4/webapps/examples the folder examples does not exist and the permissions are not set for the dirs above. I solved the permissions by chmod 777 for the folders but still have no examples dir and really haven't a clue what to do next.. suggestions anyone?

cheers

Simon
 
Old 12-10-2002, 04:56 PM   #3
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
as far as i know the examples should come with the normal distribution of tomcat. no extra files to download. maybe get yourself a new download. how did u build it? ant? binaries? have there been warnings or failures building it?
cheers, jens

Last edited by j-ray; 12-10-2002 at 04:57 PM.
 
Old 07-21-2003, 04:49 AM   #4
xslf
LQ Newbie
 
Registered: Dec 2002
Distribution: Gentoo, Ubuntu PPC
Posts: 7

Rep: Reputation: 0
Well, my tomcat is working ok- at least with the sample apps.

However I get the above error when shutting it down. Anyone have any idea whats is going on, and how to prevent the error?

Thanks
 
  


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
Unable To Connect Net nitin403 Mandriva 1 07-31-2005 07:48 AM
unable to connect to the net after reboot xxx_anuj_xxx Linux - Networking 4 05-20-2005 01:07 PM
Tomcat: Refused localhost:8080 manudath Linux - Software 1 03-31-2005 03:32 AM
squid problem pcs unable to connect to net woods Linux - Networking 1 11-18-2004 02:21 PM
Tomcat, cannot connect to 8080 briansy Linux - Software 2 03-03-2004 06:22 AM

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

All times are GMT -5. The time now is 12:22 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