Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/403.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在tomcat上部署Jhipster注册表后,它的url是什么?_Java_Tomcat_Spring Boot_Jhipster - Fatal编程技术网

Java 在tomcat上部署Jhipster注册表后,它的url是什么?

Java 在tomcat上部署Jhipster注册表后,它的url是什么?,java,tomcat,spring-boot,jhipster,Java,Tomcat,Spring Boot,Jhipster,我想在tomcat上部署jhipster注册表war,部署成功,但我无法访问url。我试过http://localhost:8080/jhipster-注册表-2.5.8/和http://localhost:8761/#/两者都不起作用。我知道注册表的默认端口是8761,Tomcat会覆盖它吗 2017-02-23 10:19:05.782 INFO 89248 --- [ost-startStop-1] i.g.jhipster.registry.ApplicationWebXml : T

我想在tomcat上部署jhipster注册表war,部署成功,但我无法访问url。我试过
http://localhost:8080/jhipster-注册表-2.5.8/
http://localhost:8761/#/
两者都不起作用。我知道注册表的默认端口是8761,Tomcat会覆盖它吗

2017-02-23 10:19:05.782  INFO 89248 --- [ost-startStop-1] i.g.jhipster.registry.ApplicationWebXml  : The following profiles are active: prod
2017-02-23 10:19:08.230  WARN 89248 --- [ost-startStop-1] o.s.c.a.ConfigurationClassPostProcessor  : Cannot enhance @Configuration bean definition 'refreshScope' since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider decl
2017-02-23 10:19:09.221 DEBUG 89248 --- [ost-startStop-1] i.g.j.r.config.MetricsConfiguration      : Registering JVM gauges
2017-02-23 10:19:09.258 DEBUG 89248 --- [ost-startStop-1] i.g.j.r.config.MetricsConfiguration      : Initializing Metrics JMX reporting
2017-02-23 10:19:12.162  INFO 89248 --- [ost-startStop-1] i.g.j.registry.config.WebConfigurer      : Web application configuration, using profiles: [prod]
2017-02-23 10:19:12.176 DEBUG 89248 --- [ost-startStop-1] i.g.j.registry.config.WebConfigurer      : Initializing Metrics registries
2017-02-23 10:19:12.188 DEBUG 89248 --- [ost-startStop-1] i.g.j.registry.config.WebConfigurer      : Registering Metrics Filter
2017-02-23 10:19:12.190 DEBUG 89248 --- [ost-startStop-1] i.g.j.registry.config.WebConfigurer      : Registering Metrics Servlet
2017-02-23 10:19:12.198 DEBUG 89248 --- [ost-startStop-1] i.g.j.registry.config.WebConfigurer      : Registering Caching HTTP Headers Filter
2017-02-23 10:19:12.200  INFO 89248 --- [ost-startStop-1] i.g.j.registry.config.WebConfigurer      : Web application fully configured
2017-02-23 10:19:12.227  INFO 89248 --- [ost-startStop-1] i.g.jhipster.registry.JHipsterRegistry   : Running with Spring profile(s) : [prod]
2017-02-23 10:19:15.853  INFO 89248 --- [ost-startStop-1] com.netflix.discovery.DiscoveryClient    : Client configured to neither register nor query for data.
2017-02-23 10:19:15.883  INFO 89248 --- [ost-startStop-1] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1487863155883 with initial instances count: 0
2017-02-23 10:19:16.072  INFO 89248 --- [ost-startStop-1] c.n.eureka.DefaultEurekaServerContext    : Initializing ...
2017-02-23 10:19:16.075  INFO 89248 --- [ost-startStop-1] c.n.eureka.cluster.PeerEurekaNodes       : Adding new peer nodes [http://localhost:8761/eureka/]
2017-02-23 10:19:16.313  INFO 89248 --- [ost-startStop-1] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2017-02-23 10:19:16.321  INFO 89248 --- [ost-startStop-1] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2017-02-23 10:19:16.321  INFO 89248 --- [ost-startStop-1] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2017-02-23 10:19:16.322  INFO 89248 --- [ost-startStop-1] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2017-02-23 10:19:16.802  INFO 89248 --- [ost-startStop-1] c.n.eureka.cluster.PeerEurekaNodes       : Replica node URL:  http://localhost:8761/eureka/
2017-02-23 10:19:16.836  INFO 89248 --- [ost-startStop-1] c.n.e.registry.AbstractInstanceRegistry  : Finished initializing remote region registries. All known remote regions: []
2017-02-23 10:19:16.838  INFO 89248 --- [ost-startStop-1] c.n.eureka.DefaultEurekaServerContext    : Initialized
2017-02-23 10:19:21.092  WARN 89248 --- [ost-startStop-1] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2017-02-23 10:19:21.097  INFO 89248 --- [ost-startStop-1] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2017-02-23 10:19:21.116  WARN 89248 --- [ost-startStop-1] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2017-02-23 10:19:21.117  INFO 89248 --- [ost-startStop-1] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2017-02-23 10:19:23.779  INFO 89248 --- [      Thread-13] c.n.e.r.PeerAwareInstanceRegistryImpl    : Got 1 instances from neighboring DS node
2017-02-23 10:19:23.794  INFO 89248 --- [      Thread-13] c.n.e.r.PeerAwareInstanceRegistryImpl    : Renew threshold is: 1
2017-02-23 10:19:23.801  INFO 89248 --- [      Thread-13] c.n.e.r.PeerAwareInstanceRegistryImpl    : Changing status to UP
2017-02-23 10:19:23.854  INFO 89248 --- [ost-startStop-1] i.g.jhipster.registry.ApplicationWebXml  : Started ApplicationWebXml in 21.486 seconds (JVM running for 40.931)
2017-02-23 10:19:23.938  INFO 89248 --- [ost-startStop-1] c.s.j.s.i.a.WebApplicationImpl           : Initiating Jersey application, version 'Jersey: 1.19.1 03/11/2016 02:08 PM'
2017-02-23 10:19:24.045  INFO 89248 --- [ost-startStop-1] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2017-02-23 10:19:24.052  INFO 89248 --- [ost-startStop-1] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2017-02-23 10:19:24.052  INFO 89248 --- [ost-startStop-1] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2017-02-23 10:19:24.053  INFO 89248 --- [ost-startStop-1] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
23-Feb-2017 10:19:25.047 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\apache-tomcat-8.0.39\webapps\jhipster-registry-2.5.war has finished in 36,797 ms
23-Feb-2017 10:19:25.060 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\apache-tomcat-8.0.39\webapps\docs
23-Feb-2017 10:19:25.110 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\apache-tomcat-8.0.39\webapps\docs has finished in 50 ms
23-Feb-2017 10:19:25.111 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\apache-tomcat-8.0.39\webapps\examples
23-Feb-2017 10:19:25.530 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\apache-tomcat-8.0.39\webapps\examples has finished in 419 ms
23-Feb-2017 10:19:25.530 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\apache-tomcat-8.0.39\webapps\host-manager
23-Feb-2017 10:19:25.578 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\apache-tomcat-8.0.39\webapps\host-manager has finished in 48 ms
23-Feb-2017 10:19:25.580 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\apache-tomcat-8.0.39\webapps\manager
23-Feb-2017 10:19:25.606 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\apache-tomcat-8.0.39\webapps\manager has finished in 27 ms
23-Feb-2017 10:19:25.607 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\apache-tomcat-8.0.39\webapps\ROOT
23-Feb-2017 10:19:25.636 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\apache-tomcat-8.0.39\webapps\ROOT has finished in 28 ms
23-Feb-2017 10:19:25.644 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-8080"]
23-Feb-2017 10:19:25.663 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-apr-8009"]
23-Feb-2017 10:19:25.666 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 41071 ms
2017-02-23 10:20:22.433 DEBUG 89248 --- [apr-8080-exec-9] i.g.j.r.s.Http401UnauthorizedEntryPoint  : Pre-authenticated entry point called. Rejecting access
2017-02-23 10:20:23.804  INFO 89248 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry  : Running the evict task with compensationTime 0ms
2017-02-23 10:21:23.804  INFO 89248 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry  : Running the evict task with compensationTime 1ms

我复制了你的设置,遇到了同样的问题。 奇怪的是它在跑

curl http://admin:admin@localhost:8080/jhipster-registry-2.5.8/
工作正常:我得到了主页的内容

因此,某些内容在浏览器中不起作用

使用8761以外的另一个端口和与
/
不同的上下文路径(在您的示例中为
/jhipster-registry-2.5.8/
)意味着您必须修改注册表的
应用程序*.yml
中的几个应用程序属性,以及注册到此注册表的所有服务和网关中的
bootstrap.yml
文件

为了避免这种情况,我将tomcat的端口更改为8761,并将注册表war文件重命名为
ROOT.war
,但它仍然不起作用


要使其正常工作,需要在调试过程中付出大量的努力。因此,我强烈建议您坚持推荐的用法:使用
java-jar jhipster registry.war
或使用docker。

@GaëlMarziou我已经用tomcat日志更新了我的问题。它看起来和我运行mvnw命令时一样,但在部署结束时没有给出url。感谢您深入了解。我正在自动将注册表war文件部署到tomcat,使用Bamboin将其部署到aws elastic beanstalk中。现在我必须找到一种使用java-jar命令的方法,如果您知道这些步骤,请告诉我。。谢谢。如果你正在部署一个云,也许你应该考虑使用DOCKER。我也不知道使用竹子的好处是什么,除非你计划修改注册表的代码。您也可以使用我们的AWS子生成器部署到AWS。实际上,我是Bomboo的新手,所以我尝试先部署注册表,尽管我能够部署它,但我无法访问浏览器上的url。我们还没有使用docker,所以我必须研究如何在elastic beanstalk中运行一次性命令来运行注册表。