I have configured Tomcat 7 with Eclipse Helios 1.3.2 on port number 8080. Tomcat Service and everything is installed.
When I am starting the server from Eclipse, it does some process and shows the status as STARTED. But when I try to hit http://localhost:8080, it says The requested resource (/) is not available. i.e. in fact server is not started in reality.
However, when I am starting the server from Windows Explorer by running Tomcat7.exe or Tomcat7w.exe, it starts well and I am able to see Apache Home page by referring to http://localhost:8080.
Below is the server start up log.
Jul 02, 2012 1:20:12 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Perforce;O:\ora1106w\bin;C:\Program Files\Java\jdk1.6.0_12\bin;;C:\Program Files\WinMerge;C:\Users\KNIRAV\Downloads\eclipse-jee-helios-SR2-win32\eclipse;;.
Jul 02, 2012 1:20:17 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jul 02, 2012 1:20:17 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jul 02, 2012 1:20:17 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 5674 ms
Jul 02, 2012 1:20:17 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jul 02, 2012 1:20:17 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.28
Jul 02, 2012 1:20:18 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [126] milliseconds.
Jul 02, 2012 1:20:18 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jul 02, 2012 1:20:18 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jul 02, 2012 1:20:18 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1788 ms
Can I have some solution to this please?
There is no problem. When you start Tomcat from Eclipse a root application is not deployed. Only the projects that you deploy through the server view are available.
Have you tried to deploy a project on the server?
Related
After noticing that my web application is not running on the production server anymore, I looked inside the tomcat log (catalina.out):
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Listening for transport dt_socket at address: 8000
Mar 26, 2018 7:53:26 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 26, 2018 7:53:26 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4624 ms
Mar 26, 2018 7:53:26 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 26, 2018 7:53:26 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
Mar 26, 2018 7:53:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Listening for transport dt_socket at address: 8000
Mar 26, 2018 7:54:26 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 26, 2018 7:54:26 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2108 ms
Mar 26, 2018 7:54:26 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 26, 2018 7:54:26 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
Mar 26, 2018 7:54:27 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Listening for transport dt_socket at address: 8000
Mar 26, 2018 7:55:31 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 26, 2018 7:55:32 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2428 ms
Mar 26, 2018 7:55:32 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 26, 2018 7:55:32 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
Mar 26, 2018 7:55:32 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Listening for transport dt_socket at address: 8000
Mar 26, 2018 7:56:36 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 26, 2018 7:56:36 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1873 ms
Mar 26, 2018 7:56:36 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 26, 2018 7:56:36 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
Mar 26, 2018 7:56:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Listening for transport dt_socket at address: 8000
Mar 26, 2018 7:57:42 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 26, 2018 7:57:42 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2534 ms
Mar 26, 2018 7:57:42 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 26, 2018 7:57:42 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
Mar 26, 2018 7:57:42 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
The deploy "loop" starts with the following message:
Mar 26, 2018 5:00:45 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
Mar 26, 2018 5:00:46 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
I tried to restart Tomcat and the entire server multiple times without success.
Can you imagine what's going wrong here?
Similar cases have been reported and the explanation was a Memory Leak.
About this warning which mentions that PermGen is ignored, why don't you use the correct option ? This might explain an insufficient memory leading to your problem.
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
If after using the correct option (XX:MaxMetaspaceSize) you still have this problem, try giving it more memory. Try to understand what changed then your application cannot run anymore (data has changed in the DB ? how ?). If you still to convince yourself, remove the application and start Tomcat with no webapps at all.
Strange...
Can you run your app with other server ? Such as glassfish or jetty ?
I know it doesn't answer your question,but if the app work with the servers mentioned above, than your tomcat is with some problem,but if not work if them, than your code have some problems.
I am working on a project for which I am using Java Servlets and JSP. Earlier the project was running fine, but now when running the project, the server is properly setup but some JSP pages are not running and others do not show any CSS applied to it.
Also console shows a warning.
Apr 19, 2016 8:24:57 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.33 using APR version 1.5.2.
Apr 19, 2016 8:24:57 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Apr 19, 2016 8:24:58 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:TPC' did not find a matching property.
Apr 19, 2016 8:24:58 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1f 6 Jan 2014)
Apr 19, 2016 8:24:58 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
Apr 19, 2016 8:24:58 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Apr 19, 2016 8:24:58 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2996 ms
Apr 19, 2016 8:24:58 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Apr 19, 2016 8:24:58 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
Apr 19, 2016 8:25:01 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
Apr 19, 2016 8:25:02 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Apr 19, 2016 8:25:02 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3405 ms
Can you check if you war/ear file is present in tomcat and also getting deployed.
If not sure, just restart the server after clean up (deleting temp,work and logs directory).
Then try to access http://localhost:8080/ or http://localhost:8080/YOUR_DEPLOYABLE_FILE_NAME
If it still doesn't work then check mappings in web.xml.
I am trying to start Tomcat 7.0.55 from Eclipse Luna on Ubuntu 14.04.
It is working perfectly fine when the Eclipse is run through sudo nautilus.
But when the Eclipse is used via normal user and Tomcat is started, the following
error occurs:
Server Tomcat v7.0 Server at localhost was unable to start within 45
seconds. If the server requires more time, try increasing the timeout
in the server editor.
I have tried to increase the timeouts to 200 seconds, but still the same error.
Till the time Eclipse tries to start the Tomcat, the server tab shows following status
Tomcat 7.0 Server at localhost [ Starting, Synchronized]
and the console tab shows:
Sep 17, 2014 3:02:07 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/server:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386:/usr/lib/jvm/java-7-openjdk-i386/jre/../lib/i386:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/client:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386::/usr/java/packages/lib/i386:/usr/lib/i386-linux-gnu/jni:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/lib/jni:/lib:/usr/lib
Sep 17, 2014 3:02:07 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:testprj' did not find a matching property.
Sep 17, 2014 3:02:08 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Sep 17, 2014 3:02:08 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Sep 17, 2014 3:02:08 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1168 ms
Sep 17, 2014 3:02:08 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 17, 2014 3:02:08 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.55
Sep 17, 2014 3:02:09 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Sep 17, 2014 3:02:09 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Sep 17, 2014 3:02:09 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1131 ms
and once the error pops, the Eclipse server tab shows:
Tomcat v7.0 Server at localhost [ Stopped, Synchronized]
Any help ?
I'm using Eclipse Kepler and Tomcat 7 and Ubuntu 12.04. When Tomcat starts it after 45 seconds it says
Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.
I increased the timeout, reinstalled Eclipse and Tomcat but still the problem is not solved.
In debug mode I get this error.
<terminated, exit value: 143>/usr/lib/jvm/java-7-openjdk-amd64/bin/java (May 26, 2014, 12:26:09 PM)
My console says:
May 26, 2014 12:26:10 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
May 26, 2014 12:26:10 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
May 26, 2014 12:26:10 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
May 26, 2014 12:26:10 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 995 ms
May 26, 2014 12:26:10 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
May 26, 2014 12:26:10 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.54
May 26, 2014 12:26:11 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
May 26, 2014 12:26:11 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
May 26, 2014 12:26:11 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 804 ms
Add server runtime at starting of creation of anything in your eclipse environment
add specified installed tomcat library and jdk location and it will works
I have a Java web application that I am trying to deploy to our company's application server. It uses spring and spring-security. Everything works correctly when I run the application in Tomcat from Eclipse but when I try and deploy the .war file into a standalone Tomcat instance the server does not even finish starting up.
These are the catalina logs from the last attempt:
Jan 30, 2014 1:16:39 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.23 using APR version 1.4.6.
Jan 30, 2014 1:16:39 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Jan 30, 2014 1:16:39 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized with version OpenSSL 1.0.0g 18 Jan 2012
Jan 30, 2014 1:16:40 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jan 30, 2014 1:16:40 PM org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Jan 30, 2014 1:16:40 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2567 ms
Jan 30, 2014 1:16:40 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 30, 2014 1:16:40 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.36
Jan 30, 2014 1:16:41 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Jan 30, 2014 1:16:41 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Jan 30, 2014 1:16:41 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive MyApp.war
And then startup stops.
These are the localhost logs:
Jan 30, 2014 1:16:46 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
And then nothing...
All of the other log files for this last attempt are blank.
Any insight you guys might have would be greatly appreciated!
This problem was caused by not setting the JAVA_OPTS property to point to my .ini files.
I included this in my startup script:
set JAVA_OPTS= -DLOGCONFIG=%CATALINA_HOME%\conf\logging.ini -DINIFILE=%CATALINA_HOME%\conf\webapps.ini
and it ran succesfully