LATEST VERSION: 1.4 - CHANGELOG
Spring Cloud Services v1.4

Troubleshooting Spring Cloud® Services for Pivotal Cloud Foundry

See below for information about problems related to your Pivotal Cloud Foundry (PCF) platform configuration or Spring Cloud Services or other product installation.

Installation: “java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextInitializer”

If your installation of Spring Cloud Services fails and the spring-cloud-broker application logs (see the Read Broker Application Logs section of the The Service Broker and Instances topic for information about viewing those logs) include the following:

Caused by: java.lang.NoClassDefFoundError:
org/springframework/context/ApplicationContextInitializer

You may need to update the Java buildpack on your PCF deployment. Spring Cloud Services 1.3.x is based on Spring Boot 1.4 and is compatible with the Cloud Foundry Java buildpack version 3.8 or later. If the Java buildpack on your PCF deployment is older than 3.8, update it and continue the installation of Spring Cloud Services.

“java.util.concurrent.TimeoutException: Execution took longer than 180000 MILLISECONDS”

If the broker fails to provision a service instance and the logs for the spring-cloud-broker-worker application (see the Read Broker Application Logs section of the The Service Broker and Instances topic) contain the following:

java.util.concurrent.TimeoutException: Execution took longer than 180000 MILLISECONDS

This is due to a problem encountered during application deployments to your PCF deployment. Verify that you can deploy applications without issues to your PCF deployment (see “Starting or staging an application results in an InsufficientResources error” in the PCF Knowledge Base).

Service Registry: “Authentication Failed: Could not obtain access token”

If you encounter a message similar to the following when attempting to access a Service Registry dashboard:

Sr authentication failed

with the following text:

401 (Unauthorized)

Authentication Failed: Could not obtain access token

If your PCF deployment is using a self-signed certificate, ensure that it includes all of the domains listed in the Security Requirements section of the Prerequisites topic. (See the Providing a Certificate for your SSL Termination Point topic in the Pivotal Cloud Foundry documentation for more information about configuring the certificate.) If you update the certificate, you will need to either restart the service instance’s backing application(s) or recreate the service instance, or you may continue to see this message and be unable to access the Service Registry dashboard.

“No subject alternative DNS name matching p-spring-cloud-services.uaa.example.com found”

If you encounter an exception message similar to the following:

org.springframework.web.client.ResourceAccessException: I/O error on POST request for
"https://p-spring-cloud-services.uaa.example.com/oauth/token":
java.security.cert.CertificateException: No subject alternative DNS name matching
p-spring-cloud-services.uaa.example.com found.; nested exception is
javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No
subject alternative DNS name matching p-spring-cloud-services.uaa.example.com found.

Ensure that your PCF installation meets the requirements described in the Security Requirements section of the Prerequisites topic. Be sure that your Elastic Runtime SSL certificate includes all wildcards listed in that section and has a separate wildcard for each subdomain.

“javax.net.ssl.SSLException: Received fatal alert: protocol_version”

The Cloud Foundry Command Line Interface tool (cf CLI) create-service command may return an error similar to the following:

Server error, status code: 502, error code: 10001, message: Service broker error:
javax.net.ssl.SSLException: Received fatal alert: protocol_version

Spring Cloud Services requires the RabbitMQ for PCF product. If you have provided SSL certificates and keys to RabbitMQ for PCF, you must also enable its TLS 1.0 support in order to use it with Spring Cloud Services. See the note at the end of the Platform and Product Requirements section of the Prerequisites topic.

“com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN”

If you encounter the following exception message in Spring Cloud Services broker logs:

org.springframework.amqp.AmqpAuthenticationException:
com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was
refused using authentication mechanism PLAIN. For details see the broker
logfile.

The credentials used by the Spring Cloud Services broker to access its RabbitMQ for PCF service instance may be invalid. This can happen after restoring a backup of Pivotal Cloud Foundry® Elastic Runtime, as a restored RabbitMQ for PCF service instance may not accept the restored credentials used by the Spring Cloud Services broker. You can update the Spring Cloud Services broker’s credentials by unbinding the RabbitMQ service instance from the broker applications (the spring-cloud-broker and spring-cloud-broker-worker applications) and then rebinding.

To unbind the RabbitMQ service instance from the Spring Cloud Services broker applications and rebind it, run the following cf CLI commands:

$ cf target -o system -s p-spring-cloud-services
$ cf unbind-service spring-cloud-broker spring-cloud-broker-rmq
$ cf unbind-service spring-cloud-broker-worker spring-cloud-broker-rmq
$ cf bind-service spring-cloud-broker spring-cloud-broker-rmq
$ cf restage spring-cloud-broker
$ cf bind-service spring-cloud-broker-worker spring-cloud-broker-rmq
$ cf restage spring-cloud-broker-worker

If the PCF environment is newly restored and the RabbitMQ service instance’s queues are empty, you may also unbind the RabbitMQ service instance from the broker applications, delete it, create a new instance, and then bind that instance to the Spring Cloud Services broker applications.

WARNING: Deleting and replacing the RabbitMQ service instance will destroy the original instance’s virtual host and any data in the instance’s queues. If the RabbitMQ service instance contains messages and is on a production system, unbind and rebind it instead.

To delete and replace the RabbitMQ service instance used by the Spring Cloud Services broker applications, run the following cf CLI commands:

$ cf target -o system -s p-spring-cloud-services
$ cf unbind-service spring-cloud-broker spring-cloud-broker-rmq
$ cf unbind-service spring-cloud-broker-worker spring-cloud-broker-rmq
$ cf delete-service -f spring-cloud-broker-rmq
$ cf create-service p-rabbitmq standard spring-cloud-broker-rmq
$ cf bind-service spring-cloud-broker spring-cloud-broker-rmq
$ cf restage spring-cloud-broker
$ cf bind-service spring-cloud-broker-worker spring-cloud-broker-rmq
$ cf restage spring-cloud-broker-worker
Create a pull request or raise an issue on the source for this page in GitHub