I am using Mac OS X 10.7.4, app engine sdk 1.7.0, eclipse juno and Java as programming language. The problem is that App runs perfectly well when deployed on appspot but does not work on localhost. When run as web application on port 8888 or any other port (if change it from the configuration), the log represents server is running but when I hit the URL, nothing happens and after some time connection times out. When, debugged it gives the error: Cannot connect to VM. Logs from console for both run and debugged are shown below, kindly help me, I have searched all over the 'net but could not find the solution.
Log when Debugged:
ERROR: transport error 202: handshake failed - connection prematurally closed
ERROR: JDWP: Failed to initialize transport via localhost:49741, trying localhost via 127.0.0.1:49741
ERROR: transport error 202: recv failed during handshake: Connection reset by peer
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
Log when run:
2012-07-17 19:07:42.504 java[417:407] [Java CocoaComponent compatibility mode]: Enabled
2012-07-17 19:07:42.505 java[417:407] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
Jul 17, 2012 2:07:49 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Jul 17, 2012 2:07:50 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed /Volumes/DATA 1/Google App Engine/Java/HelloWorld/war/WEB-INF/appengine-web.xml
Jul 17, 2012 2:07:50 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed /Volumes/DATA 1/Google App Engine/Java/HelloWorld/war/WEB-INF/web.xml
Jul 17, 2012 7:07:52 PM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at localhost:8888/
Jul 17, 2012 7:07:52 PM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The admin console is running at localhost:8888/_ah/admin
Log when Run from command line:
Jul 21, 2012 3:23:19 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Jul 21, 2012 3:23:19 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed /Volumes/DATA 1/Softwares/appengine-java-sdk-1.7.0/demos
/guestbook/war/WEB-INF/appengine-web.xml
Jul 21, 2012 3:23:19 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed /Volumes/DATA 1/Softwares/appengine-java-sdk-1.7.0/demos/guestbook/war/WEB-INF/web.xml
Jul 21, 2012 8:23:22 PM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at http://localhost:8080/
Jul 21, 2012 8:23:23 PM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The admin console is running at http://localhost:8080/_ah/admin
Check the following:
1) If the application has actually started. Enter "ps ax | grep java" in terminal
2) If the application has bound to the port. Install nmap (not sure how to do it on mac) and run it with "nmap localhost". You will see a list of ports and protocols used. If you don't see 8888 with http then something is wrong.
Have you tried running it from the command line? It looks like you're trying to start it in the debugger as well.. no? Try running from the command line, make sure that works. Then try running it from eclipse with "Run" not "Debug" and make sure that works before trying the debugger. Appengine is a little bit particular...
Related
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!
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.
I am trying to upgrade my Jenkins on a Solaris SPARC machine. I have been using Jenkins version 1.528 and the java version is "1.6.0_65".
I tried to install 1.565.1 on this server, I was able to start it using "java -jar jenkins.war --httpPort=8086"
Aug 13, 2014 2:52:16 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Started SelectChannelConnector#0.0.0.0:8086
Aug 13, 2014 2:52:16 PM winstone.Logger logInternal
INFO: Winstone Servlet Engine v2.0 running: controlPort=disabled
Aug 13, 2014 2:52:18 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Aug 13, 2014 2:52:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Aug 13, 2014 2:52:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
Aug 13, 2014 2:52:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Aug 13, 2014 2:52:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Aug 13, 2014 2:52:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Aug 13, 2014 2:52:37 PM org.jenkinsci.main.modules.sshd.SSHD start
INFO: Started SSHD at port 54927
Aug 13, 2014 2:52:37 PM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Aug 13, 2014 2:52:37 PM hudson.TcpSlaveAgentListener <init>
INFO: JNLP slave agent listener started on TCP port 54928
Aug 13, 2014 2:52:37 PM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running
but the homepage never loads on browser. I see there is something listening on the port but the connnetion is in CLOSE_WAIT status.
bash-3.2$ lsof -i |grep 8086
java 26329 acs 7u IPv4 0x3018556b840 0t0 TCP *:8086 (LISTEN)
java 26329 acs 105u IPv4 0x30278e93900 0t0 TCP server:8086->user-machine:54670 (ESTABLISHED)
java 26329 acs 750u IPv4 0x300b9af9900 0t0 TCP server:8086->user-machine:54671 (CLOSE_WAIT)
java 26329 acs 751u IPv4 0x301ab4f0080 0t0 TCP server:8086->user-machine:54672 (CLOSE_WAIT)
I tried other version 1.532 and it worked but it did not work for 1.534
I tried the same version 1.565.3 on a Linux server and it worked there, It had java version "1.7.0_45". Has anyone else faced this issue?
We have got the same problem on Solaris 11.1.
SunOS XXXXX 5.11 11.1 sun4v sparc sun4v
We are so far using 5.32.1 stable working. 5.80.3 not working.
There is no respond on wget. We are using default port 8080 and neither on wget nor on browser a connection can be established.
This issue is not fixed, I have opened a JIRA ticket on Jenkins forum
JENKINS-24357
There are a few related tickets as well
i downloaded the google app engine plugin for eclipse and i opened a new web project.
but when i try to run this project (untouched) the eclipse say:
"The server is running at http://localhost:8888/"
so i opened the browser and i get 101 error
"The connection to localhost was interrupted."
what i did wrong?
here is what the console present:
Dec 21, 2011 12:10:03 AM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Dec 21, 2011 12:10:03 AM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\Users\sl300\Synca\try2\war\WEB-INF/appengine-web.xml
Dec 21, 2011 12:10:03 AM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed C:\Users\sl300\Synca\try2\war\WEB-INF/web.xml
Dec 21, 2011 2:10:04 AM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at http://localhost:8888/
Dec 21, 2011 2:10:04 AM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The admin console is running at http://localhost:8888/_ah/admin
(little details: i have windows vista, eclipse Helios Service Release 2.
i tried with jre6 or jre7 )
This can occur because of your 'Hosts File Configuration' or 'Proxy settings' or 'Anti-Virus software on your system' or if you are using web-debugging/http-logging tools like Fiddler or TCPMon. Correct the configuration if it is not properly set and try it again.
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.