为什么我的Openshift部署不会改变我的网页?

时间:2016-03-17 10:56:12

标签: java git openshift

虽然我将我的webapp部署到Openshift是一个安静的网络服务应用程序,但我在网页上看不到任何结果。

我只有一个说“Hello World”的JSP,但是当我访问URL时,OpenShift仍然向我显示“入门页面”,当我ping通web服务时,我只得到404.

git push的反应是:

remote: [INFO] Building war: /var/lib/openshift/56e7f1bc89f5cf8c7000003d/app-root/runtime/repo/target/granojobackend.war
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] BUILD SUCCESS
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] Total time: 14.300s
remote: [INFO] Finished at: Thu Mar 17 06:50:43 EDT 2016
remote: [INFO] Final Memory: 22M/158M
remote: [INFO] ------------------------------------------------------------------------
remote: [WARNING] The requested profile "openshift" could not be activated because it does not exist.
remote: Preparing build for deployment
remote: Deployment id is 639a5131
remote: Activating deployment
remote: Starting MySQL 5.5 cartridge
remote: Starting PHPMyAdmin cartridge
remote: Starting jbossews cartridge
remote: jbossews process failed to start
remote: -------------------------
remote: Git Post-Receive Result: failure
remote: Activation status: failure
remote: Activation failed for the following gears:
remote: 56e7f1bc89f5cf8c7000003d (Error activating gear: CLIENT_ERROR: Failed to execute: 'control start' for /var/lib/openshift/56e7f1bc89f5cf8c7000003d/jbossews
remote: #<IO:0x000000014283c0>
remote: #<IO:0x00000001428348>
remote: )
remote: Deployment completed with status: failure
remote: postreceive failed
To ssh://56e7f1bc89f5cf8c7000003d@granojobackend-f1987.rhcloud.com/~/git/granojobackend.git/
   98751dc..55bc085  master -> master

所以,我的问题是......我需要ping哪个URL?我测试/ granojobackend但它不起作用。 还有什么我需要做的吗?

另一个问题..是否可以将Openshift与Java1.8和Tomcat 8一起使用?在Openshift中,我使用的是java 1.7和Tomcat 7,但我想转移到tomcat 8和java 1.8。

1 个答案:

答案 0 :(得分:0)

您的问题是您错过了openshift

上的pom.xml个人资料
[WARNING] The requested profile "openshift" could not be activated because it does not exist.

你应该有like this

<profiles>
    <profile>
        <id>openshift</id>
        <build>
            <finalName>app_name</finalName>
            <plugins>
                <plugin>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.1.1</version>
                    <configuration>
                        <outputDirectory>webapps</outputDirectory>
                        <warName>ROOT</warName>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>