2014-10-03 54 views
0

我添加了一個新的openshift應用程序。我遵循指示並通過git push上傳我的代碼。無法看到Openshift應用程序

上傳日誌似乎是罰款:

1)ROOT.war得到創建:

remote: [INFO] Packaging webapp 
remote: [INFO] Assembling webapp [opinion] in [/var/lib/openshift/542ee542e0b8cd 
2ca700037d/app-root/runtime/repo/target/opinion] 
remote: [INFO] Processing war project 
remote: [INFO] Copying webapp resources [/var/lib/openshift/542ee542e0b8cd2ca700 
037d/app-root/runtime/repo/src/main/webapp] 
remote: [INFO] Webapp assembled in [108 msecs] 
remote: [INFO] Building war: /var/lib/openshift/542ee542e0b8cd2ca700037d/app-roo 
t/runtime/repo/webapps/ROOT.war 
remote: [INFO] WEB-INF/web.xml already added, skipping 
remote: [INFO] ----------------------------------------------------------------- 
------- 
remote: [INFO] BUILD SUCCESS 
remote: [INFO] ----------------------------------------------------------------- 
------- 
remote: [INFO] Total time: 1:24.196s 
remote: [INFO] Finished at: Fri Oct 03 14:11:18 EDT 2014 
remote: [INFO] Final Memory: 9M/91M 
remote: [INFO] ----------------------------------------------------------------- 

2)部署是成功的

remote: + rm -rf /var/lib/openshift/542ee542e0b8cd2ca700037d/jbossews//work/ 
remote: ++ ls /var/lib/openshift/542ee542e0b8cd2ca700037d/app-root/runtime/repo/ 
/webapps 
remote: + '[' 'META-INF 
remote: ROOT.war 
remote: WEB-INF 
remote: css 
remote: fonts 
remote: img 
remote: js' ']' 
remote: + rsync -rS --delete /var/lib/openshift/542ee542e0b8cd2ca700037d/app-roo 
t/runtime/repo//webapps/ /var/lib/openshift/542ee542e0b8cd2ca700037d/jbossews//w 
ebapps/ 
remote: + hot_deploy_enabled_for_latest_deployment 
remote: ++ ruby_sdk latest_deployment_metadata.hot_deploy 
remote: ++ oo-ruby -I/usr/lib/openshift/cartridge_sdk -rruby/sdk -e 'include Ope 
nShift::CartridgeSdk; puts latest_deployment_metadata.hot_deploy' 
remote: + enabled=false 
remote: + '[' false == true ']' 
remote: + return 1 
remote: Starting jbossews cartridge 
remote: Found 127.4.212.129:8080 listening port 
remote: ------------------------- 
remote: Git Post-Receive Result: success 
remote: Activation status: success 
remote: Deployment completed with status: success 
To ssh://[email protected]/~/git/opinion. 
git/ 
    e2a907c..08d3a44 master -> master 

然而,當我打網址(http://opinion-expertviews.rhcloud.com)我仍然看到 「歡迎使用OpenShift上的JBossEWS(Apache/Tomcat)」屏幕

我錯過了什麼?

解決:

我被錯誤地上傳我的文件。修正方法:

  • 我編譯我的項目進入一個war文件,把它放到web應用 夾在openshift的git目錄的根目錄。

  • 取出的pom.xml

  • 文件推送的更新文件夾到我的應用程序

  • 應用現已在:

    http://app_name-namespace.rhcloud.com/app_name

非常感謝您的幫助和指導我,雖然這是愚蠢的我,既然你正在部署比ROOT.war其他名稱WAR文件錯過這些點

+1

你刪除或替換缺省應用程序附帶的index.html頁面?或者你是否爲根上下文指定了一個新頁面?另外,你做了一個git add來添加所有新文件嗎? – 2014-10-03 18:25:37

+0

不,我沒有..關於如何用我自己的文件修改默認應用程序的任何文檔? 我將我的java內容添加到src文件夾,並將我的web內容添加到位於根目錄的webcontent文件夾中 – Arnab 2014-10-03 18:32:07

+1

您是否正在測試在本地運行應用程序以查看war文件是否正常工作?你用什麼java墨盒? – 2014-10-03 18:38:35

回答

相關問題