Giter Site home page Giter Site logo

autosleep's Introduction

Autosleep

Build Status Coverage Status

license releases Slack channel

Goal

The aim of the auto-sleep project is to give the ability for Cloud Foundry users to automatically have their app stopped after a given period of inactivity, and then automatically started when accessed through traffic received on their routes.

Status

You can check the full specifications and the currently supported features in the acceptance tests.

Get a deeper introduction in the Autosleep talk at Cf Summit Santa Clara 2016 ( slides, youtube video recording, and high-res demo )

Autosleep Cf Summit Santa Clata 2016 talk

What's already working:

For now we provide a service broker which instances will:

  • automatically bind applications in space (filtering out applications whose name matches a regexp).
  • watch every bound application, measure inactivity (based on https logs and redeploy/restart events) and stop the application when an inactivity threshold is reached.
  • a service dashboard for users to understand behavior of the service (such as time to sleep or current enrollment status)
  • automatic restart on incoming HTTP trafic

Download latest release if you want to give it a try, or build from sources

What we are working on:

We manage our roadmap as github issues (also displayed as milestones in huboard. Detailed breakdown of org enrollement is in pivotal tracker, following is however an overview of planned short-term work:

  • Hardening, optimizations
  • Automatic enrollemnt of new spaces and orgs

Usage by CloudFoundry users

We suppose that the autosleep service broker is already available in your market place. If you need help on that check how to publish service broker.

Create your autosleep service instance

Basics

Create an autosleep service instance to watch all applications in the space and automatically put them to sleep after default idle duration:

cf cs autosleep default my-autosleep

Autosleep will periodically automatically bind every applications in the space to this service instance (if you want to fine tune which apps gets auto-bound, please use the exclude-from-auto-enrollment parameter to exclude some apps).

Once bound, your application will be watched for inactivity, and automatically stopped by the autosleep service. If you wish to disable this watch, simply unbind your application from the autosleep service instance.

Advanced configuration parameters

Optionally the autosleep service broker accepts the following parameters during service creation:

Only the auto-enrollment field is is mutable, i.e. is accepted on service updates, e.g. cf cs autosleep default my-autosleep -c '{"auto-enrollment": "normal", "secret": "Th1s1zg00dP@$$w0rd"}'

If you need to update other fields (e.g. idle-duration), rather choose to instanciate a new service instance.up

idle-duration

Duration after which bound applications will be considered as inactive. The time format used is [the ISO8601] (https://en.wikipedia.org/wiki/ISO_8601#Durations) duration format.

  • Example:'{"idle-duration": "PT1H15M"}' would stop the application after 1 hour and 15 minutes of inactivity.
  • Default value : 24H

exclude-from-auto-enrollment

If you don't want all the application to be automatically bound, you can set this parameter with a regular expression to filter on application names.

  • Example:'{"exclude-from-auto-enrollment": ".*"}' wouldn't automatically bind any application in the space. Application would have to be bound manually.
  • Default value : none (every app in space will be bound).

🔒auto-enrollment

By default this parameter is set as standard. If platform teams (admins, org managers, or specific members of the space) don't want all space members to be able to manually permanently unbound apps from the autosleep service themselves, then a forced mode is supported.

In a forced auto-enrollment mode then:

  • manually unbound apps will automatically be re-bound again after the inactivity period. Until the then, app teams are free to delete the app if a cleanup is necessary.
  • the autosleep service-instance won't be deletable by space members to disable next auto-enrollments

To enable to forced mode, set the auto-enrollment parameter to forced. As this is a protected parameter, you will have also have to provide a secret parameter.

  • Example:'{"auto-enrollment": "forced"}'
  • Default value : standard

secret

Provide a secret if you wish to set/change a protected parameter. Please save it carefully, has you will be asked to provide the same secret the next time you set/change a protected parameter. As a fallback, you may also use the credential password set at deployment time (see the security.user.password in publish documentation).

  • Example:'{"secret": "Th1s1zg00dP@$$w0rd"}'
  • Default value : null

Usage by platform teams

How to build

If you wish to build the app yourself, go to build documentation.

How to deploy and publish

Once you built the application or if you got it from latest release, go to publish documentation.

How to test

Acceptance tests are available in the source code, as robotframework tests. More information here.

autosleep's People

Contributors

antechrestos avatar arnaudruffin avatar gberche avatar gberche-orange avatar lodener avatar macevil avatar mindprogenitor avatar mogul avatar pradyutsarma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autosleep's Issues

Start of application is low...Sometime

The very first sql call (get connection?) from application may be very long (around 5 minutes in my case).

Therefore, if this first sql call is in an operation context, caller timeout is reached before the creation of the schemas is completed...Leading to a non responding application since schemas creation is aborted/interrupted.

The schemas creation/update shall be done from application listener

Use actuator /health or /dump to diagnose

Arbitrary parameters renaming

Currently we have:

  • inactivity
  • excludeAppNameRegExp
  • no_optout
  • secret

My proposals:

  • inactivity ➡️ duration
  • excludeAppNameRegExp ➡️ exclude-from-autoscan
    (I think we don't need to call it xxx-regexp, as the documentation should be enough to tell that it should contain a regular expression)
  • no_optout ➡️ force-rebind
    Clearer if we decide that "no-optout" means "ok to unbind, but will be re-bound later"
  • secret

@gberche-orange @antechrestos , feel free to give your points of view.

Exception on no last log?

2016-01-25T15:41:57.41+0100 [App/0]      OUT DEBUG o.c.a.w.remote.CloudFoundryApi(37) - Getting application info for app static_test
2016-01-25T15:41:57.43+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.AutosleepServiceInstanceService(123) - getServiceInstance - 9aef4538-b7cf-4064-ac54-28f8d0063509
2016-01-25T15:41:57.47+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.ApplicationBindingService(81) - deleteServiceInstanceBinding - 362b04c2-8bf7-4289-9976-59d51408caa4
2016-01-25T15:41:58.07+0100 [App/0]      OUT DEBUG o.c.a.w.remote.CloudFoundryApi(40) - Building ApplicationInfo(state)
2016-01-25T15:41:58.07+0100 [App/0]      OUT DEBUG o.c.a.w.ApplicationStopper(84) - Checking on app 3a4e9275-e937-4735-b272-84ddea21b1f6 state
2016-01-25T15:41:58.08+0100 [App/0]      OUT ERROR o.c.a.w.ApplicationStopper(99) - unsuspected error
2016-01-25T15:41:58.08+0100 [App/0]      OUT java.lang.NullPointerException: null
2016-01-25T15:41:58.08+0100 [App/0]      OUT    at org.cloudfoundry.autosleep.worker.ApplicationStopper.checkActiveApplication(ApplicationStopper.java:118) [classes/:na]
2016-01-25T15:41:58.08+0100 [App/0]      OUT    at org.cloudfoundry.autosleep.worker.ApplicationStopper.handleApplicationEnrolled(ApplicationStopper.java:92) [classes/:na]
2016-01-25T15:41:58.08+0100 [App/0]      OUT    at org.cloudfoundry.autosleep.worker.ApplicationStopper.lambda$run$8(ApplicationStopper.java:58) [classes/:na]
2016-01-25T15:41:58.08+0100 [App/0]      OUT    at org.cloudfoundry.autosleep.util.ApplicationLocker.executeThreadSafe(ApplicationLocker.java:28) ~[classes/:na]
2016-01-25T15:41:58.08+0100 [App/0]      OUT    at org.cloudfoundry.autosleep.worker.ApplicationStopper.run(ApplicationStopper.java:52) [classes/:na]
2016-01-25T15:41:58.08+0100 [App/0]      OUT    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_65-]
2016-01-25T15:41:58.08+0100 [App/0]      OUT    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_65-]
2016-01-25T15:41:58.08+0100 [App/0]      OUT    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_65-]
2016-01-25T15:41:58.08+0100 [App/0]      OUT    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[na:1.8.0_65-]
2016-01-25T15:41:58.08+0100 [App/0]      OUT    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_65-]
2016-01-25T15:41:58.08+0100 [App/0]      OUT    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_65-]
2016-01-25T15:41:58.08+0100 [App/0]      OUT    at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_65-]
2016-01-25T15:41:58.08+0100 [App/0]      OUT DEBUG o.c.a.w.s.AbstractPeriodicTask(30) - Rescheduling in PT20S
2016-01-25T15:41:58.08+0100 [App/0]      OUT DEBUG o.c.a.worker.scheduling.Clock(35) - scheduleTask - task 9aef4538-b7cf-4064-ac54-28f8d0063509-3a4e9275-e937-4735-b272-84ddea21b1f6
2016-01-25T15:41:58.12+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.ApplicationBindingService(90) - deleteServiceInstanceBinding on app 
2016-01-25T15:41:58.18+0100 [RTR/0]      OUT autosleep.cf.ns.nd-paas.itn.ftgroup - [25/01/2016:14:41:57 +0000] "DELETE /v2/service_instances/9aef4538-b7cf-4064-ac54-28f8d0063509/service_bindings/362b04c2-8bf7-4289-9976-59d51408caa4?plan_id=78C0A1DB-ACC9-4B6D-AF22-A1EF63C2CE06&service_id=autosleep-dev HTTP/1.1" 200 0 2 "-" "HTTPClient/1.0 (2.6.0.1, ruby 2.2.3 (2015-08-18))" 192.

Unable to instantiate service

I can't instantiate the service broker with the CLI.

$ cf cs autosleep "Default autosleep Plan" my-autosleep
Creating service instance my-autosleep in org brokers-sandboxes / space autosleep as xxxxx ...
FAILED

