I have a grails app that runs on dev environment and I crated the war without problems.
In the server, I stop the service using "sudo service tomcat7 stop" command and put the war file into the server folder "/var/lib/tomcat7/webapps" and start the server again with the command "sudo service tomcat7 start".
For checking the state of the server I run "sudo service tomcat7 status" and get the "Tomcat servlet engine is running with pid 19169" response, and check if the application deploys correctly on the folder "/var/lib/tomcat7/webapps" and I see the project's folder there.
Right now, if I check the catalina.out file, I can't see any deploy error having this:
May 27, 2020 9:04:31 PM org.apache.coyote.AbstractProtocol init INFO:
Initializing ProtocolHandler ["http-bio-80"] May 27, 2020 9:04:31 PM
org.apache.catalina.startup.Catalina load INFO: Initialization
processed in 1280 ms May 27, 2020 9:04:31 PM
org.apache.catalina.core.StandardService startInternal INFO: Starting
service Catalina May 27, 2020 9:04:31 PM
org.apache.catalina.core.StandardEngine startInternal INFO: Starting
Servlet Engine: Apache Tomcat/7.0.26 May 27, 2020 9:04:33 PM
org.apache.catalina.startup.HostConfig deployDescriptor INFO:
Deploying configuration descriptor
/etc/tomcat7/Catalina/localhost/docs.xml May 27, 2020 9:04:33 PM
org.apache.catalina.startup.HostConfig deployDescriptor INFO:
Deploying configuration descriptor
/etc/tomcat7/Catalina/localhost/host-manager.xml May 27, 2020 9:04:33
PM org.apache.catalina.startup.HostConfig deployDescriptor INFO:
Deploying configuration descriptor
/etc/tomcat7/Catalina/localhost/manager.xml May 27, 2020 9:04:33 PM
org.apache.catalina.startup.HostConfig deployDescriptor INFO:
Deploying configuration descriptor
/etc/tomcat7/Catalina/localhost/examples.xml May 27, 2020 9:04:33 PM
org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web
application archive /var/lib/tomcat7/webapps/fleetcontroller.war
log4j:WARN No appenders could be found for logger
(net.bull.javamelody). log4j:WARN Please initialize the log4j system
properly. log4j:WARN See
http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
But if I wait a while, the tomcat service is stoped.
When I check the server status with "sudo service tomcat7 status" I get this msg
Tomcat servlet engine is not running, but pid file exists.
And the catalina.out show me:
WARN intercept.RequestmapFilterInvocationDefinition - Exception
initializing; this is ok if it's at startup and due to GORM not being
initialized yet since the first web request will re-initialize. Error
message is: {0} 2020-05-27 21:14:13,192 [pool-2-thread-1] WARN
module.ModuleDeclarationsFactory - resources artefact
KickstartResources does not define any modules | Using LESS files to
generating CSS files!
Please, if someone can help with that, because I don't know how to find the problem.
Really thanks for your time.
It was a virtual machine size problem.
I checked some server parameters and see that they was lower than production. infrastructure office changed the virtual server size and it starts to work!
Thanks you for your time!
Related
I am running into an issue where I am unable to shutdown the Liferay 6.2 tomcat bundle on the server via the bundled shutdown script on the new linux server.
The steps I took are:
Installed the bundle by unziping it.
Uploaded the custom portal-ext.properties in the default liferay home folder
Change the memory args as defined in the deployment best practices guide in the tomcat home/bin/setenv.sh
Added Oracle custom data source in the tomcat home/conf/context.xml
JDK - jdk1.7.0_75
Navigate to the tomcat home/bin folder -> run ./startup.sh
Liferay and the bundle comes up.
To shutdown - Navigate to the tomcat home/bin folder -> run ./shutdown.sh
This displays the following but the tomcat is not shutdown:
$ ./shutdown.sh
Using CATALINA_BASE: /.../liferay-portal-6.2-ee-sp2/tomcat-7.0.42
Using CATALINA_HOME: /.../liferay-portal-6.2-ee-sp2/tomcat-7.0.42
Using CATALINA_TMPDIR: /.../liferay-portal-6.2-ee-sp2/tomcat-7.0.42/temp
Using JRE_HOME: /.../java/jdk1.7.0_75
Using CLASSPATH: /.../liferay-portal-6.2-ee-sp2/tomcat-7.0.42/bin/bootstrap.jar:/.../liferay-portal-6.2-ee-sp2/tomcat-7.0.42/bin/tomcat-juli.jar
I see the following in the Tomcat logs.
apr 27, 2015 1:18:23 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [org.python.google.common.base.internal.Finalizer] but has failed to stop it. This is very likely to create a memory leak.
Apr 27, 2015 1:18:23 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [MulticastListener-239.255.0.523305] but has failed to stop it. This is very likely to create a memory leak.
Apr 27, 2015 1:18:23 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [pool-3-thread-1] but has failed to stop it. This is very likely to create a memory leak.
Apr 27, 2015 1:18:29 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/opensocial-portlet] appears to have started a thread named [com.google.inject.internal.Finalizer] but has failed to stop it. This is very likely to create a memory leak.
Apr 27, 2015 1:18:45 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
Apr 27, 2015 1:18:45 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Apr 27, 2015 1:18:45 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Apr 27, 2015 1:18:45 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
The tomcat process is still showing after a few minutes as an active process and needs to be killed manually. Liferay seems to be down after the shutdown script is run within a minute or so.
I need this to work so all the resources are released cleanly and I can script the startup and shutdown as needed.
Has anyone seen this and resolved this behavior? Any insight would be much appreciated.
Thanks!
After working through this issue and following the steps below, the tomcat process shuts down within a minute or so with the shutdown script and there is no need to kill the process manually.
increased maxpermsize catalina_opts argument to 512m (was 200m) in the setenv.sh - this resolved 2 of the memory leak messages in the logs at shutdown and also resulted in the tomcat process shutdown properly.
removing the opensocial-portlet removed 1 memory leak error prior to the maxpermsize change but the process was still not shutdown properly.
there is 1 remaining memory leak error in the logs on shutdown but that for now is not preventing the tomcat from shutting down and seems to be part of tomcat not necessarily caused by liferay. This message for now seems safe to ignore per this LPS issue below
https://issues.liferay.com/browse/LPS-34498
Hope this helps someone.
Just trying to deploy web service war file but could not make it using apache tomcat 7. I tried sample war file and it works fine just accesing from browser localhost:8080/sample so sure that my tomcat is well configured. just copying the war under webapps/ and deploy it but same message: description The requested resource is not available.
I am wondering if web service application shows another way to deploy it ???
here is a content of catalina.log file:
4:28:25 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
4:28:25 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/APP] startup failed due to previous errors
Oct 12, 2012 4:28:25 PM org.apache.catalina.startup.HostConfig deployDirectory
Any idea ??
I had a similar problem. The catalina.out logged this log Message
Apr 17, 2013 5:14:46 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart
The error is caused when a exception is thrown while the server is starting.
To figure out what is causing the you should look at localhost.log (in the same directory as catalina.out) not catalina.out, you should be able to see the exception that caused the error
You can check the error by adding a logging.properties file in your WEB-INF/classes folder with the following contents:
org.apache.catalina.core.ContainerBase.[Catalina].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler
I am running a Tomcat Web Server(7.0) on Ubuntu. I have the same War file using Java 1.6 in my local Windows machine and I face no issues whatsoever. However, on the linux machine my tomcat fails after some time or stops working and I get Java GC exceptions. It starts with these errors :
Jul 10, 2011 4:29:05 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/manager]
Jul 10, 2011 4:29:05 PM org.apache.catalina.session.StandardManager doUnload
SEVERE: IOException while saving persisted sessions: java.io.FileNotFoundException: /home/infocomm/tomcat/work/Catalina/localhost/manager/SESSIONS.ser (No such file or directory)
java.io.FileNotFoundException: /home/infocomm/tomcat/work/Catalina/localhost/manager/SESSIONS.ser (No such file or directory)
Then these errors:
Jul 10, 2011 4:29:05 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
WARNING: JDBC driver de-registration failed for web application [/manager]
java.lang.NullPointerException
at org.apache.catalina.loader.WebappClassLoader.clearReferencesJdbc(WebappClassLoader.java:2012)
at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1948)
at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1860)
at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:659)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:216)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5032)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:216)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:952)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1199)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1360)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:290)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1228)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1384)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1394)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1373)
at java.lang.Thread.run(Thread.java:619)
Jul 10, 2011 4:29:05 PM org.apache.catalina.util.LifecycleBase destroy
INFO: The destroy() method was called on component [StandardContext[/manager]] after destroy() had already been called. The second call will be ignored.
Jul 10, 2011 4:29:05 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context []
Jul 10, 2011 4:29:05 PM org.apache.catalina.session.StandardManager doUnload
Then Finally TOmcat stops responding with these errors:
Jul 10, 2011 5:07:44 PM org.apache.catalina.util.LifecycleBase destroy
INFO: The destroy() method was called on component [StandardContext[/host-manager]] after destroy() had already been called. The second call will be ignored.
Jul 10, 2011 6:31:44 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor rcbp.xml from /home/infocomm/tomcat/conf/Catalina/localhost
Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" java.lang.OutOfMemoryError: PermGen space
Would Appreciate any help.
This only happens after I exit the remote shell with which I started the Tomcat Application.
does tomcat (when running with a specific user account) has access to this file, it should have enough privilege create, update & delete the file.
/home/infocomm/tomcat/work/Catalina/localhost/manager/SESSIONS.ser
in windows its very rare for this scenario to surface unless you've started tomcat as an unprivileged user.
I am taking over an existing Struts-based web application and am trying to deploy it for the first time on my local machine. My predecessor told me to run it through Eclipse on a Tomcat server.
I have installed the latest tomcat and it is running fine. I have grabbed the code from their CVS server and, with a few tweaks, removed all of the errors from the Java files. I then created a new Run Configuration having it run as "Run on server".
When I run the Run Config, the tomcat server starts up without error messages in the Console and an Eclipse browser page pops up to the correct local URL. The returned page is a 404, however. Looking at my Tomcat "webaps" folder, I see that my application is not there.
My question is, how can I troubleshoot this? My tomcat error logs do not get updated when I deploy and the Console output, shown below, offers no hint that there is a problem.
May 30, 2011 3:48: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: <long list of paths>
May 30, 2011 3:48:07 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 30, 2011 3:48:07 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 410 ms
May 30, 2011 3:48:07 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 30, 2011 3:48:07 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
May 30, 2011 3:48:08 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor CanPost_Emil.xml
May 30, 2011 3:48:08 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 30, 2011 3:48:08 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 30, 2011 3:48:08 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31 config=null
May 30, 2011 3:48:08 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 244 ms
This is not the way to run web apps inside Eclipse.
Go to the Server view panel instead, and choose Add server. Here install the Tomcat adapter according to the instructions, and then add the projects you have (if they are Dynamic Web Projects). You can now start and stop the server and have the projects chosen updated when you change.
Do it this way. Do not try to create a Run Configuration launching Tomcat.
I have exactly the same problem.
While this is not a solution to the problem itself (running the project on Tomcat from within Eclipse), it is a way to run the project:
Pack(age) the project (I use maven: 'mvn clean package')
Copy the .war file into the webapps dir inside your tomcat installation.
(if not already running) Start up tomcat.
This works for me. I'm still looking for the proper answer to your question, but until I find it I'll just continue to manually package/deploy the project.
I am trying to create my first webservice using eclipse javaEE under Axis2,
i am following this turorial eclipse tutorial
to learn how to make it.I make the webservice but when i want to assure that the ws has been deployed through viewing it through URL, an HTTP status 400 occure. How can I know what is the error??
here what i make exactly:
i make the settings in preferences [ ant , axis2, tomcat and java ].
New -> New dynamic web page
new ->java (I create the class i want to convert to ws)
new ->web service (i want to create bottom up ws).
type http://localhost:8080/Axis2/services/listservices in the url of browser
this what return HTTP Status 404 - /services/listservices
can some one tell me how can i know what is the error? or how can i define it?
EDIT:
an exception happen in the console of eclipse which is :
org.apache.axis2.transport.http.AxisAdminServlet java.lang.ClassNotFoundException: org.apache.axis2.transport.http.AxisAdminServlet
what should I do ,in the configuration i specify where is axis2 and eclipse shows
Axis2 runtime loaded successfully
after creating new work space and create webservice again, this is the output appears in console
Dec 20, 2010 8:32:04 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\jdk1.6.0_18\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;F:/alaa college/year 4/1st
semester/Advance sw/Libraries/eclipse/jre/bin/client;F:/alaa college/year 4/1st
semester/Advance sw/Libraries/eclipse/jre/bin;D:\app\AloOoSh\product\11.1.0\db_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.6.0_18\bin;%ANT_HOME%\bin;%AXIS2_HOME%\bin;%CATALINA_HOME%\bin;C:\Program Files\MATLAB\R2008a\bin;C:\Program Files\MATLAB\R2008a\bin\win32;
Dec 20, 2010 8:32:05 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source'
to 'org.eclipse.jst.jee.server:testFirst' did not find a matching property.
Dec 20, 2010 8:32:05 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Dec 20, 2010 8:32:05 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 401 ms
Dec 20, 2010 8:32:05 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Dec 20, 2010 8:32:05 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
[INFO] Deploying module: addressing-1.4 - file:/D:/EclipseExcercises/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testF
irst/WEB-INF/modules/addressing-1.4.mar
[INFO] Deploying module: metadataExchange-1.4 -
file:/D:/EclipseExcercises/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testFirst/WEB-INF/modules/mex-1.4.mar
[INFO] Deploying module: ping-1.4 -
file:/D:/EclipseExcercises/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testFirst/WEB-INF/modules/ping-1.4.mar
[INFO] Deploying module: script-1.4 - file:/D:/EclipseExcercises/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testFirst/WEB-INF/modules/scripting-1.4.mar
[INFO] Deploying module: smtpfault - file:/D:/EclipseExcercises/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testFirst/WEB-INF/modules/smtpfault.mar
[INFO] Deploying module: soapmonitor-1.4 - file:/D:/EclipseExcercises/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testFirst/WEB-INF/modules/soapmonitor-1.4.mar
[INFO] Deploying Web service: Converter - file:/D:/EclipseExcercises/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testFirst/WEB-INF/services/Converter/
[INFO] Deploying Web service: version.aar - file:/D:/EclipseExcercises/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testFirst/WEB-INF/services/version.aar
Dec 20, 2010 8:32:06 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Dec 20, 2010 8:32:06 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Dec 20, 2010 8:32:06 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/19 config=null
Dec 20, 2010 8:32:06 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1383 ms
These is my own post to creating webservice and use that service in android. its
work properly.
Try this once below link
http://lukencode.com/2010/04/27/calling-web-services-in-android-using-httpclient/#comment-179
The 404 error occurs because there is nothing at the desired url. So there must have been something wrong with your deployment.
Have you set up a server in eclipse and actually published the WS at all? Note that this is different from running Tomcat from a directory somewhere else on your computer! You can add a server instance by selecting New => Server.
If the server configuration is otherwise correct, the server output should appear in eclipse's console, and if anything is wrong with your WS setup, there should be error messages you can use to track down the problem.
You probably extracted the contents of axis2.war (renamed to app.zip) into the wrong folder or deployed files to the wrong folder. Look for the WEB-INF folder directly under the app.war folder that you deployed. If you have another folder of WEB-INF for the axis2 extracted folders, then JBoss cannot locate them. The WEB-INF folder must be a folder as a 1st level descendant. Along with the following folders: axis2-web, META-INF and org.