CAS报错I/O error on GET request for “http://localhost:8888/casconfigserver/cas/native“: Connection refused (Connection refused);
cas在部署的报错:
Caused by: org
.springframework.web.client.ResourceAccessException: I/O error on GET request for
"http://localhost:8888/casconfigserver/cas/native": Connection refused (Connection refused)
at org
.springframework.web.client.RestTemplate.doExecute(RestTemplate
.java:
674)
at org
.springframework.web.client.RestTemplate.execute(RestTemplate
.java:
621)
at org
.springframework.web.client.RestTemplate.exchange(RestTemplate
.java:
539)
at org
.springframework.cloud.config.client.ConfigServicePropertySourceLocator.getRemoteEnvironment(ConfigServicePropertySourceLocator
.java:
172)
at org
.springframework.cloud.config.client.ConfigServicePropertySourceLocator.locate(ConfigServicePropertySourceLocator
.java:
93)
解决方案
在CAS的bootstrap.properties中
spring
.cloud.config.uri=http://casuser:Mellon@localhost:
8888/casconfigserver
修改为
spring
.cloud.config.uri=http://localhost:
8888/casconfigserver