Unable to connect to tomcat7 - java

I deployed a new version of a .war file and the tomcat7 is also running fine as status shows me:
root#s17298254:/var/lib/tomcat7/webapps# service tomcat7 status
* Tomcat servlet engine is running with pid 11331
Now the question is that neither I am able to view the website, nor I am able to view the manager interface in my web browser. Please note that its in production environment that I am using this tomcat instance. What could be the reason?
I have tried many things like running tomcat as root user previlages(although a disaster recepie, but atleast to make things work temporarily), putting
useIPVHosts="true"
under <Connector> etc.
Here is my catalina.out:
Mar 12, 2014 7:04:24 AM 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-6-openjdk-amd64/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk-amd64/jre/../lib/amd64:/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
Mar 12, 2014 7:04:25 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'xmlValidation' to 'false' did not find a matching property.
Mar 12, 2014 7:04:25 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'xmlNamespaceAware' to 'false' did not find a matching property.
Mar 12, 2014 7:04:25 AM org.apache.tomcat.util.digester.Digester endElement
WARNING: No rules found matching 'Server/Service/Engine/Host/Logger'.
Mar 12, 2014 7:04:25 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-80"]
Mar 12, 2014 7:04:25 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Mar 12, 2014 7:04:25 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2038 ms
Mar 12, 2014 7:04:25 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 12, 2014 7:04:25 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.26
Mar 12, 2014 7:04:26 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/var/lib/tomcat7/webapps/camriders/WEB-INF/lib/servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Mar 12, 2014 7:04:27 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://www.springframework.org/tags is already defined
Mar 12, 2014 7:04:31 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
It does not show me anything pathogenic.So what could be the cause that my website is now no longer working?
EDIT:
The error when i type in browser mywebsite.mydomain.net is:
Firefox can't establish a connection to the server at mywebsite.mydomain.net.
Similar with google chrome.

In tomcat 7 use 'xmlValidation' and 'xmlNamespaceAware' under context element.
<Context path="" docBase="ROOT" xmlValidation="false" xmlNamespaceAware="false"/>

Related

JSP pages not loading on loaclhost while working with Tomcat7 on Eclipse IDE

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.

Controlling Tomcat starting issue with Eclipse

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 ?

Tomcat 7.0.42 Error listenerStart

Am deploying my war file on tomcat(jdk 7) and am seeing following error. Am not sure of whats causing the issue.
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1d 5 Feb 2013)
Feb 27, 2014 11:02:50 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8081"]
Feb 27, 2014 11:02:50 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Feb 27, 2014 11:02:50 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1588 ms
Feb 27, 2014 11:02:50 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Feb 27, 2014 11:02:50 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
Feb 27, 2014 11:02:50 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive D:\Dev\tools\apache-tomcat-7.0.42\webapp
s\CollaborationPortal.war
Feb 27, 2014 11:03:09 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
Feb 27, 2014 11:03:09 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
Feb 27, 2014 11:03:09 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Feb 27, 2014 11:03:09 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/CollaborationPortal] startup failed due to previous errors
Feb 27, 2014 11:03:09 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8081"]
Feb 27, 2014 11:03:09 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Feb 27, 2014 11:03:09 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 18890 ms
You can reconfigure java.utils.logging by adding /WEB-INF/classes/logging.properties to your war archive:
org.apache.catalina.core.ContainerBase.[Catalina].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler
The actual error message should then be visible. Also, check your application logs, if an additional logging framework is already configured (eg. log4j).
There might be a mismatch in the JDK version you have installed and the JDK with which you are trying to build your project.
1) If you are using Eclipse.Go to Windows->Preferences->Compiler->check the compiler compliance level (It should match with your installed JDK)
2)
Right click on build.xml
Select Run As->Ant Build... note the ellipsis!
Switch to JRE tab
Select the jdk from the list
Build your project
( https://stackoverflow.com/a/26375026/5566348 )

Apache Tomcat will not complete startup after a certain .war File is deployed

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

Sudden issue while deploying application in Openshift

Yesterday I deployed my war in openshift using the usual command git push. But when I checked the url http://nrollin-nrollin.rhcloud.com, I am seeing the error HTTP Status 404 - The requested resource is not available. I have deployed the war many times but this is the first time I am seeing this error. I have even restarted the server but no luck. I searched down the cause in openshift forum also (https://www.openshift.com/forums/openshift/jbossas-application-the-requested-resource-is-not-available), but no solution to me as such yet. The app is running good in my local PC and is developed in Spring MVC and Hibernate.
Can anyone suggest me the cause of this issue? Or do I have to create app again..?
Below are the logs :
Jul 27, 2013 3:43:44 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-127.4.82.1-8080
Jul 27, 2013 3:43:44 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 5182 ms
Jul 27, 2013 3:43:44 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 27, 2013 3:43:44 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.37
Jul 27, 2013 3:43:45 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive ROOT.war
Jul 27, 2013 3:44:06 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jul 27, 2013 3:44:06 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
Jul 27, 2013 3:44:09 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-127.4.82.1-8080
Jul 27, 2013 3:44:10 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 25540 ms
I faced the same problem in my local system yesterday but I resolved it by cleaning it along with its directory. I think the same would be needed for Openshift tomcat server.

Categories

Resources