【问题标题】:shows blank page after deploying a grails war file on openshift在 openshift 上部署 grails war 文件后显示空白页
【发布时间】:2016-04-20 15:18:50
【问题描述】:

在使用以下指南 (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$1.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.
access$301(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

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

提前致谢。

【问题讨论】:

    标签: mysql tomcat grails openshift war


    【解决方案1】:

    你提供的日志一点用都没有,因为没有满,我什至看不到抛出了什么异常。

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

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

    【讨论】:

    • tnx 非常。您提供的第一个链接使我找到了解决问题的方法。我将在下面发布完整的答案。
    • 没问题。如果有帮助,您可以投票或接受此帖子
    【解决方案2】:

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

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-16
      • 2023-01-01
      • 2010-11-02
      • 1970-01-01
      • 1970-01-01
      • 2022-10-23
      相关资源
      最近更新 更多