deploying Grails app in Heroku

122 views
Skip to first unread message

Sherif Shehab

unread,
Nov 24, 2015, 3:33:39 PM11/24/15
to Grails Dev Discuss
Hi all , 

I'm trying to deploy Grails application to Heroku, and it's successfully deployed ,  here is the log :

|Done creating WAR target/PatientBoards-0.1.war
 
-----> No server directory found. Adding webapp-runner 7.0.57.2 automatically.
-----> Discovering process types
   
Procfile declares types     -> (none)
   
Default types for buildpack -> web
-----> Compressing... done, 132.4MB
-----> Launching... done, v5
   https
://patientboards.herokuapp.com/ deployed to Heroku

But when I go to https://patientboards.herokuapp.com the page is blank !

Am I missing something ?


Thanks

Sherif

Mike Burns

unread,
Nov 25, 2015, 11:23:50 AM11/25/15
to Grails Dev Discuss
Try running "heroku logs --tail"

When you first access the heroku app it can take 30-40 seconds to start the grails application, and the first call can cause an error.
Tailing the logs should let you see if anything is happening and if there are any errors.

I have successfully run grails.2.4 apps on heroku using the grails wrapper.

Sherif Shehab

unread,
Nov 25, 2015, 11:44:32 AM11/25/15
to grails-de...@googlegroups.com
Hi , 
i found this in the log :
2015-11-24T23:22:38.752616+00:00 app[web.1]: INFO: Illegal access: this   web application instance has been stopped already.  Could not load net.sf.ehcache.store.disk.DiskStore$KeySet.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
 2015-11-24T23:22:38.752617+00:00 app[web.1]: java.lang.IllegalStateException
2015-11-24T23:22:38.752618+00:00 app[web.1]:    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612)
2015-11-24T23:22:38.752618+00:00 app[web.1]:    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
 2015-11-24T23:22:38.752619+00:00 app[web.1]:    at net.sf.ehcache.store.disk.DiskStore.keySet(DiskStore.java:610)
 2015-11-24T23:22:38.752624+00:00 app[web.1]:    at net.sf.ehcache.store.disk.DiskStorageFactory$DiskExpiryTask.run(DiskStorageFactory.java:817)
2015-11-24T23:22:38.752625+00:00 app[web.1]:    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
2015-11-24T23:22:38.752647+00:00 app[web.1]:    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
2015-11-24T23:22:38.752648+00:00 app[web.1]:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
2015-11-24T23:22:38.752648+00:00 app[web.1]:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
2015-11-24T23:22:38.752649+00:00 app[web.1]:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
2015-11-24T23:22:38.752649+00:00 app[web.1]:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
2015-11-24T23:22:38.752650+00:00 app[web.1]:    at java.lang.Thread.run(Thread.java:745)
2015-11-24T23:22:38.752651+00:00 app[web.1]:
2015-11-24T23:25:38.811300+00:00 app[web.1]: Nov 24, 2015 11:25:38 PM org.apache.catalina.loader.WebappClassLoader loadClass
2015-11-24T23:25:38.811307+00:00 app[web.1]: INFO: Illegal access: this web application instance has been stopped already.  Could not load net.sf.ehcache.util.concurrent.ConcurrentHashMap$ValueIterator.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
2015-11-24T23:25:38.811309+00:00 app[web.1]: java.lang.IllegalStateException
2015-11-24T23:25:38.811310+00:00 app[web.1]:    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612)
2015-11-24T23:25:38.811311+00:00 app[web.1]:    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
2015-11-24T23:25:38.811312+00:00 app[web.1]:    at net.sf.ehcache.util.concurrent.ConcurrentHashMap$ValuesView.iterator(ConcurrentHashMap.java:3252)
2015-11-24T23:25:38.811312+00:00 app[web.1]:    at net.sf.ehcache.statistics.extended.ExtendedStatisticsImpl$1.run(ExtendedStatisticsImpl.java:104)
2015-11-24T23:25:38.811313+00:00 app[web.1]:    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
2015-11-24T23:25:38.811314+00:00 app[web.1]:    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
2015-11-24T23:25:38.811315+00:00 app[web.1]:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
2015-11-24T23:25:38.811315+00:00 app[web.1]:  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
2015-11-24T23:25:38.811316+00:00 app[web.1]:  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
2015-11-24T23:25:38.811317+00:00 app[web.1]:  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
2015-11-24T23:25:38.811318+00:00 app[web.1]:    at java.lang.Thread.run(Thread.java:745)
2015-11-24T23:25:38.811319+00:00 app[web.1]:
2015-11-24T23:27:24.541959+00:00 heroku[router]: at=info method=GET path="/" host=patientboards.herokuapp.com request_id=264982a9-7c89-492d-bf01-0aa72639cd75 fwd="176.61.71.119" dyno=web.1 connect=0ms service=28ms status=404 bytes=128

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/fa7d4d9b-5653-4298-b226-c13b30a6bf8d%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Sandro Martini

unread,
Dec 2, 2015, 12:05:45 PM12/2/15
to Grails Dev Discuss
Hi,
the problem in the Stacktrace seems that a cache plugin (enabled by default ?) is trying to read something from the disk, but Heroku hosted webapps doesn't publish a file system to read ... sorry.

Your webapp is based on Grails 2.x or 3.x ?
For Grails 3 you can try my sample (is fork on a recommended version by Heroku support) for Grails 3.0.x and Heroku, sources are here:

https://github.com/smartiniOnGitHub/grails3-example

I still have to make some update there to show how to make a MongoDB connection work, I'll do it when possible.
Remember to use latest 3.0.x for your tests.


The running version (usually put in sleep mode, but awaken when someone ask for it) is here:

http://grails3-example.herokuapp.com/


Hope it helps.

Bye,
Sandro



Il giorno mercoledì 25 novembre 2015 17:44:32 UTC+1, Sherif Shehab ha scritto:
Hi , 
i found this in the log :
2015-11-24T23:22:38.752616+00:00 app[web.1]: INFO: Illegal access: this   web application instance has been stopped already.  Could not load net.sf.ehcache.store.disk.DiskStore$KeySet.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
 2015-11-24T23:22:38.752617+00:00 app[web.1]: java.lang.IllegalStateException
2015-11-24T23:22:38.752618+00:00 app[web.1]:    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612)
2015-11-24T23:22:38.752618+00:00 app[web.1]:    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
 2015-11-24T23:22:38.752619+00:00 app[web.1]:    at net.sf.ehcache.store.disk.DiskStore.keySet(DiskStore.java:610)
 2015-11-24T23:22:38.752624+00:00 app[web.1]:    at net.sf.ehcache.store.disk.DiskStorageFactory$DiskExpiryTask.run(DiskStorageFactory.java:817)
2015-11-24T23:22:38.752625+00:00 app[web.1]:    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
2015-11-24T23:22:38.752647+00:00 app[web.1]:    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
2015-11-24T23:22:38.752648+00:00 app[web.1]:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
2015-11-24T23:22:38.752648+00:00 app[web.1]:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
2015-11-24T23:22:38.752649+00:00 app[web.1]:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
2015-11-24T23:22:38.752649+00:00 app[web.1]:    at java.util.concurrent.ThreadPoolExecutor$Worker.
...
Reply all
Reply to author
Forward
0 new messages