Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 04:32
    codecov[bot] commented #2037
  • 04:27
    codecov[bot] commented #2037
  • 04:27
    codecov[bot] commented #2037
  • 04:27
    codecov[bot] commented #2037
  • 04:27
    codecov[bot] commented #2037
  • 04:07
    pivotal-cla commented #2037
  • 04:06
    pivotal-cla commented #2037
  • 04:06
    sean-che opened #2037
  • Jan 21 21:20
    jonatan-ivanov closed #2101
  • Jan 21 21:20

    jonatan-ivanov on 3.1.x

    auto-formatting Upgrade Brave to 5.13.7 fixes g… (compare)

  • Jan 21 21:18
    jonatan-ivanov edited #2101
  • Jan 21 21:14
    jonatan-ivanov milestoned #2101
  • Jan 21 21:14
    jonatan-ivanov labeled #2101
  • Jan 21 21:14
    jonatan-ivanov opened #2101
  • Jan 21 19:09
    avnerstr commented #1721
  • Jan 21 17:37

    spencergibb on main

    temporarily removes contract an… (compare)

  • Jan 21 13:49
    shadabbahadara commented #1324
  • Jan 21 13:49
    shadabbahadara commented #1324
  • Jan 21 09:10

    spring-builds on main

    Bumping versions (compare)

  • Jan 21 06:50
    chenjinkai synchronize #764
Kanai
@kanai0618
Hello Team, How can i get the post body of a route in a pre filter ? currently routes are configured in application yml
Kanai
@kanai0618
Hi can you help with the above query
khalilsleimi
@khalilsleimi
Hi guys, I need your help. I have problems with running Spring Cloud Gateway: https://stackoverflow.com/questions/69313037/spring-cloud-gateway-guide-from-pivotal-not-working-well
khalilsleimi
@khalilsleimi
Just needed to use Spring Cloud 2020.0.3 Instead of Spring Cloud 2020.0.4
Roman S.A.
@eaxdev
Hello evryone! I try use spring cloud config server and vault. I wrote my question here: https://stackoverflow.com/questions/69347177/spring-cloud-config-resolve-secret-propertiers-via-vault-and-git. Any help, plz
Željko Tomić
@ztomic

Hi,

I have issue with custom health indicators / health contributors in application.
I'm using Spring Boot 2.5.5, Spring Cloud 2020.0.4 and Netflix Eureka for service registry/discovery.

If my HealthIndicator returns status DOWN/OUT_OF_SERVICE, then also 'eureka' health check in 'discoveryComposite' is DOWN/OUT_OF_SERVICE and service instance is not visible to other services, but if I implement it as CompositeHealthContributor and it also has status DOWN/OUT_OF_SERVICE, 'eureka' health has status 'UP' and service is visible to other services.

Is this expected behaviour?

1 reply
mrraghavendra
@mrraghavendra
Hi, i am running an issue after upgrade to springboot version 2.4.5 and spring cloud 2020.0.3. I am not able to register service to eureka. In eureka it is showing status as UNKNOWN(1). can anyone help me here
Greg Adams
@gadams00
per https://docs.spring.io/spring-cloud-netflix/docs/3.0.4/reference/html/#using-eureka-on-aws, I’m customizing EurekaInstanceConfigBean using eureka-client's AmazonInfo, but I’m getting an error, and I think it’s due to spring-cloud-netflix excluding archaius
2 replies
Marcin Grzejszczak
@marcingrzejszczak
Please do not cross post. I've seen your question on stackoverflow and commented on it
1 reply
mk
@mk:rwx.im
[m]

Hi, how come my tests fail when I use org.springframework.cloud:spring-cloud-starter-kubernetes-client and org.springframework.cloud:spring-cloud-starter-consul-discovery despite me having spring.cloud.{kubernetes,consul}.enabled=false?
If it's just consul discovery and spring.cloud.consul.enabled=false it works.

The error:

AccountServiceTest > lock_whenUserRequestLock_userShouldBeMarkedAsLocked() FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException at ConstructorResolver.java:800
            Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException at DefaultListableBeanFactory.java:1790
ah, it works if I only disable discovery with spring.cloud.kubernetes.discovery.enabled=false
Josh Fix
@joshfix
i’m a bit confused as to which modules/strategy to use for spring cloud stream + sqs. It seems stream now uses functions, which is awesome. However, it seems there are new/different aws dependencies: io.awspring.cloud:spring-cloud-starter-aws-messaging and de.idealo.spring:spring-cloud-stream-binder-sqs, but these don’t seem to have documentation supporting the spring cloud function capabilities. do these packages all work in harmony?
mk
@mk:rwx.im
[m]
How come when I use ${spring.cloud.client.hostname} it's the ip address of the network interface and not the local hostname?
Pietro Galassi
@pietrogalassi
Hi all, is it possible to inject ThreadContextKeys into OpenFeign logs ?
Ved Singh
@vedgunjan

