我对AWS和tomcat,jenkins和spring引导颇为陌生。我无法在服务器中显示已部署的网站。当我测试URL时会说“localhost:8181 /#/ dashboard”,我知道当我在tomcat中部署项目时,URL必须是项目的名称。所以对于这个项目,它应该是“someurl/HousingManagementSystem /”,但它会返回404。在我的tomcat管理器html中,它显示项目正在运行。成功将.war文件部署到tomcatv8.5.20服务器,通过jenkins不会在浏览器中显示
这里是詹金斯说,当它完成建设项目(仅适用于部署的一部分)
18:51:38 Deploying /home/ec2=user/.jenkins/workspace/HousingManagementSystem/target/HousingManagementSystem-0.0.1-SNAPSHOT.war to container Tomcat 8.x Remote with context /HousingManagementSystem
18:51:38 Redeploying [/home/ec2-user/.jenkins/workspace/HousingManagementSystem/target/HousingManagementSystem-0.0.1-SNAPSHOT.war]
18:51:38 Undeploying [/home/ec2-user/.jenkins/workspace/HousingManagementSystem/target/HousingManagementSystem-0.0.1-SNAPSHOT.war]
18:51:39 Deploying [/home/ec2-user/.jenkins/workspace/HousingManagementSystem/target/HousingManagementSystem-0.0.1-SNAPSHOT.war]
18:51:43 Finished: SUCCESS
现在,这表明它被部署在这里也卡塔利娜日志:
31-Aug-2017 18:54:50.810 INFO [Executor #0 for master : executing
HousingManagementSystem #18] jenkins.plugins.slack.SlackNotifier.prebuild
Invoking Started...
31-Aug-2017 18:54:51.078 INFO [Executor #0 for master : executing
HousingManagementSystem #18]
jenkins.plugins.slack.StandardSlackService.publish Posting succeeded
31-Aug-2017 18:55:50.135 WARNING [Computer.threadPoolForRemoting [#6] for
Channel to Maven [/usr/java/latest/bin/java, -cp, /home/ec2-
user/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-
1.11.jar:/usr/apache/apache-maven-3.5.0/boot/plexus-classworlds-
2.5.2.jar:/usr/apache/apache-maven-3.5.0/conf/logging,
jenkins.maven3.agent.Maven35Main, /usr/apache/apache-maven-3.5.0,
/usr/apache/apache-tomcat-8.5.20/webapps/jenkins/WEB-INF/lib/remoting-
3.10.jar, /home/ec2-user/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-
interceptor-1.11.jar, /home/ec2-user/.jenkins/plugins/maven-plugin/WEB-
INF/lib/maven3-interceptor-commons-1.11.jar, 43475] id=255]
hudson.XmlFile.replaceIfNotAtTopLevel JENKINS-45892: reference to
[email protected][HousingManagementSystem] being saved but
not at top level
31-Aug-2017 18:55:50.808 INFO [Executor #0 for master : executing
HousingManagementSystem #18] hudson.model.Run.execute HousingManagementSystem
#18 main build action completed: SUCCESS
31-Aug-2017 18:55:51.686 INFO [http-nio-8181-exec-16]
org.apache.catalina.startup.HostConfig.undeploy Undeploying context
[/HousingManagementSystem]
31-Aug-2017 18:55:52.038 INFO [http-nio-8181-exec-16]
org.apache.catalina.startup.HostConfig.deployWAR Deploying web application
archive [/usr/apache/apache-tomcat-
8.5.20/webapps/HousingManagementSystem.war]
31-Aug-2017 18:55:54.357 INFO [http-nio-8181-exec-16]
org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
application archive [/usr/apache/apache-tomcat-
8.5.20/webapps/HousingManagementSystem.war] has finished in [2,319] ms
31-Aug-2017 18:55:54.560 INFO [Executor #0 for master : executing
HousingManagementSystem #18]
jenkins.plugins.slack.StandardSlackService.publish Posting succeeded
唯一显示警告的事情是这样的:
31-Aug-2017 18:55:50.135 WARNING [Computer.threadPoolForRemoting [#6] for
Channel to Maven [/usr/java/latest/bin/java, -cp, /home/ec2-
user/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-
1.11.jar:/usr/apache/apache-maven-3.5.0/boot/plexus-classworlds-
2.5.2.jar:/usr/apache/apache-maven-3.5.0/conf/logging,
jenkins.maven3.agent.Maven35Main, /usr/apache/apache-maven-3.5.0,
/usr/apache/apache-tomcat-8.5.20/webapps/jenkins/WEB-INF/lib/remoting-
3.10.jar, /home/ec2-user/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-
interceptor-1.11.jar, /home/ec2-user/.jenkins/plugins/maven-plugin/WEB-
INF/lib/maven3-interceptor-commons-1.11.jar, 43475] id=255]
hudson.XmlFile.replaceIfNotAtTopLevel JENKINS-45892: reference to
[email protected][HousingManagementSystem] being saved but
not at top level
我已经尝试过以前的解决方案,使他重新堆栈溢出但无济于事。有什么想法吗?
2017-08-31
SkiiNet
+0
你说你想通过'localhost',但它是一个远程EC2服务器上运行来访问它? –
+0
用于通过本地主机访问它的测试。但我部署在一个ec2服务器,我试图通过服务器访问它 –
+0
当你去/HousingManagementSystem你看到一个Tomcat的404页面? –