These are chat archives for spring-cloud/spring-cloud

5th
Feb 2015
Sergei Egorov
@bsideup
Feb 05 2015 15:29
Hello everyone! Is it ok in Spring Cloud Config server that every time I query for configuration context is refreshing?
Dave Syer
@dsyer
Feb 05 2015 15:29
Which context?
Sergei Egorov
@bsideup
Feb 05 2015 15:30
For each request to config I see "Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@7331fb1f" in logs
Dave Syer
@dsyer
Feb 05 2015 15:31
That's because we build an application context
It's not the server application context
Just a tiny Spring Boot app to initialize the Environment
Sergei Egorov
@bsideup
Feb 05 2015 15:32
ah, ok. Little bit weird but ok:)
One more question - if I query /health then I see Redis there. Why?
(I'm running config server in IDEA, maybe some classpath issues from another modules)
Dave Syer
@dsyer
Feb 05 2015 15:34
If you have redis on the classpath then you should see it
Check your classpath
It's not needed in the config server by default
Sergei Egorov
@bsideup
Feb 05 2015 15:34
ok, thanks. I will try to run from Gradle
Ah, yes. IDEA issue. But there is another issue. In /health configServer status is "DOWN" with "no property sources located", and in logs I see: "GET request for "http://localhost:8888/application/default/master" resulted in 401 (Unauthorized); invoking error handler". Why so?
(security is enabled with security: user: password: ... )
Dave Syer
@dsyer
Feb 05 2015 15:38
In the server itself?
Sergei Egorov
@bsideup
Feb 05 2015 15:39
yes
localhost:8888/health
Dave Syer
@dsyer
Feb 05 2015 15:39
(If I were you I'd put that in /admin/health but that's not relevant)
Sergei Egorov
@bsideup
Feb 05 2015 15:40
hm....... /admin/health is ok
Dave Syer
@dsyer
Feb 05 2015 15:40
did you set spring.cloud.config.server.bootstrap=true?
Sergei Egorov
@bsideup
Feb 05 2015 15:40
No
Should I?
Dave Syer
@dsyer
Feb 05 2015 15:40
Not usually
I'm just trying to work out why the server is trying to act like a client
It doesn't do that in the sample

Also, I found this in logs after Spring Boot banner:

2015-02-05 17:35:07.310 ERROR 16788 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: Could not locate PropertySource. The fail fast property is set, failing

Dave Syer
@dsyer
Feb 05 2015 15:44
That's normal for a client (not a server)
(The error message is wrong - fixed in snapshots)
Ghost
@ghost~54cac78adb8155e6700f3e5a
Feb 05 2015 15:44
security:
user:
password: 'testpass'
maybe you need fill user?
Sergei Egorov
@bsideup
Feb 05 2015 15:44
"user" is a key
(found this is examples)
Dave Syer
@dsyer
Feb 05 2015 15:45
You probably should have a user name, but that is for securing the server
Sergei Egorov
@bsideup
Feb 05 2015 15:45
and it works (I'm able to get config using Basic auth)
Dave Syer
@dsyer
Feb 05 2015 15:45
it shouldn't affect the client behaviour
Actually the sample in spring-cloud-config does behave like that (so it's normal)
The one in spring-cloud-samples/configserver doesn't - trying to see why now
spring:
  cloud:
    config:
      enabled: false
It does that (in bootstrap.yml)
Sergei Egorov
@bsideup
Feb 05 2015 15:48
Cool, thanks! Now it works (but propertySources are empty in /admin/health)
Dave Syer
@dsyer
Feb 05 2015 15:48
that's expected since you haven't mapped /admin to anything
What I meant was that I would set management.contextPath=/admin, so that the Actuator endpoints don't clash with config property sources.
But you don't need to
(Or so it seems)
Sergei Egorov
@bsideup
Feb 05 2015 15:50
ooops, now I understand.
There are no healthchecks for config server, right?
Dave Syer
@dsyer
Feb 05 2015 15:53
Don't think so
Feel free to add one
Sergei Egorov
@bsideup
Feb 05 2015 15:54
Maybe I can contribute some? I think it's important to health check git repo since it's remote