Server error, status code: 502, error code: 10001, message: Service broker error: The provided service broker API version is not supported: Expected Version = 2.6, Provided Version = 2.7

Autosleep should fail-fast upon invalid CC API config (i.e. fail to start)

Currently, autosleep catches errors during CC API initialization in https://github.com/Orange-OpenSource/autosleep/blob/develop/src/main/java/org/cloudfoundry/autosleep/worker/remote/config/CloudfoundryClientBuilder.java#L77-L79 and proceeds with start, making it harder to operators to spot configuration errors.

It might be easier to fail fast and refuse starting if the CC API is invalid.

For instance, improperly configuring the cf.client.target.endpoint property with an URL instead of the expected host name, results into the following stack trace,

�[1;36m2016-04-29T17:38:13.60+0200 [APP/0]�[0m      �[0;38mOUT ERROR o.c.a.w.r.c.CloudfoundryClientBuilder(56) - CloudFoundryApi - failure while login�[0m
�[1;36m2016-04-29T17:38:13.60+0200 [APP/0]�[0m      �[0;38mOUT java.lang.RuntimeException: java.net.UnknownHostException: https://api.nd-cfapi.[...]�[0m
�[1;36m2016-04-29T17:38:13.60+0200 [APP/0]�[0m      �[0;38mOUT  at org.cloudfoundry.client.spring.SpringCloudFoundryClient.trustHost(SpringCloudFoundryClient.java:435) ~[cloudfoundry-client-spring-4f3c645.jar!/:2.0.0.BUILD-SNAPSHOT]�[0m

and much later once instanciated as a service instance fails to scan apps, the exception is harder to diagnose

�[1;36m2016-04-29T18:19:02.51+0200 [APP/0]�[0m      �[0;38mOUT ERROR o.c.a.worker.SpaceEnroller(80) - remote error�[0m
�[1;36m2016-04-29T18:19:02.51+0200 [APP/0]�[0m      �[0;38mOUT org.cloudfoundry.autosleep.worker.remote.CloudFoundryException: java.lang.NullPointerException�[0m
�[1;36m2016-04-29T18:19:02.51+0200 [APP/0]�[0m      �[0;38mOUT  at org.cloudfoundry.autosleep.worker.remote.CloudFoundryApi.listApplications(CloudFoundryApi.java:225) ~[app/:na]�[0m
�[1;36m2016-04-29T18:19:02.51+0200 [APP/0]�[0m      �[0;38mOUT  at org.cloudfoundry.autosleep.worker.SpaceEnroller.run(SpaceEnroller.java:63) ~[app/:na]�[0m
�[1;36m2016-04-29T18:19:02.51+0200 [APP/0]�[0m      �[0;38mOUT  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_65-]�[0m
�[1;36m2016-04-29T18:19:02.51+0200 [APP/0]�[0m      �[0;38mOUT  at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_65-]�[0m
�[1;36m2016-04-29T18:19:02.51+0200 [APP/0]�[0m      �[0;38mOUT  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_65-]�[0m
�[1;36m2016-04-29T18:19:02.51+0200 [APP/0]�[0m      �[0;38mOUT  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_65-]�[0m
�[1;36m2016-04-29T18:19:02.51+0200 [APP/0]�[0m      �[0;38mOUT  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_65-]�[0m
�[1;36m2016-04-29T18:19:02.51+0200 [APP/0]�[0m      �[0;38mOUT  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_65-]�[0m
�[1;36m2016-04-29T18:19:02.51+0200 [APP/0]�[0m      �[0;38mOUT  at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65-]�[0m
�[1;36m2016-04-29T18:19:02.51+0200 [APP/0]�[0m      �[0;38mOUT Caused by: java.lang.NullPointerException: null�[0m
�[1;36m2016-04-29T18:19:02.51+0200 [APP/0]�[0m      �[0;38mOUT  at org.cloudfoundry.autosleep.worker.remote.CloudFoundryApi.listApplications(CloudFoundryApi.java:209) ~[app/:na]�[0m
�[1;36m2016-04-29T18:19:02.51+0200 [APP/0]�[0m      �[0;38mOUT  ... 8 common frames omitted�[0m

Route binding : CF-RouteNotFound(210002)

When receiving a request for a new route binding, autosleep fails while trying retrieving all apps linked to the route.
org.cloudfoundry.client.v2.CloudFoundryException: CF-RouteNotFound(210002): The route could not be found: sample.cf.ns.nd-paas.itn.ftgroup
The reason is that we're expecting a route GUID (after all, we are calling ourself through the java-cf-client) and are receiving the value of the route instead.

  • Is this what we are supposed to expect?
  • if yes, how should we retrieve the route-id? (used to check if the related apps are known from autosleep)

Service enabled for other orgs fails to stop the applications after the idle-duration

Hi,

Below is the setup in my local installation:

  1. I have deployed the 'autosleep' application in the my 'master' org and 'prod' space
  2. I have registered the service-broker and enabled the access to another org, say 'custom' using the cli command 'cf enable-service-access ...'
  3. With this I can see the autosleep service in the 'custom' org.
  4. I have now created an instance in one of the spaces, say, 'dev' in the 'custom' org
  5. I have some apps deployed in the 'dev' space. However, they don't seem to get bound to the autosleep service instance, even after the defined idle-duration

Is this a known issue? My understanding is, normally this will be the standard setup for 'autosleep' service.

Thanks and Kind Regards,
Padma

Preventing manual route binding

Next release will provide automatic app restart on incoming HTTP traffic thanks to new experimental route service binding.
To achieve that, autosleep will automatically bind/unbind route to its service (according to app state).

My question is : Should we prevent manual route binding/unbinding for autosleep? and, if so, how to achieve that?

On binding creation, we could liste applications mapped to this route and check they (at least) are known from autosleep. But on deletion?

Restore tasks on reboot

Now that services and bindings are persisted, app may crash on unbinding when no jobs running
Two reasons for that:

  • we don't handle restoring tasks for every bound app on relaunch
  • we don't test null on task.get(id) (could happen if unbind right during an app check) -> test null or synchronize ressources
2015-10-30T08:27:01.05+0100 [App/0]      OUT java.lang.NullPointerException: null
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.cloudfoundry.autosleep.scheduling.Clock.stopTimer(Clock.java:59) ~[classes/:na]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.cloudfoundry.autosleep.servicebroker.service.AutoSleepServiceInstanceBindingService.deleteServiceInstanceBinding(AutoSleepServiceInstanceBindingService.java:74) ~[classes/:na]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.cloudfoundry.community.servicebroker.controller.ServiceInstanceBindingController.deleteServiceInstanceBinding(ServiceInstanceBindingController.java:86) ~[spring-boot-cf-service-broker-a71d051.jar!/:na]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_60-]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_60-]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_60-]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_60-]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) ~[spring-web-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) ~[spring-web-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) ~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776) ~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705) ~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) ~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) ~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967) [spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.springframework.web.servlet.FrameworkServlet.doDelete(FrameworkServlet.java:891) [spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at javax.servlet.http.HttpServlet.service(HttpServlet.java:654) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843) [spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.0.26.jar!/:8.0.26]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2015-10-30T08:27:01.05+0100 [App/0]      OUT    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) [spring-security-web-3.2.6.RELEASE.jar!/:3

Dao exception on service deletion

2016-01-25T15:44:10.82+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.AutosleepServiceInstanceService(78) - createServiceInstance - 39a74b12-9e2e-4ec3-b686-3ab94d133a55
2016-01-25T15:44:10.83+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.p.ParameterReaderFactory(101) - forcedAutoEnrollment forced
2016-01-25T15:44:10.83+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.p.ParameterReaderFactory(34) - pattern PT6S
2016-01-25T15:44:10.84+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.p.ParameterReaderFactory(68) - excludeFromAutoEnrollment .*
2016-01-25T15:44:10.85+0100 [RTR/0]      OUT autosleep.cf.ns.nd-paas.itn.ftgroup - [25/01/2016:14:44:10 +0000] "PUT /v2/service_instances/39a74b12-9e2e-4ec3-b686-3ab94d133a55 HTTP/1.1" 422 291 120 "-" "HTTPClient/1.0 (2.6.0.1, ruby 2.2.3 (2015-08-18))" 192.168.26.30:39747 x_forwarded_for:"192.168.26.52" x_forwarded_proto:"http" vcap_request_id:b096ca0b-82ce-4eb5-635b-1f7e4449b9ab response_time:0.025308252 app_id:3048d795-f031-435f-85e8-71dce339e869
2016-01-25T15:44:11.40+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.AutosleepServiceInstanceService(180) - deleteServiceInstance - 39a74b12-9e2e-4ec3-b686-3ab94d133a55
2016-01-25T15:44:11.41+0100 [App/0]      OUT WARN  o.c.c.s.c.BaseController(62) - Exception
2016-01-25T15:44:11.41+0100 [App/0]      OUT org.springframework.dao.EmptyResultDataAccessException: No class org.cloudfoundry.autosleep.dao.model.SpaceEnrollerConfig entity with id 39a74b12-9e2e-4ec3-b686-3ab94d133a55 exists!
2016-01-25T15:44:11.41+0100 [App/0]      OUT    at org.springframework.data.jpa.repository.support.SimpleJpaRepository.delete(SimpleJpaRepository.java:147) ~[spring-data-jpa-1.9.0.RELEASE.jar!/:na]
2016-01-25T15:44:11.41+0100 [App/0]      OUT    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_65-]
2016-01-25T15:44:11.41+0100 [App/0]      OUT    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_65-]
2016-01-25T15:44:11.41+0100 [App/0]      OUT    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_65-]
2016-01-25T15:44:11.41+0100 [App/0]      OUT    at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_65-]
2016-01-25T15:44:11.41+0100 [App/0]      OUT    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:475) ~[spring-data-commons-1.11.0.RELEASE.jar!/:na]
2016-01-25T15:44:11.41+0100 [App/0]      OUT    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:460) ~[spring-data-commons-1.11.0.RELEASE.jar!/:na]
2016-01-25T15:44:11.41+0100 [App/0]      OUT    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:432) ~[spring-data-commons-1.11.0.RELEASE.jar!/:na]
2016-01-25T15:44:11.41+0100 [App/0]      OUT    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]

Refactor old fashioned tests

What is expected:
1- each test aims a single functionality
2- the name of the test is lower case and describes the tested functionnality
3- Given/When/Then comments

Here are the classes to rewrite (refer this issue in its commit)

  • ServiceRepositoryTest ✔️
  • AppRepositoryTest ✔️
  • BindingRepositoryTest ✔️
  • ApplicationInfoTest ✔️
  • DeployedApplicationConfigTest ✔️
  • ContextInitializerTest ✔️
  • AutosleepCatalogBuilderTest ✔️
  • ParameterReaderFactoryTest ✔️
  • ApiControllerTest ✔️
  • DebugControllerTest ✔️
  • DashboardControllerTest ✔️
  • ``ClockTest` ✔️
  • ``SpaceEnrollerTest` ✔️
  • ApplicationLockerTest ✔️

Route binding : CF-ServiceBrokerBadResponse(10001) due to 502 Bad Gateway

While testing the binding of a route, we get a CF-ServiceBrokerBadResponse(10001) whenever trying to send a response.

2016-04-18T15:49:39.35+0200 [APP/0]      OUT Caused by: org.cloudfoundry.client.v2.CloudFoundryException: CF-ServiceBrokerBadResponse(10001): The service broker returned an invalid response for the request to http://autosleep-arno.cf.ns.nd-paas.itn.ftgroup/v2/service_instances/141f0d49-59f5-493f-afb6-086b427b0730/service_bindings/b29d5495-e4b5-404c-986e-834d092b4b58. Status Code: 201 Created, Body: {"route_service_url":"autosleep-arno.cf.ns.nd-paas.itn.ftgroup/proxy/b29d5495-e4b5-404c-986e-834d092b4b58"}
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at org.cloudfoundry.spring.client.v2.CloudFoundryExceptionBuilder.build(CloudFoundryExceptionBuilder.java:47) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at org.cloudfoundry.spring.util.AbstractSpringOperations.lambda$null$1(AbstractSpringOperations.java:72) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at reactor.core.publisher.FluxYieldingEmitter$YieldingSignalEmitter.request(FluxYieldingEmitter.java:72) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at reactor.core.util.DeferredSubscription.request(DeferredSubscription.java:92) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at reactor.core.publisher.FluxPublishOn$PublishOnPipeline.run(FluxPublishOn.java:164) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at reactor.core.publisher.SchedulerGroup$TaskSubscriber.onNext(SchedulerGroup.java:1081) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at reactor.core.publisher.SchedulerGroup$TaskSubscriber.onNext(SchedulerGroup.java:1063) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at reactor.core.publisher.WorkQueueProcessor$QueueSubscriberLoop.run(WorkQueueProcessor.java:842) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    ... 3 common frames omitted
2016-04-18T15:49:39.35+0200 [APP/0]      OUT Caused by: org.springframework.web.client.HttpServerErrorException: 502 Bad Gateway
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:94) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at org.springframework.security.oauth2.client.http.OAuth2ErrorHandler.handleError(OAuth2ErrorHandler.java:85) ~[spring-security-oauth2-2.0.9.RELEASE.jar!/:na]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:641) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:597) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at org.springframework.security.oauth2.client.OAuth2RestTemplate.doExecute(OAuth2RestTemplate.java:128) ~[spring-security-oauth2-2.0.9.RELEASE.jar!/:na]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:572) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:534) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at org.cloudfoundry.spring.util.AbstractSpringOperations.lambda$putWithBody$10(AbstractSpringOperations.java:139) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    at org.cloudfoundry.spring.util.AbstractSpringOperations.lambda$null$1(AbstractSpringOperations.java:66) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-04-18T15:49:39.35+0200 [APP/0]      OUT    ... 9 common frames omitted

OAuth2AccessDeniedException

2016-02-12T09:12:35.45+0100 [App/0]      OUT DEBUG o.c.a.w.remote.CloudFoundryApi(104) - Getting applicationActivity 46afcf69-3ecd-47ec-abca-76355c30477b
2016-02-12T09:12:35.51+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.AutosleepServiceInstanceService(123) - getServiceInstance - 9eed9aa9-3f25-4980-ab50-5448fa61cc64
2016-02-12T09:12:35.60+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.ApplicationBindingService(81) - deleteServiceInstanceBinding - bc07a64b-eb1c-448c-998c-818a19e58404
2016-02-12T09:12:36.37+0100 [App/0]      OUT ERROR o.c.a.w.ApplicationStopper(104) - unsuspected error
2016-02-12T09:12:36.37+0100 [App/0]      OUT org.springframework.security.oauth2.client.resource.OAuth2AccessDeniedException: Error requesting access token.
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.security.oauth2.client.token.OAuth2AccessTokenSupport.retrieveToken(OAuth2AccessTokenSupport.java:145) ~[spring-security-oauth2-2.0.8.RELEASE.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.security.oauth2.client.token.grant.password.ResourceOwnerPasswordAccessTokenProvider.obtainAccessToken(ResourceOwnerPasswordAccessTokenProvider.java:47) ~[spring-security-oauth2-2.0.8.RELEASE.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.security.oauth2.client.token.AccessTokenProviderChain.obtainNewAccessTokenInternal(AccessTokenProviderChain.java:142) ~[spring-security-oauth2-2.0.8.RELEASE.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.security.oauth2.client.token.AccessTokenProviderChain.obtainAccessToken(AccessTokenProviderChain.java:118) ~[spring-security-oauth2-2.0.8.RELEASE.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.security.oauth2.client.OAuth2RestTemplate.acquireAccessToken(OAuth2RestTemplate.java:221) ~[spring-security-oauth2-2.0.8.RELEASE.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.security.oauth2.client.OAuth2RestTemplate.getAccessToken(OAuth2RestTemplate.java:173) ~[spring-security-oauth2-2.0.8.RELEASE.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.security.oauth2.client.OAuth2RestTemplate.createRequest(OAuth2RestTemplate.java:105) ~[spring-security-oauth2-2.0.8.RELEASE.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:592) ~[spring-web-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.security.oauth2.client.OAuth2RestTemplate.doExecute(OAuth2RestTemplate.java:128) ~[spring-security-oauth2-2.0.8.RELEASE.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:572) ~[spring-web-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:280) ~[spring-web-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.cloudfoundry.client.spring.util.AbstractSpringOperations$3.apply(AbstractSpringOperations.java:110) ~[cloudfoundry-client-spring-4f3c645.jar!/:2.0.0.BUILD-SNAPSHOT]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.cloudfoundry.client.spring.util.AbstractSpringOperations$3.apply(AbstractSpringOperations.java:102) ~[cloudfoundry-client-spring-4f3c645.jar!/:2.0.0.BUILD-SNAPSHOT]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.cloudfoundry.client.spring.util.AbstractSpringOperations$2$1.accept(AbstractSpringOperations.java:84) ~[cloudfoundry-client-spring-4f3c645.jar!/:2.0.0.BUILD-SNAPSHOT]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.cloudfoundry.client.spring.util.AbstractSpringOperations$2$1.accept(AbstractSpringOperations.java:78) ~[cloudfoundry-client-spring-4f3c645.jar!/:2.0.0.BUILD-SNAPSHOT]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at reactor.core.publisher.FluxYieldingEmitter$YieldingSignalEmitter.request(FluxYieldingEmitter.java:76) ~[reactor-core-2.5.0.BUILD-20160210.191749-340.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at reactor.core.util.DeferredSubscription.set(DeferredSubscription.java:71) ~[reactor-core-2.5.0.BUILD-20160210.191749-340.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at reactor.core.publisher.FluxPublishOn$PublishOnPipeline.onSubscribe(FluxPublishOn.java:131) ~[reactor-core-2.5.0.BUILD-20160210.191749-340.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at reactor.core.subscriber.SignalEmitter.start(SignalEmitter.java:170) ~[reactor-core-2.5.0.BUILD-20160210.191749-340.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at reactor.core.publisher.FluxYieldingEmitter.subscribe(FluxYieldingEmitter.java:43) ~[reactor-core-2.5.0.BUILD-20160210.191749-340.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at reactor.rx.StreamSource.subscribe(StreamSource.java:71) ~[reactor-stream-2.5.0.BUILD-20160210.193010-335.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at reactor.core.util.ScalarSubscription.trySubscribeScalarMap(ScalarSubscription.java:93) ~[reactor-core-2.5.0.BUILD-20160210.191749-340.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at reactor.core.publisher.FluxFlatMap.subscribe(FluxFlatMap.java:93) ~[reactor-core-2.5.0.BUILD-20160210.191749-340.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at reactor.rx.StreamSource.subscribe(StreamSource.java:71) ~[reactor-stream-2.5.0.BUILD-20160210.193010-335.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at reactor.core.publisher.FluxPublishOn$SourceSubscribeTask.run(FluxPublishOn.java:318) ~[reactor-core-2.5.0.BUILD-20160210.191749-340.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at reactor.core.publisher.SchedulerGroup$TaskSubscriber.onNext(SchedulerGroup.java:1072) ~[reactor-core-2.5.0.BUILD-20160210.191749-340.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at reactor.core.publisher.SchedulerGroup$TaskSubscriber.onNext(SchedulerGroup.java:1054) ~[reactor-core-2.5.0.BUILD-20160210.191749-340.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at reactor.core.publisher.WorkQueueProcessor$QueueSubscriberLoop.run(WorkQueueProcessor.java:849) ~[reactor-core-2.5.0.BUILD-20160210.191749-340.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_65-]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_65-]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_65-]
2016-02-12T09:12:36.37+0100 [App/0]      OUT Caused by: org.springframework.web.client.HttpClientErrorException: 401 Unauthorized
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:91) ~[spring-web-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.security.oauth2.client.token.OAuth2AccessTokenSupport$AccessTokenErrorHandler.handleError(OAuth2AccessTokenSupport.java:244) ~[spring-security-oauth2-2.0.8.RELEASE.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:641) ~[spring-web-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:597) ~[spring-web-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:565) ~[spring-web-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    at org.springframework.security.oauth2.client.token.OAuth2AccessTokenSupport.retrieveToken(OAuth2AccessTokenSupport.java:137) ~[spring-security-oauth2-2.0.8.RELEASE.jar!/:na]
2016-02-12T09:12:36.37+0100 [App/0]      OUT    ... 30 common frames omitted
2016-02-12T09:12:36.38+0100 [App/0]      OUT DEBUG o.c.a.w.s.AbstractPeriodicTask(30) - Rescheduling in PT20S
2016-02-12T09:12:36.38+0100 [App/0]      OUT DEBUG o.c.a.worker.scheduling.Clock(35) - scheduleTask - task 9eed9aa9-3f25-4980-ab50-5448fa61cc64-46afcf69-3ecd-47ec-abca-76355c30477b
2016-02-12T09:12:36.67+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.ApplicationBindingService(90) - deleteServiceInstanceBinding on app 

Misleading cf.client.target.endpoint property expecting a hostname

The naming of the cf.client.target.endpoint is misleading as if an URL is specified, autosleep fails with the followin stack trace:

�[1;36m2016-04-29T17:38:13.60+0200 [APP/0]�[0m      �[0;38mOUT ERROR o.c.a.w.r.c.CloudfoundryClientBuilder(56) - CloudFoundryApi - failure while login�[0m
�[1;36m2016-04-29T17:38:13.60+0200 [APP/0]�[0m      �[0;38mOUT java.lang.RuntimeException: java.net.UnknownHostException: https://api.nd-cfapi.[...]�[0m
�[1;36m2016-04-29T17:38:13.60+0200 [APP/0]�[0m      �[0;38mOUT  at org.cloudfoundry.client.spring.SpringCloudFoundryClient.trustHost(SpringCloudFoundryClient.java:435) ~[cloudfoundry-client-spring-4f3c645.jar!/:2.0.0.BUILD-SNAPSHOT]�[0m

This seems because the endpoint property is actually expecting a host name.

https://github.com/Orange-OpenSource/autosleep/blob/develop/src/main/java/org/cloudfoundry/autosleep/worker/remote/config/CloudfoundryClientBuilder.java#L68

suggested fixes: either rename cf.client.target.endpoint property into cf.client.target.hostname (which would require a distinct property to configure a custom port), or instead extract hostname and portname from the cf.client.target.endpoint URL

Route binding: crash when receiving http trafic on proxy

java.lang.Exception: Missing header X-CF-Forwarded-Url

:41.30+0200 [APP/0]      OUT DEBUG o.c.a.worker.SpaceEnroller(100) - No new app to bind (all already enrolled or filtered by regexp)
2016-04-18T16:45:41.30+0200 [APP/0]      OUT DEBUG o.c.a.w.s.AbstractPeriodicTask(42) - Rescheduling in PT1M
2016-04-18T16:45:41.30+0200 [APP/0]      OUT DEBUG o.c.a.worker.scheduling.Clock(72) - scheduleTask - task 141f0d49-59f5-493f-afb6-086b427b0730
2016-04-18T16:45:56.78+0200 [APP/0]      OUT INFO  o.s.b.a.a.l.AuditListener(42) - AuditEvent [timestamp=Mon Apr 18 14:45:56 UTC 2016, principal=oto, type=AUTHENTICATION_SUCCESS, data={details=org.springframework.security.web.authentication.WebAuthenticationDetails@1de6: RemoteIpAddress: 192.168.26.105; SessionId: null}]
2016-04-18T16:45:56.79+0200 [APP/0]      OUT DEBUG o.c.a.ui.proxy.ProxyController(66) - proxy call on route binding b29d5495-e4b5-404c-986e-834d092b4b58
2016-04-18T16:45:56.80+0200 [APP/0]      OUT ERROR o.a.c.c.C.[.[.[.[dispatcherServlet](182) - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.cloudfoundry.autosleep.worker.remote.CloudFoundryException: java.lang.Exception: Missing header X-CF-Forwarded-Url] with root cause
2016-04-18T16:45:56.80+0200 [APP/0]      OUT java.lang.Exception: Missing header X-CF-Forwarded-Url

2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at org.cloudfoundry.autosleep.ui.proxy.ProxyController.listApplicationsById(ProxyController.java:68) ~[classes/:na]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_65-]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_65-]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_65-]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_65-]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) ~[spring-webmvc-4.1.8.RELEASE.jar!/:4.1.8.RELEASE]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:775) ~[spring-webmvc-4.1.8.RELEASE.jar!/:4.1.8.RELEASE]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705) ~[spring-webmvc-4.1.8.RELEASE.jar!/:4.1.8.RELEASE]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.1.8.RELEASE.jar!/:4.1.8.RELEASE]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) ~[spring-webmvc-4.1.8.RELEASE.jar!/:4.1.8.RELEASE]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) ~[spring-webmvc-4.1.8.RELEASE.jar!/:4.1.8.RELEASE]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967) ~[spring-webmvc-4.1.8.RELEASE.jar!/:4.1.8.RELEASE]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858) ~[spring-webmvc-4.1.8.RELEASE.jar!/:4.1.8.RELEASE]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) ~[tomcat-embed-core-8.0.32.jar!/:8.0.32]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843) ~[spring-webmvc-4.1.8.RELEASE.jar!/:4.1.8.RELEASE]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ~[tomcat-embed-core-8.0.32.jar!/:8.0.32]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) ~[tomcat-embed-core-8.0.32.jar!/:8.0.32]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) ~[tomcat-embed-core-8.0.32.jar!/:8.0.32]
2016-04-18T16:45:56.80+0200 [APP/0]      OUT    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsF```

Refactor

Renaming

  • ApplicationBinder ➡️ SpaceEnroller
  • AutosleepServiceInstance as SpaceEnrollerConfig
  • AppStateChecker ➡️ ApplicationStopper

Deletion

  • ApplicationBinding as an application object: information must be available on ApplicationInfo

Groupment

Use three blocks:

  • Broker and UI as service entry points
  • Watch part
  • Database part

Other

  • Keep full log and full event and not just date
  • Delete redis

Auto Sleep failing: NPE in getApplicationActivity()

Hi
Getting NPE while initializing the watche. Here is the log -

2016-02-18T08:09:26.59+0000 [HEALTH/0] OUT Exit status 0
2016-02-18T08:09:48.19+0000 [APP/0] OUT DEBUG o.c.a.s.s.AutoSleepServiceInstanceService(46) - getServiceInstance - a48514b6-4ea4-45ba-9bee-5cfa6b62b61f
2016-02-18T08:09:48.19+0000 [APP/0] OUT DEBUG o.c.a.s.s.AutoSleepServiceInstanceBindingService(37) - createServiceInstanceBinding - 05436dfd-ffcc-4d94-9f1a-1a0b3a51268a
2016-02-18T08:09:48.20+0000 [APP/0] OUT DEBUG o.c.a.scheduling.GlobalWatcher(80) - Initializing a watch on app eae6618b-4cea-464c-87c9-eda608278e19, for an interval of PT24H
2016-02-18T08:09:48.21+0000 [APP/0] OUT DEBUG o.c.autosleep.scheduling.Clock(48) - schedule - task 05436dfd-ffcc-4d94-9f1a-1a0b3a51268a
2016-02-18T08:09:48.22+0000 [RTR/0] OUT autosleep.local.micropcf.io - [18/02/2016:08:09:48 +0000] "PUT /v2/service_instances/a48514b6-4ea4-45ba-9bee-5cfa6b62b61f/service_bindings/05436dfd-ffcc-4d94-9f1a-1a0b3a51268a HTTP/1.1" 201 193 18 "-" "HTTPClient/1.0 (2.6.0.1, ruby 2.2.3 (2015-08-18))" 19
2.168.11.11:21551 x_forwarded_for:"192.168.11.11" x_forwarded_proto:"-" vcap_request_id:8b15edbf-0fdb-47ee-6276-0755f2e43f35 response_time:0.051294112 app_id:69e54164-47f1-4fdf-924e-e420ddc9b94d
2016-02-18T08:09:48.22+0000 [APP/0] OUT DEBUG o.c.a.s.AppStateChecker(31) - Checking on app eae6618b-4cea-464c-87c9-eda608278e19 state, for taskId 05436dfd-ffcc-4d94-9f1a-1a0b3a51268a
2016-02-18T08:09:48.22+0000 [APP/0] OUT ERROR o.c.a.remote.CloudFoundryApi(73) - error
2016-02-18T08:09:48.22+0000 [APP/0] OUT java.lang.NullPointerException: null
2016-02-18T08:09:48.22+0000 [APP/0] OUT at org.cloudfoundry.autosleep.remote.CloudFoundryApi.getApplicationInfo(CloudFoundryApi.java:47) ~[classes/:na]
2016-02-18T08:09:48.22+0000 [APP/0] OUT at org.cloudfoundry.autosleep.scheduling.AppStateChecker.run(AppStateChecker.java:32) [classes/:na]
2016-02-18T08:09:48.22+0000 [APP/0] OUT at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_65-]
2016-02-18T08:09:48.22+0000 [APP/0] OUT at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_65-]
2016-02-18T08:09:48.22+0000 [APP/0] OUT at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_65-]
2016-02-18T08:09:48.22+0000 [APP/0] OUT at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_65-]
2016-02-18T08:09:48.22+0000 [APP/0] OUT at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_65-]
2016-02-18T08:09:48.22+0000 [APP/0] OUT at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_65-]
2016-02-18T08:09:48.22+0000 [APP/0] OUT at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65-]

Please note I have deployed the v0.1.0 using WAR file.

Service immutability

A service instance should only be able to update its "no-optout" parameter. "inactivity" and "excludeNames" should be immutable, changed only by deleting and re-creating the service instance.

Configureable service broker Id

In order to support multiple instances of the autosleep service broker on a single CF instance (e.g. once for autosleep development, and one for production usage), it might be necessary to have configureable service broker Id, with a sensible default being the current "autosleep" value

Super-secret

An administrator should be able to use a "admin-secret" that would act as the "secret" parameter (in ordre to update a service instance he hasn't created).
Set this "admin-secret" with the current credentials provided to the application via the environment variables?

Javascript timestamp inconsistency

In dashboard webUI, last log will displays:
image
when last event shows:
image

The two timestamp are consistent, but displayed in various timezone.... Can't explain why! 😟

Binding non diego application

Currently binding a route to a service instance of non diego application fails

topping app [static_test_ben / 6f522570-f6b0-4bc7-a6ae-0c0d345d8585], last event: org.cloudfoundry.autosleep.dao.model.ApplicationInfo$DiagnosticInfo$ApplicationEvent@a00f6354, last log: org.cloudfoundry.autosleep.dao.model.ApplicationInfo$DiagnosticInfo$ApplicationLog@d1914468
2016-03-21T14:19:37.18+0100 [App/0]      OUT DEBUG o.c.a.w.remote.CloudFoundryApi(296) - listApplicationRoutes
2016-03-21T14:19:37.28+0100 [App/0]      OUT DEBUG o.c.a.w.ApplicationStopper(155) - Adding route binding between c0b924b0-99c8-4e76-a0d4-83a9996d5666 and 989806d2-3089-418f-80e0-a0dfb00d7e05 before stopping 6f522570-f6b0-4bc7-a6ae-0c0d345d8585
2016-03-21T14:19:37.28+0100 [App/0]      OUT DEBUG o.c.a.w.remote.CloudFoundryApi(133) - bindRouteToService
2016-03-21T14:19:37.33+0100 [App/0]      OUT ERROR r.c.publisher.SchedulerGroup(477) - Unrouted exception
2016-03-21T14:19:37.33+0100 [App/0]      OUT org.cloudfoundry.client.v2.CloudFoundryException: CF-ServiceInstanceRouteServiceRequiresDiego(60020): Route services are only supported for apps on Diego. Unbind the service instance from the route or enable Diego for the app.
2016-03-21T14:19:37.33+0100 [App/0]      OUT    at org.cloudfoundry.spring.client.v2.CloudFoundryExceptionBuilder.build(CloudFoundryExceptionBuilder.java:47) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.cloudfoundry.spring.util.AbstractSpringOperations.lambda$null$1(AbstractSpringOperations.java:72) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at reactor.core.publisher.FluxYieldingEmitter$YieldingSignalEmitter.request(FluxYieldingEmitter.java:72) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at reactor.core.util.DeferredSubscription.request(DeferredSubscription.java:92) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at reactor.core.publisher.FluxPublishOn$PublishOnPipeline.run(FluxPublishOn.java:164) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at reactor.core.publisher.SchedulerGroup$TaskSubscriber.onNext(SchedulerGroup.java:1081) [reactor-core-2.5.0.M2.jar!/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at reactor.core.publisher.SchedulerGroup$TaskSubscriber.onNext(SchedulerGroup.java:1063) [reactor-core-2.5.0.M2.jar!/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at reactor.core.publisher.WorkQueueProcessor$QueueSubscriberLoop.run(WorkQueueProcessor.java:842) [reactor-core-2.5.0.M2.jar!/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_65-]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_65-]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65-]
2016-03-21T14:19:37.34+0100 [App/0]      OUT Caused by: org.springframework.web.client.HttpClientErrorException: 400 Bad Request
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:91) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.springframework.security.oauth2.client.http.OAuth2ErrorHandler.handleError(OAuth2ErrorHandler.java:165) ~[spring-security-oauth2-2.0.9.RELEASE.jar!/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:641) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:597) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.springframework.security.oauth2.client.OAuth2RestTemplate.doExecute(OAuth2RestTemplate.java:128) ~[spring-security-oauth2-2.0.9.RELEASE.jar!/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:572) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:534) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.cloudfoundry.spring.util.AbstractSpringOperations.lambda$putWithBody$10(AbstractSpringOperations.java:139) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.cloudfoundry.spring.util.AbstractSpringOperations.lambda$null$1(AbstractSpringOperations.java:66) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    ... 9 common frames omitted
2016-03-21T14:19:37.34+0100 [App/0]      OUT ERROR o.c.a.w.ApplicationStopper(123) - error while requesting remote api
2016-03-21T14:19:37.34+0100 [App/0]      OUT org.cloudfoundry.autosleep.worker.remote.CloudFoundryException: org.cloudfoundry.client.v2.CloudFoundryException: CF-ServiceInstanceRouteServiceRequiresDiego(60020): Route services are only supported for apps on Diego. Unbind the service instance from the route or enable Diego for the app.
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.cloudfoundry.autosleep.worker.remote.CloudFoundryApi.bindServiceToRoute(CloudFoundryApi.java:142) ~[classes/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.cloudfoundry.autosleep.worker.ApplicationStopper.putApplicationToSleep(ApplicationStopper.java:157) [classes/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.cloudfoundry.autosleep.worker.ApplicationStopper.checkActiveApplication(ApplicationStopper.java:84) [classes/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.cloudfoundry.autosleep.worker.ApplicationStopper.handleApplicationEnrolled(ApplicationStopper.java:120) [classes/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.cloudfoundry.autosleep.worker.ApplicationStopper.lambda$run$14(ApplicationStopper.java:172) [classes/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.cloudfoundry.autosleep.util.ApplicationLocker.executeThreadSafe(ApplicationLocker.java:47) ~[classes/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.cloudfoundry.autosleep.worker.ApplicationStopper.run(ApplicationStopper.java:165) [classes/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_65-]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_65-]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_65-]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[na:1.8.0_65-]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_65-]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_65-]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_65-]
2016-03-21T14:19:37.34+0100 [App/0]      OUT Caused by: org.cloudfoundry.client.v2.CloudFoundryException: CF-ServiceInstanceRouteServiceRequiresDiego(60020): Route services are only supported for apps on Diego. Unbind the service instance from the route or enable Diego for the app.
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.cloudfoundry.spring.client.v2.CloudFoundryExceptionBuilder.build(CloudFoundryExceptionBuilder.java:47) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.cloudfoundry.spring.util.AbstractSpringOperations.lambda$null$1(AbstractSpringOperations.java:72) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at reactor.core.publisher.FluxYieldingEmitter$YieldingSignalEmitter.request(FluxYieldingEmitter.java:72) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at reactor.core.util.DeferredSubscription.request(DeferredSubscription.java:92) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at reactor.core.publisher.FluxPublishOn$PublishOnPipeline.run(FluxPublishOn.java:164) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at reactor.core.publisher.SchedulerGroup$TaskSubscriber.onNext(SchedulerGroup.java:1081) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at reactor.core.publisher.SchedulerGroup$TaskSubscriber.onNext(SchedulerGroup.java:1063) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at reactor.core.publisher.WorkQueueProcessor$QueueSubscriberLoop.run(WorkQueueProcessor.java:842) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    ... 3 common frames omitted
2016-03-21T14:19:37.34+0100 [App/0]      OUT Caused by: org.springframework.web.client.HttpClientErrorException: 400 Bad Request
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:91) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.springframework.security.oauth2.client.http.OAuth2ErrorHandler.handleError(OAuth2ErrorHandler.java:165) ~[spring-security-oauth2-2.0.9.RELEASE.jar!/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:641) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:597) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.springframework.security.oauth2.client.OAuth2RestTemplate.doExecute(OAuth2RestTemplate.java:128) ~[spring-security-oauth2-2.0.9.RELEASE.jar!/:na]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:572) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:534) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.cloudfoundry.spring.util.AbstractSpringOperations.lambda$putWithBody$10(AbstractSpringOperations.java:139) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    at org.cloudfoundry.spring.util.AbstractSpringOperations.lambda$null$1(AbstractSpringOperations.java:66) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-03-21T14:19:37.34+0100 [App/0]      OUT    ... 9 common frames omitted

autosleep may misleading stop unrelated apps in other spaces

Due to current CF-client-lib limitation, application stops are based on names and not guids. Seems to have possible cases where unrelated apps could be stopped in other spaces if they happen to have the same name than desired app to be put to sleep.

Wait for client-lib new version or contribute?

Documentation update for idle-duration configuration parameter

Hi,

Minor correction required for the documentation.
The parameter in the below example should be 'idle-duration' instead of inactivity

Example:'{"inactivity": "PT1H15M"}' would stop the application after 1 hour and 15 minutes of inactivity.

Thanks,
Padma

during forced auto-enrolllment, service instance delete should be rejected

Hi,

I am using autosleep service, release v0.2.2. While creating the service instance with the configuration parameters auto-enrollment and secret, it gets created successfully. However, it fails to work as expected:

  1. The space developer is still able to unbind the application from the autosleep service instance
  2. The space developer is still able to delete the autosleep service instance
    From the documentation, the above 2 actions shouldn't be possible when the auto-enrollment is set to true.

Upon checking the VCAP variables for the bound app, the credentials section doesn't seem to display the auto-enrollment variable. Is the behavior expected - that the variables are hidden from displaying to the end-user?

Thanks!
Padma

Web archive (war) file unavailable for release 0.2.2

Hi,

The war file for pre-release 0.2.2 is not available within the downloads section of the release, whereas the same is available for other releases. On the other hand, there is a jar available for this release. Don't know why?
Can we have the war uploaded for this release (0.2.2) too? or is there a release planned with the latest commits/fixes?

Best Regards,
Pradyut.

jpa error on production logs

To be investigated

2016-01-20T17:32:39.12+0100 [App/0]      OUT INFO  o.s.b.a.a.l.AuditListener(42) - AuditEvent [timestamp=Wed Jan 20 16:32:39 UTC 2016, principal=oto, type=AUTHENTICATION_SUCCESS, data={details=org.springframework.security.web.authentication.WebAuthenticationDetails@7798: RemoteIpAddress: 192.168.26.6; SessionId: null}]
2016-01-20T17:32:39.12+0100 [App/0]      OUT DEBUG o.s.w.f.CommonsRequestLoggingFilter(47) - Before request [uri=/v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb?null;client=192.168.26.6;user=oto]
2016-01-20T17:32:39.12+0100 [App/0]      OUT DEBUG o.s.b.a.e.m.EndpointHandlerMapping(294) - Looking up handler method for path /v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb
2016-01-20T17:32:39.12+0100 [App/0]      OUT DEBUG o.s.b.a.e.m.EndpointHandlerMapping(302) - Did not find handler method for [/v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb]
2016-01-20T17:32:39.12+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.AutosleepServiceInstanceService(78) - createServiceInstance - 7bda6a29-66d2-428c-8617-fc5c5244d8cb
2016-01-20T17:32:39.15+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.p.ParameterReaderFactory(34) - pattern PT15M
2016-01-20T17:32:39.15+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.p.ParameterReaderFactory(68) - excludeFromAutoEnrollment .*
2016-01-20T17:32:39.21+0100 [App/0]      OUT DEBUG o.c.a.w.s.AbstractPeriodicTask(21) - start - PT10S
2016-01-20T17:32:39.21+0100 [App/0]      OUT DEBUG o.c.a.worker.scheduling.Clock(35) - scheduleTask - task 7bda6a29-66d2-428c-8617-fc5c5244d8cb
2016-01-20T17:32:39.21+0100 [App/0]      OUT DEBUG o.s.w.f.CommonsRequestLoggingFilter(55) - After request [uri=/v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb?null;client=192.168.26.6;user=oto;payload={"service_id":"autosleep-dev","plan_id":"78C0A1DB-ACC9-4B6D-AF22-A1EF63C2CE06","organization_guid":"d7d77408-a250-45e3-8de5-71fcf199bbab","space_guid":"2d745a4b-67e3-4398-986e-2adbcf8f7ec9","parameters":{"idle-duration":"PT15M","exclude-from-auto-enrollment":".*"}}]
2016-01-20T17:32:39.22+0100 [RTR/0]      OUT autosleep.cf.ns.nd-paas.itn.ftgroup - [20/01/2016:16:32:39 +0000] "PUT /v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb HTTP/1.1" 201 265 102 "-" "HTTPClient/1.0 (2.6.0.1, ruby 2.2.3 (2015-08-18))" 192.168.26.30:45320 x_forwarded_for:"192.168.26.145" x_forwarded_proto:"http" vcap_request_id:6881c3e8-cf48-4f8a-475e-92e20aca6a84 response_time:0.106194825 app_id:3048d795-f031-435f-85e8-71dce339e869
2016-01-20T17:32:39.76+0100 [App/0]      OUT INFO  o.s.b.a.a.l.AuditListener(42) - AuditEvent [timestamp=Wed Jan 20 16:32:39 UTC 2016, principal=oto, type=AUTHENTICATION_SUCCESS, data={details=org.springframework.security.web.authentication.WebAuthenticationDetails@1de6: RemoteIpAddress: 192.168.26.105; SessionId: null}]
2016-01-20T17:32:39.76+0100 [App/0]      OUT DEBUG o.s.w.f.CommonsRequestLoggingFilter(47) - Before request [uri=/v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb/service_bindings/1d4bc116-a782-46d1-8799-d19b5241944e?null;client=192.168.26.105;user=oto]
2016-01-20T17:32:39.76+0100 [App/0]      OUT DEBUG o.s.b.a.e.m.EndpointHandlerMapping(294) - Looking up handler method for path /v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb/service_bindings/1d4bc116-a782-46d1-8799-d19b5241944e
2016-01-20T17:32:39.76+0100 [App/0]      OUT DEBUG o.s.b.a.e.m.EndpointHandlerMapping(302) - Did not find handler method for [/v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb/service_bindings/1d4bc116-a782-46d1-8799-d19b5241944e]
2016-01-20T17:32:39.77+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.AutosleepServiceInstanceService(123) - getServiceInstance - 7bda6a29-66d2-428c-8617-fc5c5244d8cb
2016-01-20T17:32:39.80+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.ApplicationBindingService(51) - createServiceInstanceBinding - 1d4bc116-a782-46d1-8799-d19b5241944e
2016-01-20T17:32:39.87+0100 [App/0]      OUT WARN  o.h.e.j.spi.SqlExceptionHelper(144) - SQL Error: 1406, SQLState: 22001
2016-01-20T17:32:39.88+0100 [App/0]      OUT ERROR o.h.e.j.spi.SqlExceptionHelper(146) - Data truncation: Data too long for column 'states' at row 1
2016-01-20T17:32:39.88+0100 [App/0]      OUT INFO  o.h.e.j.b.i.AbstractBatchImpl(208) - HHH000010: On release of batch it still contained JDBC statements
2016-01-20T17:32:39.88+0100 [App/0]      OUT WARN  o.h.e.j.spi.SqlExceptionHelper(232) - SQL Warning Code: 1406, SQLState: 22001
2016-01-20T17:32:39.88+0100 [App/0]      OUT WARN  o.h.e.j.spi.SqlExceptionHelper(233) - Data too long for column 'states' at row 1
2016-01-20T17:32:39.94+0100 [App/0]      OUT WARN  o.c.c.s.c.BaseController(62) - Exception
2016-01-20T17:32:39.94+0100 [App/0]      OUT org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.DataException: could not execute statement; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not execute statement
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:415) ~[spring-orm-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:122) ~[spring-orm-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:521) ~[spring-orm-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:757) ~[spring-tx-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:726) ~[spring-tx-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:521) ~[spring-tx-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:291) ~[spring-tx-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136) ~[spring-tx-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:119) ~[spring-data-jpa-1.9.0.RELEASE.jar!/:na]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) ~[spring-aop-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at com.sun.proxy.$Proxy95.save(Unknown Source) ~[na:na]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.cloudfoundry.autosleep.ui.servicebroker.service.ApplicationBindingService.lambda$createServiceInstanceBinding$1(ApplicationBindingService.java:67) ~[classes/:na]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.cloudfoundry.autosleep.util.ApplicationLocker.executeThreadSafe(ApplicationLocker.java:28) ~[classes/:na]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.cloudfoundry.autosleep.ui.servicebroker.service.ApplicationBindingService.createServiceInstanceBinding(ApplicationBindingService.java:57) ~[classes/:na]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.cloudfoundry.community.servicebroker.controller.ServiceInstanceBindingController.bindServiceInstance(ServiceInstanceBindingController.java:63) ~[spring-boot-cf-service-broker-facbe53.jar!/:na]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_65-]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_65-]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_65-]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_65-]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) ~[spring-web-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) ~[spring-web-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) ~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776) ~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705) ~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) ~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) ~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967) ~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:880) ~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at javax.servlet.http.HttpServlet.service(HttpServlet.java:651) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843) ~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ApplicationContextHeaderFilter.doFilterInternal(EndpointWebMvcAutoConfiguration.java:295) [spring-boot-actuator-1.2.6.RELEASE.jar!/:1.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.filter.AbstractRequestLoggingFilter.doFilterInternal(AbstractRequestLoggingFilter.java:219) [spring-web-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:102) [spring-boot-actuator-1.2.6.RELEASE.jar!/:1.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) [spring-security-web-3.2.6.RELEASE.jar!/:3.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) [spring-web-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:69) [spring-boot-actuator-1.2.6.RELEASE.jar!/:1.2.6.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1526) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1482) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_65-]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_65-]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.26.jar!/:8.0.26]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65-]
2016-01-20T17:32:39.94+0100 [App/0]      OUT Caused by: javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not execute statement
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763) ~[hibernate-entitymanager-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677) ~[hibernate-entitymanager-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:82) ~[hibernate-entitymanager-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:517) ~[spring-orm-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   ... 105 common frames omitted
2016-01-20T17:32:39.94+0100 [App/0]      OUT Caused by: org.hibernate.exception.DataException: could not execute statement
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:69) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3281) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3183) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3525) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:159) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:465) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:351) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1258) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:425) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:77) ~[hibernate-entitymanager-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   ... 106 common frames omitted
2016-01-20T17:32:39.94+0100 [App/0]      OUT Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'states' at row 1
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3868) ~[mysql-connector-java-5.1.37.jar!/:5.1.37]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806) ~[mysql-connector-java-5.1.37.jar!/:5.1.37]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470) ~[mysql-connector-java-5.1.37.jar!/:5.1.37]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617) ~[mysql-connector-java-5.1.37.jar!/:5.1.37]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2550) ~[mysql-connector-java-5.1.37.jar!/:5.1.37]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861) ~[mysql-connector-java-5.1.37.jar!/:5.1.37]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073) ~[mysql-connector-java-5.1.37.jar!/:5.1.37]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2009) ~[mysql-connector-java-5.1.37.jar!/:5.1.37]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5094) ~[mysql-connector-java-5.1.37.jar!/:5.1.37]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1994) ~[mysql-connector-java-5.1.37.jar!/:5.1.37]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) ~[commons-dbcp-1.4.jar!/:1.4]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) ~[commons-dbcp-1.4.jar!/:1.4]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2016-01-20T17:32:39.94+0100 [App/0]      OUT   ... 120 common frames omitted
2016-01-20T17:32:39.95+0100 [App/0]      OUT DEBUG o.s.w.f.CommonsRequestLoggingFilter(55) - After request [uri=/v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb/service_bindings/1d4bc116-a782-46d1-8799-d19b5241944e?null;client=192.168.26.105;user=oto;payload={"service_id":"autosleep-dev","plan_id":"78C0A1DB-ACC9-4B6D-AF22-A1EF63C2CE06","app_guid":"3a4e9275-e937-4735-b272-84ddea21b1f6","bind_resource":{"app_guid":"3a4e9275-e937-4735-b272-84ddea21b1f6"}}]
2016-01-20T17:32:39.96+0100 [RTR/0]      OUT autosleep.cf.ns.nd-paas.itn.ftgroup - [20/01/2016:16:32:39 +0000] "PUT /v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb/service_bindings/1d4bc116-a782-46d1-8799-d19b5241944e HTTP/1.1" 500 197 212 "-" "HTTPClient/1.0 (2.6.0.1, ruby 2.2.3 (2015-08-18))" 192.168.26.30:51759 x_forwarded_for:"192.168.26.145" x_forwarded_proto:"http" vcap_request_id:92b6c830-fdd1-4e04-663a-891186c9d8c4 response_time:0.21415286 app_id:3048d795-f031-435f-85e8-71dce339e869
2016-01-20T17:32:40.40+0100 [App/0]      OUT INFO  o.s.b.a.a.l.AuditListener(42) - AuditEvent [timestamp=Wed Jan 20 16:32:40 UTC 2016, principal=oto, type=AUTHENTICATION_SUCCESS, data={details=org.springframework.security.web.authentication.WebAuthenticationDetails@7798: RemoteIpAddress: 192.168.26.6; SessionId: null}]
2016-01-20T17:32:40.40+0100 [App/0]      OUT DEBUG o.s.w.f.CommonsRequestLoggingFilter(47) - Before request [uri=/v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb?plan_id=78C0A1DB-ACC9-4B6D-AF22-A1EF63C2CE06&service_id=autosleep-dev;client=192.168.26.6;user=oto]
2016-01-20T17:32:40.41+0100 [App/0]      OUT DEBUG o.s.b.a.e.m.EndpointHandlerMapping(294) - Looking up handler method for path /v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb
2016-01-20T17:32:40.41+0100 [App/0]      OUT DEBUG o.s.b.a.e.m.EndpointHandlerMapping(302) - Did not find handler method for [/v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb]
2016-01-20T17:32:40.41+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.AutosleepServiceInstanceService(180) - deleteServiceInstance - 7bda6a29-66d2-428c-8617-fc5c5244d8cb
2016-01-20T17:32:40.49+0100 [App/0]      OUT DEBUG o.s.w.f.CommonsRequestLoggingFilter(55) - After request [uri=/v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb?plan_id=78C0A1DB-ACC9-4B6D-AF22-A1EF63C2CE06&service_id=autosleep-dev;client=192.168.26.6;user=oto]
2016-01-20T17:32:40.49+0100 [RTR/0]      OUT autosleep.cf.ns.nd-paas.itn.ftgroup - [20/01/2016:16:32:40 +0000] "DELETE /v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb?plan_id=78C0A1DB-ACC9-4B6D-AF22-A1EF63C2CE06&service_id=autosleep-dev HTTP/1.1" 200 0 2 "-" "HTTPClient/1.0 (2.6.0.1, ruby 2.2.3 (2015-08-18))" 192.168.26.30:45327 x_forwarded_for:"192.168.26.52" x_forwarded_proto:"http" vcap_request_id:bac519a1-5e91-4a60-6a51-5d2cf6700467 response_time:0.089499896 app_id:3048d795-f031-435f-85e8-71dce339e869
2016-01-20T17:32:41.91+0100 [App/0]      OUT INFO  o.s.b.a.a.l.AuditListener(42) - AuditEvent [timestamp=Wed Jan 20 16:32:41 UTC 2016, principal=oto, type=AUTHENTICATION_SUCCESS, data={details=org.springframework.security.web.authentication.WebAuthenticationDetails@1de6: RemoteIpAddress: 192.168.26.105; SessionId: null}]
2016-01-20T17:32:41.91+0100 [App/0]      OUT DEBUG o.s.w.f.CommonsRequestLoggingFilter(47) - Before request [uri=/v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb/service_bindings/1d4bc116-a782-46d1-8799-d19b5241944e?plan_id=78C0A1DB-ACC9-4B6D-AF22-A1EF63C2CE06&service_id=autosleep-dev;client=192.168.26.105;user=oto]
2016-01-20T17:32:41.91+0100 [App/0]      OUT DEBUG o.s.b.a.e.m.EndpointHandlerMapping(294) - Looking up handler method for path /v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb/service_bindings/1d4bc116-a782-46d1-8799-d19b5241944e
2016-01-20T17:32:41.91+0100 [App/0]      OUT DEBUG o.s.b.a.e.m.EndpointHandlerMapping(302) - Did not find handler method for [/v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb/service_bindings/1d4bc116-a782-46d1-8799-d19b5241944e]
2016-01-20T17:32:41.92+0100 [App/0]      OUT DEBUG o.c.a.u.s.s.AutosleepServiceInstanceService(123) - getServiceInstance - 7bda6a29-66d2-428c-8617-fc5c5244d8cb
2016-01-20T17:32:41.95+0100 [App/0]      OUT DEBUG o.s.w.f.CommonsRequestLoggingFilter(55) - After request [uri=/v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb/service_bindings/1d4bc116-a782-46d1-8799-d19b5241944e?plan_id=78C0A1DB-ACC9-4B6D-AF22-A1EF63C2CE06&service_id=autosleep-dev;client=192.168.26.105;user=oto]
2016-01-20T17:32:41.95+0100 [RTR/0]      OUT autosleep.cf.ns.nd-paas.itn.ftgroup - [20/01/2016:16:32:41 +0000] "DELETE /v2/service_instances/7bda6a29-66d2-428c-8617-fc5c5244d8cb/service_bindings/1d4bc116-a782-46d1-8799-d19b5241944e?plan_id=78C0A1DB-ACC9-4B6D-AF22-A1EF63C2CE06&service_id=autosleep-dev HTTP/1.1" 422 0 91 "-" "HTTPClient/1.0 (2.6.0.1, ruby 2.2.3 (2015-08-18))" 192.168.26.30:51771 x_forwarded_for:"192.168.26.54" x_forwarded_proto:"http" vcap_request_id:cad8c09a-1638-4f5b-4869-6a7f16931bee response_time:0.048092175 app_id:3048d795-f031-435f-85e8-71dce339e869
2016-01-20T17:32:49.22+0100 [App/0]      OUT DEBUG o.c.a.worker.SpaceEnroller(85) - service has been removed. Cancelling task
2016-01-20T17:32:49.22+0100 [App/0]      OUT DEBUG o.c.a.worker.scheduling.Clock(47) - removeTask - task 7bda6a29-66d2-428c-8617-fc5c5244d8cb

Allow unbinding for no-optout service instances

If we don't let the user unbind its app, he won't be able to delete it. Better to let him unbind and automatically re-bind later (when scanning).

-> this means that our "white-list" feature shouldn't be activated for no-optout instances

Failed to decode glyphicon on cloud foundry

The webUI log the following errors

Failed to decode downloaded font: http://autosleep.cf.ns.nd-paas.itn.ftgroup/fonts/glyphicons-halflings-regular.woff2
(index):1 OTS parsing error: Failed to convert WOFF 2.0 font to SFNT
(index):1 Failed to decode downloaded font: http://autosleep.cf.ns.nd-paas.itn.ftgroup/fonts/glyphicons-halflings-regular.woff
(index):1 OTS parsing error: incorrect file size in WOFF header
(index):1 Failed to decode downloaded font: http://autosleep.cf.ns.nd-paas.itn.ftgroup/fonts/glyphicons-halflings-regular.ttf
(index):1 OTS parsing error: incorrect entrySelector for table directory

However, there is no problem when running the application locally.

Deleting binding without related appinfo stored

Log still shows the following error:

OUT ERROR o.c.a.s.s.AutoSleepServiceInstanceBindingService(91) - Deleting a binding with no related application info. This should never happen.

As stated, "this should never happen". Investigate.

Route binding error

Apparently, the retrieved routeid is not an id



2016-04-18T11:37:11.99+0200 [APP/0]      OUT DEBUG o.c.a.w.remote.CloudFoundryApi(198) - getApplicationActivity -  0a9393b0-7db8-48df-8699-77543e84651a
2016-04-18T11:37:12.15+0200 [APP/0]      OUT DEBUG o.c.a.w.ApplicationStopper(115) - Checking on app 0a9393b0-7db8-48df-8699-77543e84651a state
2016-04-18T11:37:12.15+0200 [APP/0]      OUT DEBUG o.c.a.util.LastDateComputer(43) - computeLastDate - lastEvent.isAfter(lastLog) = false
2016-04-18T11:37:12.15+0200 [APP/0]      OUT DEBUG o.c.a.w.ApplicationStopper(85) - last event:  2016-04-18T09:36:11.985Z
2016-04-18T11:37:12.15+0200 [APP/0]      OUT INFO  o.c.a.w.ApplicationStopper(151) - Stopping app [sample / 0a9393b0-7db8-48df-8699-77543e84651a], last event: org.cloudfoundry.autosleep.dao.model.ApplicationInfo$DiagnosticInfo$ApplicationEvent@768d9, last log: org.cloudfoundry.autosleep.dao.model.ApplicationInfo$DiagnosticInfo$ApplicationLog@e2e4a52b
2016-04-18T11:37:12.15+0200 [APP/0]      OUT DEBUG o.c.a.w.remote.CloudFoundryApi(269) - listApplicationRoutes
2016-04-18T11:37:12.22+0200 [APP/0]      OUT DEBUG o.c.a.w.remote.CloudFoundryApi(117) - bind - 1
2016-04-18T11:37:12.31+0200 [APP/0]      OUT INFO  o.s.b.a.a.l.AuditListener(42) - AuditEvent [timestamp=Mon Apr 18 09:37:12 UTC 2016, principal=oto, type=AUTHENTICATION_SUCCESS, data={details=org.springframework.security.web.authentication.WebAuthenticationDetails@7798: RemoteIpAddress: 192.168.26.6; SessionId: null}]
2016-04-18T11:37:12.31+0200 [APP/0]      OUT DEBUG o.c.a.u.s.s.AutosleepBindingService(84) - createServiceInstanceBinding - bb17b024-fd53-4466-bff7-405b4b94b2d8
2016-04-18T11:37:12.32+0200 [APP/0]      OUT DEBUG o.c.a.u.s.s.AutosleepBindingService(120) - creating binding bb17b024-fd53-4466-bff7-405b4b94b2d8 for route sample.cf.ns.nd-paas.itn.ftgroup
2016-04-18T11:37:12.32+0200 [APP/0]      OUT DEBUG o.c.a.w.remote.CloudFoundryApi(317) - listRouteApplications
2016-04-18T11:37:12.43+0200 [RTR/0]      OUT autosleep-arno.cf.ns.nd-paas.itn.ftgroup - [18/04/2016:09:37:12 +0000] "PUT /v2/service_instances/2d93da5d-f229-4979-b515-901d6c7f07f8/service_bindings/bb17b024-fd53-4466-bff7-405b4b94b2d8 HTTP/1.1" 500 119 63 "-" "HTTPClient/1.0 (2.6.0.1, ruby 2.2.4 (2015-12-16))" 192.168.26.30:49292 x_forwarded_for:"192.168.26.52" x_forwarded_proto:"http" vcap_request_id:9215d186-feb8-4b87-4da2-4e4aabcdfff5 response_time:0.121520422 app_id:d9856915-86da-44bf-94e0-28641aad1bec
2016-04-18T11:37:12.43+0200 [APP/0]      OUT ERROR r.c.publisher.SchedulerGroup(477) - Unrouted exception
2016-04-18T11:37:12.43+0200 [APP/0]      OUT org.cloudfoundry.client.v2.CloudFoundryException: CF-RouteNotFound(210002): The route could not be found: sample.cf.ns.nd-paas.itn.ftgroup
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at org.cloudfoundry.spring.client.v2.CloudFoundryExceptionBuilder.build(CloudFoundryExceptionBuilder.java:47) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at org.cloudfoundry.spring.util.AbstractSpringOperations.lambda$null$1(AbstractSpringOperations.java:72) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at reactor.core.publisher.FluxYieldingEmitter$YieldingSignalEmitter.request(FluxYieldingEmitter.java:72) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at reactor.core.util.DeferredSubscription.request(DeferredSubscription.java:92) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at reactor.core.publisher.FluxPublishOn$PublishOnPipeline.run(FluxPublishOn.java:164) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at reactor.core.publisher.SchedulerGroup$TaskSubscriber.onNext(SchedulerGroup.java:1081) [reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at reactor.core.publisher.SchedulerGroup$TaskSubscriber.onNext(SchedulerGroup.java:1063) [reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at reactor.core.publisher.WorkQueueProcessor$QueueSubscriberLoop.run(WorkQueueProcessor.java:842) [reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_65-]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_65-]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65-]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT Caused by: org.springframework.web.client.HttpClientErrorException: 404 Not Found
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:91) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at org.springframework.security.oauth2.client.http.OAuth2ErrorHandler.handleError(OAuth2ErrorHandler.java:165) ~[spring-security-oauth2-2.0.9.RELEASE.jar!/:na]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:641) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:597) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at org.springframework.security.oauth2.client.OAuth2RestTemplate.doExecute(OAuth2RestTemplate.java:128) ~[spring-security-oauth2-2.0.9.RELEASE.jar!/:na]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:572) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:280) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at org.cloudfoundry.spring.util.AbstractSpringOperations.lambda$get$3(AbstractSpringOperations.java:85) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    at org.cloudfoundry.spring.util.AbstractSpringOperations.lambda$null$1(AbstractSpringOperations.java:66) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-04-18T11:37:12.43+0200 [APP/0]      OUT    ... 9 common frames omitted
2016-04-18T11:37:12.49+0200 [APP/0]      OUT ERROR o.c.a.w.ApplicationStopper(128) - error while requesting remote api
2016-04-18T11:37:12.49+0200 [APP/0]      OUT org.cloudfoundry.autosleep.worker.remote.CloudFoundryException: org.cloudfoundry.client.v2.CloudFoundryException: CF-ServiceBrokerBadResponse(10001): Service broker error: Can't check applications map to this route id
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at org.cloudfoundry.autosleep.worker.remote.CloudFoundryApi.waitForResult(CloudFoundryApi.java:361) ~[classes/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at org.cloudfoundry.autosleep.worker.remote.CloudFoundryApi.bind(CloudFoundryApi.java:124) ~[classes/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at org.cloudfoundry.autosleep.worker.remote.CloudFoundryApi.bindRoutes(CloudFoundryApi.java:141) ~[classes/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at org.cloudfoundry.autosleep.worker.ApplicationStopper.putApplicationToSleep(ApplicationStopper.java:158) [classes/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at org.cloudfoundry.autosleep.worker.ApplicationStopper.checkActiveApplication(ApplicationStopper.java:88) [classes/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at org.cloudfoundry.autosleep.worker.ApplicationStopper.handleApplicationEnrolled(ApplicationStopper.java:125) [classes/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at org.cloudfoundry.autosleep.worker.ApplicationStopper.lambda$run$19(ApplicationStopper.java:179) [classes/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at org.cloudfoundry.autosleep.util.ApplicationLocker.executeThreadSafe(ApplicationLocker.java:47) ~[classes/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at org.cloudfoundry.autosleep.worker.ApplicationStopper.run(ApplicationStopper.java:172) [classes/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_65-]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_65-]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_65-]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[na:1.8.0_65-]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_65-]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_65-]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_65-]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT Caused by: org.cloudfoundry.client.v2.CloudFoundryException: CF-ServiceBrokerBadResponse(10001): Service broker error: Can't check applications map to this route id
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at org.cloudfoundry.spring.client.v2.CloudFoundryExceptionBuilder.build(CloudFoundryExceptionBuilder.java:47) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at org.cloudfoundry.spring.util.AbstractSpringOperations.lambda$null$1(AbstractSpringOperations.java:72) ~[cloudfoundry-client-spring-2.0.0.M1.jar!/:2.0.0.M1]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at reactor.core.publisher.FluxYieldingEmitter$YieldingSignalEmitter.request(FluxYieldingEmitter.java:72) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at reactor.core.util.DeferredSubscription.set(DeferredSubscription.java:71) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at reactor.core.publisher.FluxPublishOn$PublishOnPipeline.onSubscribe(FluxPublishOn.java:126) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at reactor.core.subscriber.SignalEmitter.start(SignalEmitter.java:170) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at reactor.core.publisher.FluxYieldingEmitter.subscribe(FluxYieldingEmitter.java:43) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:152) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at reactor.core.publisher.FluxFlatMap.subscribe(FluxFlatMap.java:169) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at reactor.core.publisher.FluxPublishOn$SourceSubscribeTask.run(FluxPublishOn.java:308) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at reactor.core.publisher.SchedulerGroup$TaskSubscriber.onNext(SchedulerGroup.java:1081) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at reactor.core.publisher.SchedulerGroup$TaskSubscriber.onNext(SchedulerGroup.java:1063) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at reactor.core.publisher.WorkQueueProcessor$QueueSubscriberLoop.run(WorkQueueProcessor.java:842) ~[reactor-core-2.5.0.M2.jar!/:na]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    ... 3 common frames omitted
2016-04-18T11:37:12.49+0200 [APP/0]      OUT Caused by: org.springframework.web.client.HttpServerErrorException: 502 Bad Gateway
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:94) ~[spring-web-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
2016-04-18T11:37:12.49+0200 [APP/0]      OUT    at org.springframework.security.oauth2.client.http.OAuth2ErrorHandler.handleError(OAuth2ErrorHandler

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.