Grails Deployed on Openshift But showing service unavailable (503) - grails

Deployed a grails app successfully on openshift. As the log doesnt show any error. But the page I am getting is still 503.
Please help.
My Log is :
Apr 30, 2014 8:58:57 AM org.apache.catalina.startup.ClusterRuleSetFactory getClusterRuleSet
INFO: Unable to find a cluster rule set in the classpath. Will load the default rule set.
Apr 30, 2014 8:58:57 AM org.apache.catalina.startup.ClusterRuleSetFactory getClusterRuleSet
INFO: Unable to find a cluster rule set in the classpath. Will load the default rule set.
Apr 30, 2014 8:59:00 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: /opt/rh/mysql55/root/usr/lib64:/usr/java/packages/lib/i386:/lib:/usr/lib
Apr 30, 2014 8:59:02 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-127.5.178.1-8080
Apr 30, 2014 8:59:02 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 5493 ms
Apr 30, 2014 8:59:02 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 30, 2014 8:59:02 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.37
Apr 30, 2014 8:59:02 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT.war
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Configuring Spring Security UI ...
... finished configuring Spring Security UI
Apr 30, 2014 9:04:42 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-127.5.178.1-8080
Apr 30, 2014 9:04:43 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 340606 ms

Got It !!!
It was haproxy at the end. after a day of headscratching I got it when I sat with a cooler mind and thought through everything.
This is the link for dealing with 503 error.
https://www.openshift.com/blogs/how-to-host-your-java-ee-application-with-auto-scaling
I did not use rhc to connect to haproxy conf though. I used putty.

Related

Grails project deployed on server successfully but not getting up on browser

i had deployed my project on Aws ec2 server according to this link: http://grails.asia/step-by-step-tutorial-on-how-to-host-your-grails-application
And its has been deployed successfully as my bootstrap has been executed and i
have given some println in it which are getting shown on tomcat's catalina.out.
and also the bootstraped data has been already inserted into mysql db. I
guess, it means that my application is running somewhere. But when i am trying
to hit the url according to above link its not getting dispalyed on browser.
I am hitting : https://35.154.163.145:8080/jobVacency/
where "35.154.163.145" is my aws IPv4 Public IP and
jobVacency is my project name.
Catalina.out:
Apr 14, 2017 8:19:19 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://www.springframework.org/tags/form is already defined
Apr 14, 2017 8:19:20 AM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
WARNING: Module [groovy-all] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods]
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Bootstrap started.
Bootstrap ended.
Apr 14, 2017 8:19:48 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /va`enter code here`r/lib/tomcat7/webapps/ROOT
Apr 14, 2017 8:19:50 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Apr 14, 2017 8:19:50`enter code here` AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 42043 ms

Jenkins new install (win8) fails to display website with HttpParser warning

After installing Jenkins on my Win8 machine, both from the latest/greatest and from the stable line, Jenkins fails to show the website. The logs indicate that Jenkins is running. The error log has the following data in it:
May 31, 2014 10:56:34 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
May 31, 2014 10:56:37 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: jetty-8.y.z-SNAPSHOT
May 31, 2014 10:56:39 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: NO JSP Support for , did not find org.apache.jasper.servlet.JspServlet
May 31, 2014 10:56:39 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Started SelectChannelConnector#0.0.0.0:8080
May 31, 2014 10:56:39 PM winstone.Logger logInternal
INFO: Winstone Servlet Engine v2.0 running: controlPort=disabled
May 31, 2014 10:56:40 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
May 31, 2014 10:56:52 PM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: HttpParser Full for SCEP#11aee49{l(/0:0:0:0:0:0:0:1:58237)<->r(/0:0:0:0:0:0:0:1:8080),s=1,open=true,ishut=false,oshut=false,rb=false,wb=false,w=true,i=0r}-{AsyncHttpConnection#1120157,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-1,l=5755,c=-3},r=0}
May 31, 2014 10:56:52 PM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: HttpParser Full for SCEP#1d5d4e5{l(/0:0:0:0:0:0:0:1:58238)<->r(/0:0:0:0:0:0:0:1:8080),s=1,open=true,ishut=false,oshut=false,rb=false,wb=false,w=true,i=1r}-{AsyncHttpConnection#18c3269,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-1,l=5841,c=-3},r=0}
From searching online it looks like it might be an issue with Jetty. The issue provides states that it can be alleviated by updating some settings in the jetty configuration however I have not been able to find these in the Jenkins configuration where I'd assume they would need to be.
The question is does anybody have any suggestions on how to determine what the issue is and then on how to go about fixing it?