Greetings All,
I'm in the process of migrating to SpringBoot 2.5.6 and also to spring-cloud-starter-loadbalancer. I'm not using the Eureka service registry in my system but instead configuring a list of servers in our external configuration.

Versions

springBootVersion=2.5.6
springCloudVersion=2020.0.4

Dependencies

implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
implementation 'org.springframework.cloud:spring-cloud-starter-loadbalancer'

Configuration

productservice:
ribbon:
listOfServers: https://product.service.mycompany.com

Log

RoundRobinLoadBalancer : No servers available for service: productservice
FeignBlockingLoadBalancerClient : Load balancer does not contain an instance for the service productservice

What I understand from the logs is that the problem here is with the creation of a client-side load balancer which is needed for the FeignClient to work.

Can someone here help me with the config that will be needed in the case where you are not using the Eureka service registry?

Ved Singh
@vedgunjan
prasadpr1
@prasadpr1
Hi Team
Any spring devs available for support

Hi Team,

I am facing issue with springencoder in the new version of open feing. It used work fine with earlier versions of spring cloud.
When I debuuged the code, I found this additional code has been added in the new version of SpringEncoder

if (Objects.equals(requestContentType, MediaType.MULTIPART_FORM_DATA)) {
this.springFormEncoder.encode(requestBody, bodyType, request);
return;
}
Earlier my code was using AllEncompassingFormHttpMessageConverter(SpringCloud 2.2.1) when i submitted multivalue map(MULTIFORM_DATA) but now it breaks with new version.

Nickolas Heckman
@nrheckman

I'm working on implementing some new stream processors (PubSub binder) and using spring-boot 2.5.6, with spring-cloud 2020.0.4.
We collect traces with zipkin and I'm noticing that the applications I have built with these latest versions are not getting b3 message attributes attached, so the traceId isn't propagated through like it does with our previously created applications based on spring-boot 2.3.6 and spring-cloud Horsham.SR10.
My "guess" is that I'm missing a dependency that is necessary to get this all wired together that wasn't needed two releases ago? I have the following explicit spring dependencies:

  implementation 'org.springframework.boot:spring-boot-starter-actuator'
  implementation 'org.springframework.boot:spring-boot-starter-data-redis-reactive'
  implementation 'org.springframework.cloud:spring-cloud-sleuth-zipkin'
  implementation 'org.springframework.cloud:spring-cloud-starter-sleuth'
  implementation 'org.springframework.cloud:spring-cloud-stream'
  implementation 'com.google.cloud:spring-cloud-gcp-pubsub-stream-binder'

I'm sure it's documented somewhere, but I'm not finding it. Could I get a pointer in the right direction?

3 replies
Pietro Galassi
@pietrogalassi
Hi all, does Feign always calls same endpoint on failed calls (retry) even if there are multiple pods (openshift) ?
Misagh Moayyed
@mmoayyed

Hello room! In Cloud Config 3.1 RC1, has anything changed that would affect property-source loading, bootstrap context and the like? I am seeing a scenario where bootstrap environment and context is initialized from property sources, but actual application context/environment is not post-processed. It's as if the event listener that does the post processing of the environment never kicks into action for the application context/environment.

I see the two Environemnts created, and the Bootstrap environment is post-processed via the appropriat listener, but it seems like it gets in the way of the actual (servlet) application context. Beans are then created using the Bootstrap context property sources and none of the property sources that are profile-based are not actually read at the right time. They are read later, once after the context has initialized and beans are created, which is too late.

I am running this with Spring Boot 2.6 RC1 and Spring Cloud 3.1 RC1.

Marc Guilera
@marcguilera
hello, we found that spring cloud is now trying to load a bunch of configmaps that it didn't before. the change is spring-cloud/spring-cloud-kubernetes#583 (cc @wind57)
it is debatible if this should be the default behaviour but in any case i'd like to disable it in my project. supposedly it should be as easy as to disableincludeProfileSpecificSources but i wasn't able to properly disable it. here's my bootstrap: https://gist.github.com/marcguilera/b73e2b0d9b5367ac1da7c0e10a7e2f4b
Pedro Silva
@jp-silva
Hello. I'm trying to add etag header to some of the responses that go through spring cloud gateway. I get it that this is not a spring cloud feature (that we do have in spring mvc ShallowEtagHeaderFilter). But it isn't because you don't think it is the right to place to add the header, or it just doesn't exist and it can be implemented as a filter in the gateway? Thanks
Nikita Guchakov
@nguchakov
Hi! What is the right way to implement custom remote property source that supports refresh scope? I tried to check kubernetes and consul implementation, but I didn't get something. I have Bootstrap Configuration with property source locator and the config poller that checks for the remote updates at Autoconfiguration. After any update, it triggers refresh(). However, how can I share new config properties with Properties Source Locator? The behavior is PropertySourceLocator recreates on context refresh. I tried to share some data holder as separate bean, but it seems to be created in bootstrap and main contexts as two separate beans. Kuberenetes client itself goes for the properties twice. Once on polling to check for update and then on property source locator locate() after refresh call.
Petr Vlček
@petrvlcek

Hi, everyone. I'd like to ask for an advice regarding Spring Cloud Consul service discovery and Kubernetes. We are running containers with Spring Boot in AWS EKS. We have an issue with correctly unregistering the instance from Consul when a pod with running container is being deleted. Once the application receives SIGTERM it is given 30 seconds period to shut down gracefully. My observation from logs is that the application tries to unregister from Consul right after receiving the signal, but is unable to make a new connection to Consul even when it still has plenty of time to shut down.

2021-11-30 21:28:51.374  WARN [printer,,,] 1 --- [extShutdownHook] .s.c.a.CommonAnnotationBeanPostProcessor : Destroy method on bean with name 'consulAutoServiceRegistration' threw an exception: com.ecwid.consul.transport.TransportException: org.apache.http.NoHttpResponseException: consul-server.consul.svc.cluster.local:8500 failed to respond

Did you run into similar issue before? I would welcome any advice.

3 replies
Harish
@harishanchu

Hello everyone, I'm facing an issue with HTTP source app in a spring cloud data flow stream.

org.springframework.core.io.buffer.DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144
    at org.springframework.core.io.buffer.LimitedDataBufferList.raiseLimitException(LimitedDataBufferList.java:98) ~[spring-core-5.3.10.jar:5.3.10]
    Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Error has been observed at the following site(s):
    |_ checkpoint ? org.springframework.security.web.server.authorization.AuthorizationWebFilter [DefaultWebFilterChain]
    |_ checkpoint ? org.springframework.security.web.server.authorization.ExceptionTranslationWebFilter [DefaultWebFilterChain]
    |_ checkpoint ? org.springframework.security.web.server.authentication.logout.LogoutWebFilter [DefaultWebFilterChain]
    |_ checkpoint ? org.springframework.security.web.server.savedrequest.ServerRequestCacheWebFilter [DefaultWebFilterChain]
    |_ checkpoint ? org.springframework.security.web.server.context.SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
    |_ checkpoint ? org.springframework.security.web.server.context.ReactorContextWebFilter [DefaultWebFilterChain]
    |_ checkpoint ? org.springframework.security.web.server.header.HttpHeaderWriterWebFilter [DefaultWebFilterChain]
    |_ checkpoint ? org.springframework.security.config.web.server.ServerHttpSecurity$ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
    |_ checkpoint ? org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
    |_ checkpoint ? org.springframework.cloud.sleuth.instrument.web.TraceWebFilter [DefaultWebFilterChain]
    |_ checkpoint ? org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilterChain]
    |_ checkpoint ? HTTP POST "/" [ExceptionHandlingWebHandler]

This happens when I try to post a HTTP request with huge body size to the HTTP end point.

I have tried setting following property in the deployment which didn't help me:

app.http.spring.codec.max-in-memory-size: 10MB

spring cloud starter http kafka source app version used is 3.1.1

Do anyone have a clue about how to fix this?

Jim Judd
@jjudd08_gitlab
Hey folks, I'm trying to get spring-cloud-config-server to connect to a private bitbucket repo using ssl. I've tried a bunch of stuff but I keep getting the same error: JSchException: failed to send channel request. I'm using an RSA cert, I've tried different java versions, and generated the keys in different OSs, and ran the service from Intellij and a docker ubuntu container. I'm at a loss, what have I missed?
Nuno Marujo
@nhmarujo
Hi. Can you please clarify what is the spring-cloud-dependencies compatibility for SB2.6.x? The compatibility table on https://spring.io/projects/spring-cloud still doesn’t refer SB2.6.x:
image.png
Marcin Grzejszczak
@marcingrzejszczak
please check the website again
Allsimon
@Allsimon

