Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
589 views
in Technique[技术] by (71.8m points)

java - Getting 404 though my app is deployed

Jenkins shows that the build was successful (see log below) and I can see the war in
/app-root/runtime/repo/target/0.1-MVP

The tomcat webapps (jwboss/webapps) contains only ROOT.war.

How I can navigate to my deployed app? I am using the tomcat gear. Is there a server manager UI? (something like tomcat manager) Don't know if it matters but I using Spring for my application

I tried:

<openshift_application_name>.rhcloud.com/<MY REST PATH>
<openshift_application_name>.rhcloud.com/<myWebAppName>/<MY REST PATH>

I am getting 404 on both

http://mirror1.ops.rhcloud.com/nexus/content/groups/public/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar (422 KB at 2925.7 KB/sec) [INFO] Packaging webapp [INFO] Assembling webapp [initial] in [/var/lib/openshift/52dbe400e0b8cdce430000d0/app-root/runtime/repo/target/0.1-MVP] [INFO] Processing war project [INFO] Copying webapp resources [/var/lib/openshift/52dbe400e0b8cdce430000d0/app-root/runtime/repo/src/main/webapp] [INFO] Webapp assembled in [531 msecs] [INFO] Building war: /var/lib/openshift/52dbe400e0b8cdce430000d0/app-root/runtime/repo/target/0.1-MVP.war [INFO] WEB-INF/web.xml already added, skipping [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1:37.456s [INFO] Finished at: Sun Jan 19 09:44:11 EST 2014 [INFO] Final Memory: 19M/86M [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "openshift" could not be activated because it does not exist. + /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh @.rhcloud.com 'gear stop --conditional --exclude-web-proxy --git-ref 086d26cc8c980ca3144fcf1b5a524d521e3758b5' Stopping gear... Stopping jbossews cartridge Sending SIGTERM to jboss:410122 ... kill -9 410376 kill -9 410122 ++ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh @.rhcloud.com 'gear create-deployment-dir' + deployment_dir=2014-01-19_09-44-28.240 + rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/52dbe400e0b8cdce430000d0//app-deployments/current/metadata.json @.rhcloud.com:app-deployments/2014-01-19_09-44-28.240/metadata.json + rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh --exclude .git /var/lib/openshift/52dbe400e0b8cdce430000d0/app-root/runtime/repo/ @.rhcloud.com:app-root/runtime/repo/ + rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/52dbe400e0b8cdce430000d0/app-root/runtime/build-dependencies/ @.rhcloud.com:app-root/runtime/build-dependencies/ + rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/52dbe400e0b8cdce430000d0/app-root/runtime/dependencies/ @.rhcloud.com:app-root/runtime/dependencies/ + /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh @.rhcloud.com 'gear remotedeploy --deployment-datetime 2014-01-19_09-44-28.240' Preparing build for deployment Deployment id is 2e006237 Activating deployment + tmp=/var/lib/openshift//jbossews//tmp + '[' -d /var/lib/openshift//jbossews//tmp ']' + for d in '$tmp/' + '[' -d '/var/lib/openshift//jbossews//tmp/' ']' ++ ls /var/lib/openshift//app-root/runtime/repo//webapps + '[' '' ']' Starting jbossews cartridge Found 127.13.77.129:8080 listening port Archiving artifacts Finished: SUCCESS

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Check your pom.xml to make sure that you have an openshift profile like the one that is shown here:https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-jbossews/template/pom.xml

Or else openshift doesn't know what to do with the war file once it's built.

According to this error: [WARNING] The requested profile "openshift" could not be activated because it does not exist


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...