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

3rd
Sep 2018
Miroslav Matejovsky
@bassmake
Sep 03 2018 12:41
hi, is spring-cloud-gateway-mvc module still relevant? Shouldn't it be removed entirely?
Marcos Barbero
@marcosbarbero
Sep 03 2018 13:31
Why thou? There are people still doing MVC implementation out there
Miroslav Matejovsky
@bassmake
Sep 03 2018 13:45
but in 2.x documentation it is written: Spring Cloud Gateway requires the Netty runtime provided by Spring Boot and Spring Webflux. It does not work in a traditional Servlet Container or built as a WAR. http://cloud.spring.io/spring-cloud-gateway/single/spring-cloud-gateway.html#gateway-starter
Batuhan Apaydın
@developer-guy
Sep 03 2018 14:42
Hi everyone, i have a question about deploying spring boot app to cloud foundry
i am using eureka client in my app and i have already bind a p-eureka-registry service to my app on cloud foundry
i am using these dependencies
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Dalston.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.pivotal.spring.cloud</groupId>
<artifactId>spring-cloud-services-dependencies</artifactId>
<version>1.4.1.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
and also
    <dependency>
        <groupId>io.pivotal.spring.cloud</groupId>
        <artifactId>spring-cloud-services-starter-service-registry</artifactId>
    </dependency>
and i marked my application with @EnableDiscoveryClient
but my application never register to eureka server and my application don't start logs say exit with status code 137
is there anybody has opinion for this situation ?
Corneil du Plessis
@corneil
Sep 03 2018 15:09
@developer-guy how are you telling your application about eureka server?
@developer-guy sorry I missed that you said you were using cloudfoundry
@developer-guy cf logs <app> --recent to get some more info?
Corneil du Plessis
@corneil
Sep 03 2018 15:14
@developer-guy I recently presented a workshop on this and I always bound the registry to the application. You can add:
  services:
    - <registry-service-name>
to manifest.yml
Batuhan Apaydın
@developer-guy
Sep 03 2018 15:16
yes i have already added that

applications:
- name: motto-file-service
  instances: 1
  memory: 768M
  buildpack: java_buildpack
  env:
    JAVA_OPTS: -Djava.security.egd=file:/dev/./urandom
    SPRING_PROFILES_ACTIVE: cloud
  services:
    - s3-service
    - motto-file-db
    - eureka-server
Corneil du Plessis
@corneil
Sep 03 2018 15:19
Then you will have to dig into the logs to get some detail.
Batuhan Apaydın
@developer-guy
Sep 03 2018 15:19
i am restarting app and i publish the detail of logs in second please wait
do you have some examples about registering eureka serivce on cloud foundry ?
Corneil du Plessis
@corneil
Sep 03 2018 15:22
@developer-guy This repo has some samples: https://github.com/corneil/cf-demo
complete is an app that will generate events when invoked. loader will invoke events using OpenFeign client that connects via p-service-registry
Batuhan Apaydın
@developer-guy
Sep 03 2018 15:25
thank you @corneil

now i am getting this error :

2018-09-03T18:24:33.630+03:00 [HEALTH/0] [ERR] Failed to make TCP connection to port 8080: connection refused
2018-09-03T18:24:33.630+03:00 [CELL/0] [ERR] Timed out after 1m0s: health check never passed.

Corneil du Plessis
@corneil
Sep 03 2018 15:26
@developer-guy use web console to check the health of you registry service
Batuhan Apaydın
@developer-guy
Sep 03 2018 15:26
ok
and also i define some properties on my yml file
eureka:
client:
serviceUrl:
defaultZone: ${vcap.services.eureka-server.credentials.uri}/eureka/
instance:
hostname: ${vcap.application.uris[0]}
non-secure-port: 80
Corneil du Plessis
@corneil
Sep 03 2018 15:29
@developer-guy I didn't have any of those. Check the steps in README.md
Batuhan Apaydın
@developer-guy
Sep 03 2018 15:54
why am i getting this erro , 2018-09-03T18:54:33.152+03:00 [HEALTH/0] [ERR] Failed to make TCP connection to port 8080: connection refused
2018-09-03T18:54:33.152+03:00 [CELL/0] [ERR] Timed out after 1m0s: health check never passed.
2018-09-03T18:54:33.152+03:00 [HEALTH/0] [ERR] Failed to make TCP connection to port 8080: connection refused
2018-09-03T18:54:33.152+03:00 [CELL/0] [ERR] Timed out after 1m0s: health check never passed.
Batuhan Apaydın
@developer-guy
Sep 03 2018 16:00
voaaaav
i undertstand this situation
there is -t option when using cf push
-t Time (in seconds) allowed to elapse between starting up an app and the first healthy response from the app
my application start up takes more than 15seconds so application health check failed because of that
:)