hello,
I'm wondering how to expand values in Spring Cloud Config server with vault:

For example, if I add this configuration:

env_name: "test-sandbox3"

redis:
  host: "{vault}:applications/{env_name}#redis_host"

it will throw Cannot resolve key: redis.host (class java.lang.IllegalArgumentException: Not enough variable values available to expand 'env_name')

Is it possible to force the config server to evaluate the vault path first ?

Ferlorin
@Ferlorin
hi everyone, im trying to fix the cloud config server the last 10 hours without success
  cloud:
    config:
      server:
        git:
          uri: ssh://cloud-user@10.0.0.195/git/config-server
          ignore-local-ssh-settings: true
          clone-on-start: true
          private-key: | (it is correct)
and I am getting
Caused by: com.jcraft.jsch.JSchException: failed to send channel request
    at com.jcraft.jsch.Request.write(Request.java:65) ~[jsch-0.1.55.jar:na]
    at com.jcraft.jsch.RequestEnv.request(RequestEnv.java:52) ~[jsch-0.1.55.jar:na]
    at com.jcraft.jsch.ChannelSession.sendRequests(ChannelSession.java:222) ~[jsch-0.1.55.jar:na]
    at com.jcraft.jsch.ChannelExec.start(ChannelExec.java:41) ~[jsch-0.1.55.jar:na]
    at com.jcraft.jsch.Channel.connect(Channel.java:152) ~[jsch-0.1.55.jar:na]
    at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:159) ~[org.eclipse.jgit.ssh.jsch-5.12.0.202106070339-r.jar:5.12.0.202106070339-r]
Alexey Anufriev
@alexey-anufriev

hello,

in cloud-gateway I have a couple of routes defined, but would like to configure rate limited individually for different paths within one route

for example I have

routes:
  - id: user
    uri: http://localhost:8100/user
    predicates:
      - Path=/user/**
  - id: management
    uri: http://localhost:8110/management
    predicates:
      - Path=/management/**

but I want to configure different rate limits for /management/users and /management/permissions

the problem I have is that I need to duplicate uri for each of the paths.

is it possible to override only filter for a child sub-path but keep the rest of the config as is?

srinivas.kool
@srinivaskool

Hello everyone, I need your help pls

Jar working on EC2 but not on Lambda
On Lambda :-
13:50:33.867 [main] ERROR org.springframework.cloud.stream.binding.BindingService - Failed to create consumer binding; retrying in 30 seconds
13:50:33.867 [main] ERROR org.springframework.cloud.stream.binding.BindingService - Failed to create producer binding; retrying in 30 seconds
Operation is a varaiable which the kafka message has but its going as NULL to lambda but same message going to EC2 instance corrrectly.

On EC2 :-
the jar is working perfectly.

Mode of deployment: CloudFormation
I have a doubt Is this issue because of maven-shaded plugin
Actual plugin :-

    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <version>${version.spring.boot}</version>
    <configuration>
        <jvmArguments>
            -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=${debug.suspend},address=${debug.port}
        </jvmArguments>
        <arguments>
            <argument>
                --spring.config.additional-location=${user.home}/etc/${project.groupId}/${project.artifactId}/conf/application.yml
            </argument>
       </arguments>
        <layout>JAR</layout>
    </configuration>
    <executions>
        <execution>
            <id>repackage</id>
            <goals>
                <goal>repackage</goal>
            </goals>
            <configuration>
                <mainClass>XXXXXXX</mainClass>
                <layout>JAR</layout>
            </configuration>
        </execution>
    </executions>
</plugin>

I changed it to (for AWS LAMBDA Deployment)
Note:- Even after changing It was working on EC2

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>3.2.4</version>
    <configuration>
        <createDependencyReducedPom>false</createDependencyReducedPom>
        <shadedArtifactAttached>true</shadedArtifactAttached>
        <shadedClassifierName>aws</shadedClassifierName>
    </configuration>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>2.4.1</version>
        </dependency>
    </dependencies>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>shade</goal>
            </goals>

            <configuration>
                <filters>
                    <filter>
                        <artifact>*:*</artifact>
                        <excludes>
                            <exclude>**/Log4j2Plugins.dat</exclude>
                        </excludes>
                    </filter>
                </filters>
                <transformers>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                        <resource>META-INF/spring.handlers</resource>
                    </transformer>
                    <transformer implementation="org.springframework.boot.maven.PropertiesMergingResourceTransformer">
                        <resource>META-INF/spring.factories</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                        <resource>META-INF/spring.schemas</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                        <mainClass>XXXXX</mainClass>
                    </transformer>
                </transformers>
            </configuration>
        </execution>
    </executions>
