LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 09: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, 10: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, 05:56 PM   #3
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,534

Rep: Reputation: 132Reputation: 132
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 05:57 PM.
 
Old 07-21-2003, 05: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 03:47 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration