LATEST VERSION: 2.0 - RELEASE NOTES
Spring Cloud Services v2.0

Troubleshooting Client Applications

See below for information about troubleshooting problems in client apps which are bound to Spring Cloud Services service instances.

Service Registry client application not registering

A client app bound to a Service Registry service instance may fail to register with the Service Registry and log an error such as the following:

2018-03-20T14:28:08.14-0500 [APP/PROC/WEB/0] OUT 2018-03-20 19:28:08.143  WARN 22 ---
[           main] c.n.d.s.t.d.RetryableEurekaHttpClient    : Request execution failed
with message: I/O error on GET request for "http://localhost:8761/eureka/apps/":
Connection refused (Connection refused); nested exception is java.net.ConnectException:
Connection refused (Connection refused)

If the client app is consuming Spring Cloud Netflix Eureka configuration properties from other sources, such as a Config Server service instance, it may attempt to use those properties to connect to Eureka, and therefore fail to connect to the Spring Cloud Services Service Registry service instance. The app logs may also contain a message such as the following:

2018-03-20T14:27:58.62-0500 [APP/PROC/WEB/0] OUT 2018-03-20 19:27:58.622  WARN 22 ---
[           main] .s.c.s.e.EurekaInstanceAutoConfiguration : Eureka zone could not be
determined from eureka.client.serviceUrl.defaultZone="http://localhost:8761/eureka/".
Using "unknown".

In the case of the app in this example, the app was bound to a Config Server service instance that served it the following configuration properties from an application.yml file:

eureka:
  client:
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/

Check that the client app is not using any other configuration properties to locate a Spring Cloud Netflix Eureka server. If it is, remove those properties, repackage the app if necessary, and push the app again.

“Can’t contact any eureka nodes - possibly a security group issue?”

A client app bound to a Service Registry service instance may log an error such as the following:

2015-10-01T11:33:38.43-0500 [App/0]      OUT 2015-10-01 16:33:38.433  WARN 29 ---
[           main] com.netflix.discovery.DiscoveryClient    : Action: Refresh  =>
returned status of 401 from https://eureka-aa9d8079f0f3.example.com/eureka/apps/
2015-10-01T11:33:38.43-0500 [App/0]      OUT 2015-10-01 16:33:38.438 ERROR 29 ---
[           main] com.netflix.discovery.DiscoveryClient    : Can't get a response from
https://eureka-aa9d8079f0f3.example.com/eureka/apps/
2015-10-01T11:33:38.43-0500 [App/0]      OUT Can't contact any eureka nodes - possibly a
security group issue?
2015-10-01T11:33:38.43-0500 [App/0]      OUT java.lang.RuntimeException: Bad status: 401
2015-10-01T11:33:38.43-0500 [App/0]      OUT    at
com.netflix.discovery.DiscoveryClient.makeRemoteCall(DiscoveryClient.java:1155)

If your PCF foundation is using a self-signed certificate, such as a certificate generated in Pivotal Application Service (PAS) or Elastic Runtime, you must set the TRUST_CERTS environment variable on your app to the PAS (or Elastic Runtime) API endpoint. See Add Self-Signed SSL Certificate to JVM Truststore in the Service Registry documentation.

“sun.security.validator.ValidatorException: PKIX path building failed”

If you encounter the following exception:

sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid
certification path to requested target

If your PCF foundation is using self-signed certificates, make sure that you have set the TRUST_CERTS environment variable on the app to the Pivotal Application Service (PAS) or Elastic Runtime API endpoint. See Add Self-Signed SSL Certificate to JVM Truststore in the Service Registry documentation.

Create a pull request or raise an issue on the source for this page in GitHub