</plugin>
1 reply
Eyal Ringort
@eyalrin
Hi, I have an application working in an all reactive manner. Can I use Spring Cloud AWS to consume messages from SQS reactively/asynchronously? If so, how do I force the receiver/listener to be reactive/async?
Attoumane
@akuma8
Hi there,
Using Spring Cloud Gateway, I am trying to add a simple GatewayFilter which should add extra parameters to the request body and extra headers before forwarding the request. The request content type is application/x-www-form-urlencoded.
I have not yet familiarized myself with WebFlux and I was really surprised to see how difficult it is to achieve that simple requirement .
Looking at some example codes, it seems like accessing the request body and modify it required lot of ceremonies.
I would like to know if there are some utility classes which can help to achieve that simple task.
Thanks a lot and maybe it's time to me to learn project reactor.
5 replies
mishranishant4
@mishranishant4

Hi there,
I am trying to work on a cache-control requirement and want my resources to be cached on the browser.
My parent application is a Zuul app and it uses spring security, i set the cache control on this app using resourceHandler in WebMvcConfigurer and this worked fine for all the resources. Also set ignore-security-headers to false on zuul.
Now this app loads another app(child app from another url) in an iframe (angular component), which in-turn uses spring security but its NOT a zuul app. Here also I used resourceHandler to configure cache control params and child app is intended to be accessible from parent app iframe only.
Now, unfortunately, cache control is not working properly for the resources of child app. I checked the response headers in chroma and found that now I get two cache control in response.
1) cache-control: no-cache
2) cache-control: (intended) I set in child app WebMvcConfigurer.

This works perfectly fine if I directly access my child app.
Not able to figure out how the no-cache got added in response headers. Whether its an iframe, parent zuul component or spring cloud added default caching.
I tried to disable the cache control for spring security from HTTPSecurity but still facing the same issue.

Looks like I am missing some basics here. I would like to know what I can check further.
Thanks a lot.

Guy Guidona
@Guidona
Hello all, I'm having some awkward but serious issues with my app these days
Okay, here's the issue. I have an app following the classic spring-cloud architecture with an oauth2 server, a main micro service and to that a service discovery server (eureka). The app was working fine.
But all of a sudden it started sending internal server errors with code 500 and nothing else. When I mean nothing I mean nothing in the logs. No other error. In the Kubernetes service logs, only the internal server error sent to the front can be seen in the network console of the browser.
Roc Chiu
@PC-Chiu
Hello everyone, I need your help!
How can I use ‘Hints’ based Spring Cloud LoadBalancer in Spring Cloud Gateway project?
Roc Chiu
@PC-Chiu
Why 'Spring Cloud LoadBalancer’ LoadBalancerClientConfiguration dose not build ‘HintBasedServiceInstanceListSupplier’ like 'zone-preference’, 'health-check' with property?
Mahi
@Mahesh___Mahi_twitter
Team any reference for spring cloud gateway integration with spring security + JWT
1 reply
Ivan Vercinsky
@ivercinsky

Hi Everybody!

@Bean
    public Function<Flux<Message<OfferIncomingEvent>>, Flux<Message<OfferOutgoingEvent>>> offerValidatorAutomatic() {
        return this::validateOfferAutomatic;
    }

I have that Function which is procesing events from one kafka topic to another. My question is the following:

Is there a way to set up the binding between this two topics so that spring would forward the ALL the headers automatically?

Because if i remove the Message<?> type of the Flux parameter the headers from the input topic doesnt get forwarded.
Also, in the current setting i have to manually added them when building the outgoin message.

Thank you for your attention!

srinivas.kool
@srinivaskool
Hi there,
I have a spring cloud function deployed on AWS. It has a trigger of MSK (AWS). How can I add a destination of MSK or Kafka for the lambda function? Basically, I want to publish a Kafka msg as output.
learningdeveloper2021
@learningdeveloper2021

Approaches to handle 10 million records of 10 tables each with several joins

I have 10 million records of 10 tables each with several joins. I am looking for the best alternative or DB assign or approach to read the records very quickly that is the query should be fast.

option#1 - normalize the tables, don't go for joins unnecessarily
option#2 - add all the columns in 1st query where multiple times the
where conditions will be used in the looping construct
option#3 - go for nosql database instead of mysql

Please advise

Thanks