Openshift不显示给定URL的应用程序

时间:2014-04-18 19:41:09

标签: openshift

我一直在尝试将我自己的应用程序部署到openshift,我按照说明操作并启动了Tomcat 7实例,MySql盒式磁带,所有这些似乎都在运行。

当我点击网站网址时,会显示默认的openshift信息页面,我的应用程序是使用JSP / Servlet,mySQL编写的。

将代码推送到git,据我所知,推送没问题。见附件。

我的应用程序中有一个index.jsp,并设置了一个映射到urlPattern / home的欢迎文件,如下面的web.xml所示。

<?xml version="1.0" encoding="UTF-8"?>
<web-app
        xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
  http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
    <welcome-file-list>
        <welcome-file>post/index.jsp</welcome-file>
    </welcome-file-list>

推动openshift / git:

remote: [INFO] BUILD SUCCESS
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] Total time: 52.392s
remote: [INFO] Finished at: Fri Apr 18 14:36:05 EDT 2014   
remote: [INFO] Final Memory: 8M/77M
remote: [INFO] ------------------------------------------------------------------------
remote: Preparing build for deployment
remote: Deployment id is 527129b9
remote: Activating deployment
remote: + tmp=/var/lib/openshift/53516eaa4382ec7e990002c3/jbossews//tmp
remote: + '[' -d /var/lib/openshift/53516eaa4382ec7e990002c3/jbossews//tmp ']'
remote: + for d in '$tmp/*'
remote: + '[' -d '/var/lib/openshift/53516eaa4382ec7e990002c3/jbossews//tmp/*' ']'
remote: + '[' -d /var/lib/openshift/53516eaa4382ec7e990002c3/jbossews//work/ ']'
remote: + rm -rf /var/lib/openshift/53516eaa4382ec7e990002c3/jbossews//work/
remote: ++ ls /var/lib/openshift/53516eaa4382ec7e990002c3/app-root/runtime/repo//webapps
remote: + '[' ROOT.war ']'
remote: + rsync -r --delete /var/lib/openshift/53516eaa4382ec7e990002c3/app-root/runtime/repo//webapps/ /var/lib/opensh
ft/53516eaa4382ec7e990002c3/jbossews//webapps/
remote: Starting jbossews cartridge
remote: Found 127.6.235.1:8080 listening port
remote: -------------------------
remote: Git Post-Receive Result: success
remote: Activation status: success
remote: Deployment completed with status: success

任何帮助非常感谢。对不起新手的方法,但这是我的第一次:)

1 个答案:

答案 0 :(得分:0)

以下是我要进行故障排除的方法。由于您没有提及确切的错误消息,因此我将参考常规故障排除。这可以用于任何“路由不起作用”问题

通信流程为 浏览器>路线>服务>吊舱

竖立安装了卷曲的另一个吊舱。

首先卷曲到pod IP地址(如果是来自pod描述或oc get pod -o wide的,则可以获取pod)

如果按预期方式工作,请移至服务的下一层

卷曲到服务ip或主机名(oc get svc,此处是我们感兴趣的Cluster-ip)

如果这行得通,那么您可以尝试访问路由网址。

通过这种方式,您可以确定它到底在哪里破裂