サンプルを実行しようとしました@http://spring.io/guides/gs/spring-cloud-and-lattice。私はcurl
http://spring-cloud-lattice-sample-8080.local.lattice.cf/meにできる午前中: -ラティスとスプリングクラウドのサンプルを実行中にエラーが発生しました
my cmd prompt> curl http://spring-cloud-lattice-sample-8080.local.lattice.cf/me | python -mjson.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 129 100 129 0 0 608 0 --:--:-- --:--:-- --:--:-- 2388
{
"host": "192.168.11.11",
"port": 60006,
"secure": false,
"serviceId": "spring-cloud-lattice-sample",
"uri": "http://192.168.11.11:60006"
}
私はcurl
http://spring-cloud-lattice-sample-8080.local.lattice.cf?service=spring-cloud-lattice-sampleにしようとすると、私は次のエラーを取得: -
my cmd prompt>curl http://spring-cloud-lattice-sample-8080.local.lattice.cf?service=spring-cloud-lattice-sample | python -mjson.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1423 100 1423 0 0 1884 0 --:--:-- --:--:-- --:--:-- 2514
{
"error": "Internal Server Error",
"exception": "org.springframework.beans.factory.UnsatisfiedDependencyException",
"message": "Error creating bean with name 'ribbonRestClient' defined in org.springframework.cloud.netflix.ribbon.RibbonClientConfiguration: Unsatisfied dependency expressed through constructor argument with index 1 of type [com.netflix.loadbalancer.ILoadBalancer]: : Error creating bean with name 'ribbonLoadBalancer' defined in org.springframework.cloud.netflix.ribbon.RibbonClientConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [com.netflix.loadbalancer.ILoadBalancer]: Factory method 'ribbonLoadBalancer' threw exception; nested exception is org.springframework.web.client.HttpClientErrorException: 404 Not Found; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ribbonLoadBalancer' defined in org.springframework.cloud.netflix.ribbon.RibbonClientConfiguration:
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.loadbalancer.ILoadBalancer]: Factory method 'ribbonLoadBalancer' threw exception; nested exception is org.springframework.web.client.HttpClientErrorException: 404 Not Found",
"path": "/",
"status": 500,
"timestamp": 1461123221582
}
をltc list
の出力は、次のとおりです。 -
my cmd prompt>ltc list
------------------------------= Apps =-------------------------------
App Name Instances DiskMB MemoryMB Route
lattice-app 1/1 0 128 lattice-app.local.lattice.cf => 8080, lattice-app-8080.local.lattice.cf => 8080
spring-cloud-lattice-sample 1/1 0 0 spring-cloud-lattice-sample.local.lattice.cf => 8080, spring-cloud-lattice-sample-8080.local.lattice.cf => 8080
------------------------------= Tasks =------------------------------
No tasks to display.
ltc status spring-cloud-lattice-sample
の出力は -
my cmd prompt>ltc status spring-cloud-lattice-sample
==========================================================================================
spring-cloud-lattice-sample
------------------------------------------------------------------------------------------
Instances 1/1
Start Timeout 0
DiskMB 0
MemoryMB 0
CPUWeight 100
Ports 8080,2222
spring-cloud-lattice-sample.local.lattice.cf => 8080
spring-cloud-lattice-sample-8080.local.lattice.cf => 8080
Monitor Port (8080)
Docker Image springcloud/spring-cloud-lattice-sample:latest
------------------------------------------------------------------------------------------
Environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
JAVA_VERSION="8u40"
JAVA_DEBIAN_VERSION="8u40-b27-1"
CA_CERTIFICATES_JAVA_VERSION="20140324"
PROCESS_GUID="spring-cloud-lattice-sample"
VCAP_APPLICATION="{"application_name":"spring-cloud-lattice-sample","application_uris":["spring-cloud-lattice-sample.local.lattice.cf","spring-cl
oud-lattice-sample-8080.local.lattice.cf"],"name":"spring-cloud-lattice-sample","uris":["spring-cloud-lattice-sample.local.lattice.cf","spring-cl
oud-lattice-sample-8080.local.lattice.cf"],"limits":{}}"
PORT="8080"
VCAP_SERVICES="{}"
==========================================================================================
Instance State Crashes CPU Memory Uptime
------------------------------------------------------------------------------------------
0 RUNNING 0 N/A N/A 3h8m5s
https://github.com/cloudfoundry-incubator/lattice-release/releases/download/v0.7.0/lattice-bundle-v0.7.0.zipからv0.7のラティスバンドルをダウンロードし、これをVagrantとVirtualboxプロバイダを使用して実行しました。 ltc logs spring-cloud-lattice-sample
を実行
は、以下のスタックトレースを明らかに: -
04/19 22:56:38.01 [APP|0] 2016-04-20 03:56:38.012 ERROR 11 --- [pool-4-thread-1] c.n.l.DynamicServerListLoadBalancer : Exception while updat
ing List of Servers obtained from Discovery client
04/19 22:56:38.01 [APP|0] org.springframework.web.client.HttpClientErrorException: 404 Not Found
04/19 22:56:38.01 [APP|0] at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:91)
04/19 22:56:38.01 [APP|0] at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:614)
04/19 22:56:38.01 [APP|0] at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:530)
04/19 22:56:38.01 [APP|0] at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:476)
04/19 22:56:38.01 [APP|0] at com.netflix.loadbalancer.DynamicServerListLoadBalancer.updateListOfServers(DynamicServerListLoadBalancer.java:
315)
04/19 22:56:38.01 [APP|0] at io.pivotal.receptor.client.ReceptorClient.getActualLRPsByProcessGuid(ReceptorClient.java:115)
04/19 22:56:38.01 [APP|0] at org.springframework.cloud.lattice.discovery.ReceptorService.getActualLRPsByProcessGuid(ReceptorService.java:45
)
04/19 22:56:38.01 [APP|0] at org.springframework.cloud.lattice.discovery.LatticeServerList.getServers(LatticeServerList.java:63)
04/19 22:56:38.01 [APP|0] at org.springframework.cloud.lattice.discovery.LatticeServerList.getUpdatedListOfServers(LatticeServerList.java:5
8)
04/19 22:56:38.01 [APP|0] at com.netflix.loadbalancer.DynamicServerListLoadBalancer$ServerListRefreshExecutorThread.run(DynamicServerListLo
adBalancer.java:299)
04/19 22:56:38.01 [APP|0] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
04/19 22:56:38.01 [APP|0] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
04/19 22:56:38.01 [APP|0] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.ja
va:180)
04/19 22:56:38.01 [APP|0] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
04/19 22:56:38.01 [APP|0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
04/19 22:56:38.01 [APP|0] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
04/19 22:56:38.01 [APP|0] at java.lang.Thread.run(Thread.java:745)
は、誰かが私はこの問題を解決する手助けすることはできますか?
TIA。