Closed Patheek1971 closed 7 years ago
We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.
The labels on this github issue will be updated when the story is started.
Hi @Patheek1971,
Happy to help you get this POC up and running. Worth noting: if you have trouble with PCF Dev for your POC, you might consider using PWS instead. PWS is much more similar to PCF than to PCF Dev in terms of performance and stability. Here are instructions for running Spring Cloud Services on PWS: https://docs.run.pivotal.io/spring-cloud-services/
If you're still interested in demoing using PCF Dev, please destroy your VM and following these instructions for running PCF Dev from behind a corporate proxy: https://docs.pivotal.io/pcf-dev/proxy.html You may not need to provide config-server with any extra proxy info if you follow those steps.
Also, make sure you follow our Spring Cloud Services instructions here: https://docs.pivotal.io/pcf-dev/usage-scs.html
The logs inside of the PCF Dev VM are only logs for internal PCF components. To access application logs for the config server, you can run cf logs config-<GUID>
or cf logs config-<GUID> --recent
after targeting the instances
space of the p-spring-cloud-services
org as the admin
user. Alternatively, you should be able to view these logs using Apps Manager at https://local.pcfdev.io
.
Finally, please upgrade to the latest version of PCF Dev, which is v0.24.0.
Thanks for the input. I will try and let you know what happens.
Hi sclevine,
I tried using the latest PCF Dev version 0.24.0 and set the following proxy setting before staring the pcf dev.
PS C:\Users\WZGVNB\Downloads> $env:HTTP_PROXY = "http://naproxy.as.com:80" PS C:\Users\WZGVNB\Downloads> $env:HTTPS_PROXY = "http://naproxy.as.com:80" PS C:\Users\WZGVNB\Downloads> $env:NO_PROXY = ".local.pcfdev.io,local.pcfdev.io"
However, after creating that I'm not able to get my console loaded. https://console.local.pcfdev.io/
This page returns this message. 404 Not Found: Requested route ('console.local.pcfdev.io') does not exist.
I tried stopping and restarting with only HTTP_PROXY and HTTPS_PROXY but not setting NO_PROXY, still console did not come up. I also tried without any proxy setting in my environment, I did not get access to console established.
Please suggest next steps to try.
Thanks
Apps Manager is available at either of these two domains: https://local.pcfdev.io https://apps.local.pcfdev.io
Also, please destroy and re-start PCF Dev after changing any of those proxy settings.
Thank you Steven.
So far so good Steven. I got the app manager access but the config-server is not trouble free. I tried several iterations on the environment and proxy settings.
Finally, I started using PWS as you mentioned in the earlier post. All went well till I start to deploy my test app.
When I push the service from cf CLI, I got this error upon start. It can not identify the buildpack for my app. I can run this springboot app outside the PCF with no trouble.
2017-03-15T15:38:05.163-04:00 [STG/0] [OUT] Downloaded nodejs_buildpack 2017-03-15T15:38:05.164-04:00 [STG/0] [OUT] Downloaded dotnet_core_buildpack 2017-03-15T15:38:05.226-04:00 [STG/0] [OUT] Downloaded ruby_buildpack 2017-03-15T15:38:05.226-04:00 [STG/0] [OUT] Creating container 2017-03-15T15:38:05.893-04:00 [STG/0] [OUT] Successfully created container 2017-03-15T15:38:05.894-04:00 [STG/0] [OUT] Downloading app package... 2017-03-15T15:38:08.730-04:00 [STG/0] [OUT] Downloaded app package (42.1M) 2017-03-15T15:38:10.129-04:00 [STG/0] [ERR] None of the buildpacks detected a compatible application 2017-03-15T15:38:10.130-04:00 [STG/0] [OUT] Exit status 222 2017-03-15T15:38:10.172-04:00 [STG/0] [OUT] Destroying container
How do I debug this ? Any pointers you can suggest might be helpful.
Thanks a lot.
more update after few more run attempt. from app Manager.
Failed to Compile droplet error...
2017-03-15T17:40:33.773-04:00 [API/3] [OUT] Updated app with guid 2573d084-c421-44fa-af02-ca2c8dabde49 ({"state"=>"STARTED"}) 2017-03-15T17:40:34.211-04:00 [STG/0] [OUT] Downloading java_buildpack... 2017-03-15T17:40:34.273-04:00 [STG/0] [OUT] Creating container 2017-03-15T17:40:34.273-04:00 [STG/0] [OUT] Downloaded java_buildpack 2017-03-15T17:40:34.824-04:00 [STG/0] [OUT] Successfully created container 2017-03-15T17:40:34.825-04:00 [STG/0] [OUT] Downloading app package... 2017-03-15T17:40:37.677-04:00 [STG/0] [OUT] Downloaded app package (42.1M) 2017-03-15T17:40:38.601-04:00 [STG/0] [OUT] -----> Java Buildpack Version: v3.14 (offline) | https://github.com/cloudfoundry/java-buildpack.git#d5d58c6 2017-03-15T17:40:38.611-04:00 [STG/0] [ERR] Failed to compile droplet 2017-03-15T17:40:38.650-04:00 [STG/0] [OUT] Destroying container 2017-03-15T17:40:39.259-04:00 [STG/0] [OUT] Successfully destroyed container
Thanks..
Hi @Patheek1971,
How are you pushing your app? If it's a Java app, you'll need to compile it first and push it with:
cf push your-app -p /path/to/app.jar
Hi Steven, Thanks for the input. I could deploy the service fine now. I used the cf push inventory-1.0.0.-SNAPSHOT.jar command before. I read the Pivotal online document and i used. Thanks for pointing that out.
After successful deploy, I changed the code a bit to register it with service directory. So, apart from changing code, I have done the following.
After all these, I see the following error when it tries to register / query for the Eureka instance.
2017-03-16T08:38:43.196-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 12:38:43.196 INFO 14 --- [ main] com.netflix.discovery.DiscoveryClient : Registered Applications size is zero : true
2017-03-16T08:38:43.196-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 12:38:43.196 INFO 14 --- [ main] com.netflix.discovery.DiscoveryClient : Single vip registry refresh property : null
2017-03-16T08:38:43.197-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 12:38:43.196 INFO 14 --- [ main] com.netflix.discovery.DiscoveryClient : Getting all instance registry info from the eureka server
2017-03-16T08:38:43.329-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 12:38:43.328 ERROR 14 --- [ main] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution error
2017-03-16T08:38:43.330-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) ~[eureka-client-1.4.12.jar!/:1.4.12]
2017-03-16T08:38:43.330-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getApplicationsInternal(AbstractJerseyEurekaHttpClient.java:194) ~[eureka-client-1.4.12.jar!/:1.4.12]
2017-03-16T08:38:43.330-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137) [eureka-client-1.4.12.jar!/:1.4.12]
2017-03-16T08:38:43.330-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79) ~[eureka-client-1.4.12.jar!/:1.4.12]
2017-03-16T08:38:43.330-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134) [eureka-client-1.4.12.jar!/:1.4.12]
2017-03-16T08:38:43.330-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.DiscoveryClient.
Thanks a lot..
Hi Steven,
I think this works now. I can see it is registering with the Eureka now. Next test it to run my inventory service on port 8081 by using config-server which will read the external configuration file. I will update you how this goes.
Thanks
Hi Steven,
Here is one more problem where Application crashes after it is up and running for 30 seconds..
2017-03-16T09:56:30.579-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:56:30.569 INFO 20 --- [ main] habuma.InventoryServiceApplication : Started InventoryServiceApplication in 27.25 seconds (JVM running for 28.444)
// I tihnk this is where the new Eureka status update takes place ( service neds to update Eureka every 30 seconds )..
2017-03-16T09:57:00.058-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:00.051 INFO 20 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Single vip registry refresh property : null 2017-03-16T09:57:00.058-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:00.051 INFO 20 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Force full registry fetch : false 2017-03-16T09:57:00.058-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:00.051 INFO 20 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Getting all instance registry info from the eureka server 2017-03-16T09:57:00.058-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:00.051 INFO 20 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Application version is -1: false 2017-03-16T09:57:00.058-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:00.051 INFO 20 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Application is null : false 2017-03-16T09:57:00.058-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:00.051 INFO 20 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Registered Applications size is zero : true 2017-03-16T09:57:00.058-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:00.051 INFO 20 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Disable delta property : false 2017-03-16T09:57:00.226-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:00.226 INFO 20 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : The response status is 200 2017-03-16T09:57:02.322-04:00 [CELL/0] [ERR] Timed out after 1m0s: health check never passed. 2017-03-16T09:57:02.325-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:02.325 INFO 20 --- [ Thread-7] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@174d20a: startup date [Thu Mar 16 13:56:09 UTC 2017]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@1376c05c 2017-03-16T09:57:02.325-04:00 [CELL/0] [OUT] Exit status 0 2017-03-16T09:57:02.328-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:02.327 WARN 20 --- [ Thread-7] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1489672622327, current=DOWN, previous=UP] 2017-03-16T09:57:02.328-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:02.327 INFO 20 --- [ Thread-7] c.n.e.EurekaDiscoveryClientConfiguration : Unregistering application inventory with eureka with status DOWN 2017-03-16T09:57:02.328-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:02.328 INFO 20 --- [ Thread-7] com.netflix.discovery.DiscoveryClient : Shutting down DiscoveryClient ... 2017-03-16T09:57:02.328-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:02.328 INFO 20 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_INVENTORY/inventory-service.cfapps.io:17e5312b-94bf-4b70-7b74-55060c1e4ff9: registering service... 2017-03-16T09:57:02.332-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:02.331 INFO 20 --- [ Thread-7] com.netflix.discovery.DiscoveryClient : Unregistering ... 2017-03-16T09:57:02.349-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:02.349 INFO 20 --- [ Thread-7] com.netflix.discovery.DiscoveryClient : DiscoveryClient_INVENTORY/inventory-service.cfapps.io:17e5312b-94bf-4b70-7b74-55060c1e4ff9 - deregister status: 200 2017-03-16T09:57:02.349-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:02.349 INFO 20 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_INVENTORY/inventory-service.cfapps.io:17e5312b-94bf-4b70-7b74-55060c1e4ff9 - registration status: 204 2017-03-16T09:57:02.367-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:02.364 INFO 20 --- [ Thread-7] com.netflix.discovery.DiscoveryClient : Completed shut down of DiscoveryClient 2017-03-16T09:57:02.370-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:02.369 INFO 20 --- [ Thread-7] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 0 2017-03-16T09:57:02.378-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:02.378 INFO 20 --- [ Thread-7] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown 2017-03-16T09:57:02.381-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:02.381 INFO 20 --- [ Thread-7] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans 2017-03-16T09:57:02.384-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:02.383 INFO 20 --- [ Thread-7] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2017-03-16T09:57:02.384-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:02.384 INFO 20 --- [ Thread-7] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000227: Running hbm2ddl schema export 2017-03-16T09:57:02.400-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-16 13:57:02.400 INFO 20 --- [ Thread-7] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000230: Schema export complete 2017-03-16T09:57:02.515-04:00 [APP/PROC/WEB/0] [OUT] Exit status 143 2017-03-16T09:57:02.766-04:00 [CELL/0] [OUT] Destroying container 2017-03-16T09:57:02.813-04:00 [API/6] [OUT] Process has crashed with type: "web" 2017-03-16T09:57:02.827-04:00 [API/6] [OUT] App instance exited with guid f4926d1a-40c0-4610-b9e6-c14b523ecbbe payload: {"instance"=>"", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"2 error(s) occurred:\n\n 1 error(s) occurred:\n\n Exited with status 4\n 2 error(s) occurred:\n\n cancelled\n* cancelled", "crash_count"=>1, "crash_timestamp"=>1489672622532757715, "version"=>"ece7a415-43f7-41a8-b6a2-eae35c927290"} 2017-03-16T09:57:03.198-04:00 [CELL/0] [OUT] Successfully destroyed container
This happens when the Config-Server is bound to a Inventory app/service, else it works fine. Binding it to just Eureka is fine..
Any help from you is much more appreciated. Also, If my port is 8081 that it reads from the exteranl config file, Where do I see that port ? It should be in my URL when I want to access API End point of the Inventory service.
Thanks
Hi @Patheek1971,
Spring is not my expertise. I think you'll have better luck reaching out to the Spring Cloud community at this point: https://spring.io/questions https://cloud.spring.io/spring-cloud-cloudfoundry/
Thanks Steven,
I think the problem is still related to the CF. Please look at this post. ( Old Answer section - bullet point 1 )
Since my application inventory runs on port 8081, ( not a default port 8080 ), the health check fails on it. I changed the port in the external config file to 8080 from 8081 and it is working fine. So, my question is how do I make sure , my app runs on port 8081 and still pass health check from the eureka to stay up.
Thanks.
Your app must bind to $PORT
(which is usually 8080) for it to pass the healthcheck after launch.
Interesting.. Since I'm binding it to 8081, it fails the health check. Is there a way to make this configurable or set via environment ?
You have been a great help.
Thanks,
You must adjust your app to bind to that port -- it is not adjustable.
Hi Steven,
one more thing with this POC. I deployed 2 services on port 8080. Both came up and running. I see their status in service directory app console as "UP". However, when i clink on one of the service's Route info, after putting in default user name and password ( generated by spring module and printed on console ), i get this error.
This is the route : https://bookservice.cfapps.io/
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Thu Mar 16 18:57:14 UTC 2017 There was an unexpected error (type=Not Found, status=404). No message available
However, the other app works fine with no issue and show me my app URL etc.
Thanks.
Hi Steven,
Good Morning !! i can not make the config-server to work behind proxy in pcfdev. It just does not like something.. so, I tried service-registry. I added my application to have service discovery enabled and bind it to running instance of service-registry. Upon start of my service, i got some SSL error. I want to find out how do i configure my service to not error our and ignore the SSL certs etc..
Here is the snippet of the error.
2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59) [eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118) ~[eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79) ~[eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) [eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:119) [eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) [eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.DiscoveryClient.register(DiscoveryClient.java:815) [eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:104) [eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.InstanceInfoReplicator$1.run(InstanceInfoReplicator.java:88) [eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111] # 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] Caused by: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://p-spring-cloud-services.uaa.local.pcfdev.io/oauth/token": sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:633) ~[spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:588) ~[spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.security.oauth2.client.token.OAuth2AccessTokenSupport.retrieveToken(OAuth2AccessTokenSupport.java:137) ~[spring-security-oauth2-2.0.11.RELEASE.jar!/:na] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] ... 35 common frames omitted 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.http.client.SimpleBufferingClientHttpRequest.executeInternal(SimpleBufferingClientHttpRequest.java:78) ~[spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) ~[spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:619) ~[spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] ... 37 common frames omitted 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.validator.Validator.validate(Validator.java:260) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] ... 51 common frames omitted 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382) ~[na:1.8.0_111] 2017-03-23T02:47:45.146-04:00 [APP/PROC/WEB/0] [OUT] ... 57 common frames omitted 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) ~[eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59) ~[eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-23 06:47:45.150 WARN 5 --- [nfoReplicator-0] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failure 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-23 06:47:45.151 WARN 5 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_CRISISSERVICE/crisisservice.local.pcfdev.io:74ecc2d0-3f4d-4920-493f-6c0a8aeb53a4 - registration failed Cannot execute request on any known server 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:111) ~[eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) ~[eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.DiscoveryClient.register(DiscoveryClient.java:815) ~[eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:104) [eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.InstanceInfoReplicator$1.run(InstanceInfoReplicator.java:88) [eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_111] 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_111] 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_111] 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_111] 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_111] 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_111] 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111] 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-23 06:47:45.151 WARN 5 --- [nfoReplicator-0] c.n.discovery.InstanceInfoReplicator : There was a problem with the instance info replicator 2017-03-23T02:47:45.151-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:104) ~[eureka-client-1.4.12.jar!/:1.4.12] 2017-03-23T02:47:45.318-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-23 06:47:45.318 INFO 5 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
Thanks
PCF Dev should trust its own router certificate. If it's a Java buildpack app that's failing, you may need to set JBP_CONFIG_CONTAINER_CERTIFICATE_TRUST_STORE
to {enabled: true}
.
@mdelillo any thoughts on this?
Thanks Stephen.
After setting the JBP_CONFIG_CONTAINER_CERTIFICATE_TRUST_STORE to "true" as an the environment variable,
i got the following connection problem.
2017-03-24T09:23:37.198-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-24 13:23:37.198 INFO 5 --- [ main] c.n.e.EurekaDiscoveryClientConfiguration : Registering application CrisisService with eureka with status UP 2017-03-24T09:23:37.207-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-24 13:23:37.206 INFO 5 --- [ main] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1490361817206, current=UP, previous=STARTING] 2017-03-24T09:23:37.208-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-24 13:23:37.208 INFO 5 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_CRISISSERVICE/crisisservice.local.pcfdev.io:9e8a4ffd-af5a-4a6a-5758-df2047ed6343: registering service... 2017-03-24T09:23:37.217-04:00 [APP/PROC/WEB/0] [OUT] at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) ~[eureka-client-1.4.12.jar!/:1.4.12] 2017-03-24T09:23:37.217-04:00 [APP/PROC/WEB/0] [OUT] at com.sun.jersey.api.client.Client.handle(Client.java:652) ~[jersey-client-1.19.1.jar!/:1.19.1] 2017-03-24T09:23:37.217-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-24 13:23:37.216 ERROR 5 --- [nfoReplicator-0] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution error 2017-03-24T09:23:37.217-04:00 [APP/PROC/WEB/0] [OUT] com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused (Connection refused) 2017-03-24T09:23:37.217-04:00 [APP/PROC/WEB/0] [OUT] at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187) ~[jersey-apache-client4-1.19.1.jar!/:1.19.1]
Thanks, Patheek
Hi Stephen,
It registers with Eureka now.. I added TRUST_CERTS = api.local.pcfdev.io.. Only problem remains is to make the config server to work behind the corporate proxy. That seem to fail consistently.
Thanks, Patheek
Hi Stephen,
Good morning !! Any pointers as to how to make the PCFDev config server to talk to git repository when the PCFDev is behind the corporate proxy. It seems this is the only problem remains to be resolved.
Thanks, Patheek
To clarify, you're following these instructions: https://docs.pivotal.io/pcf-dev/proxy.html And then starting PCF Dev with:
cf dev start -s scs
Correct?
Hi Stephen,
Yes. i did set the proxy and started the pcfdev. i used "cf dev start -s all" command to start.
I see 2 different error types: When i pass http proxy information to config server :
"git": {
"uri": "https://github.com/Patheek1971/config.git",
"username": "UserName",
"password": "GitPassword",
"cloneOnStart": "true",
"proxy": {
"http": {
"host": "naproxy.org.com",
"port": "80",
"username": "user1",
"password": "password1"
}
}
}
}
I see this error in the log:
2017-03-24T16:39:25.204-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-24 20:39:25.203 INFO 5 --- [ main] i.p.s.config.GitProxyConfiguration : Setting default Authenticator for Git proxy 2017-03-24T16:39:26.769-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-24 20:39:26.767 WARN 5 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'environmentRepository' defined in class path resource [org/springframework/cloud/config/server/config/EnvironmentRepositoryConfiguration$GitRepositoryConfiguration.class]: Invocation of init method failed; nested exception is org.eclipse.jgit.api.errors.TransportException: https://github.com/Patheek1971/config.git: cannot open git-upload-pack
When I have http and https proxies set in the config-server settings:
"git": {
"uri": "https://github.com/Patheek1971/config.git",
"username": "UserName",
"password": "GitPassword",
"cloneOnStart": "true",
"proxy": {
"http": {
"host": "naproxy.org.com",
"port": "80",
"username": "user1",
"password": "password1"
},
"https": {
"host": "naproxy.org.com",
"port": "80",
"username": "user1",
"password": "password1"
}
}
}
}
I get the following error.
2017-03-24T17:06:40.887-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-24 21:06:40.885 INFO 6 --- [ main] i.p.s.config.GitProxyConfiguration : Setting default Authenticator for Git proxy 2017-03-24T17:06:44.567-04:00 [APP/PROC/WEB/0] [OUT] 2017-03-24 21:06:44.562 WARN 6 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tokenServices' defined in class path resource [io/pivotal/springcloud/security/oauth2/jwt/MultipleIssuerJwtTokenServicesConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.ResourceServerTokenServices]: Factory method 'tokenServices' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'multipleIssuerJwtAccessTokenConverter' defined in class path resource [io/pivotal/springcloud/security/oauth2/jwt/MultipleIssuerJwtTokenServicesConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://p-spring-cloud-services.uaa.local.pcfdev.io/token_key": Remote host closed connection during handshake; nested exception is javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
Anything you suggest, i can try to get this working.
Thanks, Patheek
Maybe @mdelillo has an idea.
@mdelillo, Stephen,
Any help / pointers on this is appreciated.
Thanks, Patheek
Neither of us are familiar enough with Spring Cloud to address this. Please reach out to the Spring Cloud community for Spring-related questions: https://spring.io/questions https://cloud.spring.io/spring-cloud-cloudfoundry/
Envrionment: windows 7 PCFDEV
PS C:\users\WZGVNB\Downloads> cf plugins Listing Installed Plugins... OK
Plugin Name Version Command Name Command Help pcfdev 0.23.0 dev, pcfdev Control PCF Dev VMs running on your workstation
I tried running the config-server behind the corporate proxy by providing the following public git repository and proxy credential. { "git": { "uri": "https://github.com/Patheek1971/config.git", "proxy": { "http": { "host": "http://naproxy.myorg.com", "port": "80" } } } }
The server starts successfully but on the console page ( manage ), it shows the following error. The Config Server cannot initialize using the configuration that has been provided. Please double-check the configuration and correct any mistakes.
wanted to find out few things.
Please help in order for me to deliver POC using PCF DEV to consider our migration to PCF as PaaS for our spring services.