LATEST VERSION: 1.5 - CHANGELOG
Spring Cloud Services v1.5

Troubleshooting Client Applications

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

Service Registry client application not registering

A client application 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 application 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 application 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 application in this example, the application 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 application is not using any other configuration properties to locate a Spring Cloud Netflix Eureka server. If it is, remove those properties, repackage the application if necessary, and push the application again.

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

A client application 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 environment is using a self-signed certificate (such as a certificate generated in Elastic Runtime), you must set the TRUST_CERTS environment variable on your application to the API endpoint of Elastic Runtime. See the Add Self-Signed SSL Certificate to JVM Truststore section of the Writing Client Applications topic 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 environment is using self-signed certificates, make sure that you have set the TRUST_CERTS environment variable on the application to the Elastic Runtime API endpoint as described in the Add Self-Signed SSL Certificate to JVM Truststore section of the Writing Client Applications topic in the Service Registry documentation.

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