Tomcat Context stopped Grails GGTS Cloudfoundry plugin

I'm using the cloud foundry plugin. I have set my credentials in Config.groovy.
Can you tell me more about the errors I get?
Application Deployed URL: 'sqr-gb-ks.cloudfoundry.com'
>
Would you like to create and bind a mysql service?[y,n] > Invalid input. Must be one of [y,n] y
Service 'mysql-8a02c10' provisioned.
>
Would you like to create and bind a postgresql service?[y,n] > Invalid input. Must be one of [y,n] y
Service 'postgresql-d6ab9c9' provisioned.
| Creating application sqr-gb-ks at sqr-gb-ks.cloudfoundry.com with 1024MB and services [mysql-8a02c10, postgresql-d6ab9c9]: OK
| Uploading Application:
| Checking for available resources: OK
| Processing resources: OK
| Packing application: OK
| Uploading (50K): OK
| Trying to start Application: 'sqr-gb-ks'.....
| Error ERROR - Application 'sqr-gb-ks' failed to start, logs information below.
==== logs/stderr.log ====
Oct 22, 2012 4:57:47 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-25918
Oct 22, 2012 4:57:47 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 403 ms
Oct 22, 2012 4:57:47 PM org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name Catalina
Oct 22, 2012 4:57:47 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 22, 2012 4:57:47 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
Oct 22, 2012 4:57:47 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Oct 22, 2012 4:58:10 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Oct 22, 2012 4:58:10 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
Oct 22, 2012 4:58:10 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
Oct 22, 2012 4:58:10 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [net.sf.ehcache.CacheManager#403525a2] but has failed to stop it. This is very likely to create a memory leak.
==== logs/stdout.log ====
[ Envjs/1.6 (Rhino; U; Linux amd64 2.6.38-15-virtual; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ]
[ Envjs/1.6 (Rhino; U; Linux amd64 2.6.38-15-virtual; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ]
[ Envjs/1.6 (Rhino; U; Linux amd64 2.6.38-15-virtual; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ]
[ Envjs/1.6 (Rhino; U; Linux amd64 2.6.38-15-virtual; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ]
Stopping Tomcat because the context stopped.
If it's a Grails app you should use the http://grails.org/plugin/cloud-foundry plugin instead of STS since it has an awareness of the Spring beans for JDBC, MongoDB, Redis, etc. and will reconfigure them automatically for you on deployment. See the docs here: http://grails-plugins.github.com/grails-cloud-foundry/docs/manual/index.html
Also - do you really want both a MySQL and a PostgreSQL database? You should probably pick one :)
You can see the actual problem by looking at stacktrace.log and the "localhost" log in the tomcat/logs directory on the server - that's where the real stacktrace and error messages will be, not in the stdout that you see when deploying.
Thanks to my friend bertrand from odelia technologies, I succeeded in pushing my app to the cloud.I turned off one of the plugins I added and ran the command :
grails cf-bind-service mysql-f1..(I had not done it!)
Then I had to modify my DataSource.groovy;
production {
dataSource {
dialect= org.hibernate.dialect.MySQLInnoDBDialect
driverClassName = "com.mysql.jdbc.Driver"
dbCreate = "update"
username = "n/a"
password = "n/a"
url = "n/a"
}
}

Tomcat 7 not starting with grails app

My app runs on my machine but not im tomcat this is my log :
Oct 12, 2012 2:48:23 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-6-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib
Oct 12, 2012 2:48:24 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Oct 12, 2012 2:48:24 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Oct 12, 2012 2:48:24 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 904 ms
Oct 12, 2012 2:48:24 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Oct 12, 2012 2:48:24 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.32
Oct 12, 2012 2:48:24 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /usr/local/fypTomcat/webapps/FYP.war
log4j:WARN No appenders could be found for logger (org.codehaus.groovy.grails.commons.cfg.ConfigurationHelper).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Configuring Spring Security UI ...
... finished configuring Spring Security UI
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Oct 12, 2012 2:49:15 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Oct 12, 2012 2:49:15 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/FYP] startup failed due to previous errors
Oct 12, 2012 2:49:15 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/FYP] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
Oct 12, 2012 2:49:15 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/FYP] appears to have started a thread named [net.sf.ehcache.CacheManager#16394576] but has failed to stop it. This is very likely to create a memory leak.
Oct 12, 2012 2:49:15 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/FYP] appears to have started a thread named [com.fyp.timeline.Role.data] but has failed to stop it. This is very likely to create a memory leak.
Oct 12, 2012 2:49:15 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/FYP] created a ThreadLocal with key of type [org.codehaus.groovy.reflection.ClassInfo.ThreadLocalMapHandler] (value [org.codehaus.groovy.reflection.ClassInfo$ThreadLocalMapHandler#746231ed]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference#5abbfa4c]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Oct 12, 2012 2:49:15 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Oct 12, 2012 2:49:15 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Oct 12, 2012 2:49:15 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 51609 ms
101,1 Bot
Any Ideas what causes this?
This is a message from catalina.out file. Take a look at localhost.[date].log (e.g. localhost.2012-10-12.log). It should contain all details and stacktrace.
This may be the solution to your problem -
http://java.dzone.com/articles/tomcat-6-infamous-%E2%80%9Csevere
we had this error because of the log4j config. You need to change it to write to the tomcat log directory.
It seems it is now fixed in 2.1.4+ version of Grails. See http://grails.org/2.1.4%20Release%20Notes

Error while deploying on cloud using cloud foundry

I have installed cloud foundry plugin on my grails project and I have successfully pushed my project once onto the cloud but when I tried to update my app using,
grails prod cf-update
command. When I did this, I get the following error:
ERROR - Application 'scheduleNew' failed to start, logs information below.
==== logs/stderr.log ====
Jan 23, 2012 2:45:02 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8963
Jan 23, 2012 2:45:02 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 378 ms
Jan 23, 2012 2:45:02 AM org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name Catalina
Jan 23, 2012 2:45:02 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 23, 2012 2:45:02 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
Jan 23, 2012 2:45:02 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Jan 23, 2012 2:45:12 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jan 23, 2012 2:45:12 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
Jan 23, 2012 2:45:12 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
Jan 23, 2012 2:45:12 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [net.sf.ehcache.CacheManager#7e628e42] but has failed to stop it. This is very likely to create a memory leak.
Jan 23, 2012 2:45:12 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [org.example.SecRole.data] but has failed to stop it. This is very likely to create a memory leak.
Jan 23, 2012 2:45:12 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [org.hibernate.cache.UpdateTimestampsCache.data] but has failed to stop it. This is very likely to create a memory leak.
Jan 23, 2012 2:45:12 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [org.hibernate.cache.StandardQueryCache.data] but has failed to stop it. This is very likely to create a memory leak.
==== logs/stdout.log ====
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Stopping Tomcat because the context stopped.
When I again run the same command (grails prod cf-update), the error message getting changed :
ERROR - Application 'scheduleNew' failed to start, logs information below.
==== logs/stderr.log ====
Jan 23, 2012 2:52:14 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-45003
Jan 23, 2012 2:52:14 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 379 ms
Jan 23, 2012 2:52:14 AM org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name Catalina
Jan 23, 2012 2:52:14 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 23, 2012 2:52:14 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
Jan 23, 2012 2:52:14 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
I really don't understand whats going on here.
What these error messages say? Where I have went wrong?
There are other log files. If you use the http://grails-plugins.github.com/grails-cloud-foundry/docs/manual/ref/Scripts/cf-list-files.html command you can get a directory listing. Run grails cf-list-files / to get a listing of the top-level directory (it'll contain a logs and a tomcat directory). The logs directory will probably just have the stderr and stdout files that you're already seeing, but there's another logs directory under the tomcat directory: grails cf-list-files /tomcat/logs. This should have other more informative log files. Also check if there's a stacktrace.log in the tomcat directory.
Once you've found a file you want to look at, use the http://grails-plugins.github.com/grails-cloud-foundry/docs/manual/ref/Scripts/cf-get-file.html command to view them, e.g.
grails cf-get-file /tomcat/stacktrace.log
grails cf-get-file /tomcat/logs/catalina.2012-01-24.log

Resources