在 openshift 上部署 grails war 文件后显示空白页

shows blank page after deploying a grails war file on openshift

我使用以下指南 (deploy war file using git) 创建 tomcat 7(JBoss EWS 2.0) 应用程序后将 war 文件部署到 openshift 但在部署我的应用程序后,它只显示一个空白页面。这是我使用 rhc tail 命令获得的日志。

==> app-root/logs/jbossews.log <==
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1571)
        at net.sf.ehcache.util.concurrent.ConcurrentHashMap$ValuesView.iterator(
ConcurrentHashMap.java:3252)
        at net.sf.ehcache.statistics.extended.ExtendedStatisticsImpl.run(Exten
dedStatisticsImpl.java:104)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47
1)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
access1(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
        at java.lang.Thread.run(Thread.java:745)

==> app-root/logs/mysql.log <==
160420 10:20:46 InnoDB: highest supported file format is Barracuda.
160420 10:20:46  InnoDB: Waiting for the background threads to start
160420 10:20:47 InnoDB: 5.5.45 started; log sequence number 1595675
160420 10:20:47 [Note] Server hostname (bind-address): '127.9.179.2'; port: 3306

160420 10:20:47 [Note]   - '127.9.179.2' resolves to '127.9.179.2';
160420 10:20:47 [Note] Server socket created on IP: '127.9.179.2'.
160420 10:20:47 [Warning] 'proxies_priv' entry '@ root@ex-std-node563.prod.rhclo
ud.com' ignored in --skip-name-resolve mode.
160420 10:20:47 [Note] Event Scheduler: Loaded 0 events
160420 10:20:47 [Note] /opt/rh/mysql55/root/usr/libexec/mysqld: ready for connec
tions.
Version: '5.5.45'  socket: '/var/lib/openshift/571649900c1e669c5c00017c/mysql//s
ocket/mysql.sock'  port: 3306  MySQL Community Server (GPL)

==> app-root/logs/phpmyadmin.log <==
[Tue Apr 19 11:24:41 2016] [notice] Apache/2.2.15 (Unix) PHP/5.3.3 configured --
 resuming normal operations
[Tue Apr 19 12:27:32 2016] [notice] SIGHUP received.  Attempting to restart
[Tue Apr 19 12:27:32 2016] [notice] Digest: generating secret for digest authent
ication ...
[Tue Apr 19 12:27:32 2016] [notice] Digest: done
[Tue Apr 19 12:27:32 2016] [notice] Apache/2.2.15 (Unix) PHP/5.3.3 configured --
 resuming normal operations
[Wed Apr 20 10:20:38 2016] [notice] caught SIGWINCH, shutting down gracefully
[Wed Apr 20 10:21:05 2016] [notice] SELinux policy enabled; httpd running as con
text unconfined_u:system_r:openshift_t:s0:c4,c884
[Wed Apr 20 10:21:05 2016] [notice] Digest: generating secret for digest authent
ication ...
[Wed Apr 20 10:21:05 2016] [notice] Digest: done
[Wed Apr 20 10:21:05 2016] [notice] Apache/2.2.15 (Unix) PHP/5.3.3 configured --
 resuming normal operations

我部署的 war 文件的名称是 ROOT.war 使用 git 推送并且它部署 successfully.i 我正在使用mysql 数据库和 phpmyadmin 墨盒。 我只是想弄清楚为什么当我尝试访问我的应用程序的 url 时它会显示一个空白页面。

提前致谢。

你提供的日志一点帮助都没有,因为它不完整,我什至看不到抛出什么异常。

这是关于在 OpenShift 上部署 grails 应用程序的最佳文章,它将对您有很大帮助: Grails on Openshift

此外,如果您使用 ftp 来查看您的服务器上发生了什么,故障排除会更有效率 Using FileZilla and SFTP on Windows with OpenShift

在@Taras Kohut 的帮助下,我已经解决了这个问题。我将以下行添加到我的 BuildConfig.groovy 文件中。

 grails.project.war.exploded.dir = "/yourLocalPathToClonedOpenshiftFile/webapps/ROOT"
 grails.war.exploded=true

以上几行将在您的 openshift 应用程序的 webapps 文件夹中生成一个展开的 war 文件。
接下来我在 webapps 中再次添加 ROOT.war.deploy 文件 directory.This 是一个文件,它指示 jboss 在推送之后它必须获取 ROOT 文件夹并部署它在 Tomcat(由 JBoss 模拟)上,就好像它是一个 war 文件一样。 之后我提交并推送了我的更改,应用程序部署成功,一切正常。