Spring-boot: Only one connection receive subscriber allowed

Created on 19 Sep 2018  路  5Comments  路  Source: spring-projects/spring-boot

The problem is related to: #https://github.com/spring-cloud/spring-cloud-gateway/issues/541

occurs only with springBootVersion = '2.0.5.RELEASE'
with 2.0.4.RELEASE and lower works fine.
webflux is included by means of starter: 'org.springframework.boot:spring-boot-starter-webflux'

Sample controller:

@RestController
@RequestMapping("/path/{param1}/path2")
public class MyController {

    @PostMapping(value = "/path3")
    String onUploadSuccess(@PathVariable("param1") long param, @RequestBody MultiValueMap<String,String> body) {
        return "OK. param=" + param + " body=" + body;
    }

}

Post request with payload such as:

key=f9a922bd-3007-4393-a76e-925fc009639c.txt&uuid=f9a922bd-3007-4393-a76e-925fc009639c&name=rubycsv.txt&bucket=fineuploadertest&etag=123

Response:
{"timestamp":"2018-09-19T06:45:02.595+0000","path":"/path/123/path2/path3","status":500,"error":"Internal Server Error","message":"Only one connection receive subscriber allowed."}

stacktrace.txt

external-project invalid

Most helpful comment

Maybe downgrade reactor?

All 5 comments

Sorry, but I don't think this has anything to do with Boot itself. It's most likely due to a change in Reactor Netty. The existing Spring Cloud issue, which @violetagg is already aware of, is sufficient for now. Spreading the issue over multiple repositories just risks wasting people's time. Once the underlying cause has been identified, we can either re-open this or open a Reactor Netty issue as required.

Maybe downgrade reactor?

@wilkinsona Can you help us and create issue in Reactor Netty project? Maybe you can explain them details?

No, sorry. I'm not sufficiently familiar with how Spring Cloud Gateway uses WebFlux and Reactor Netty. If you are able to reproduce the problem, you could using Spring Boot 2.0.5 and override the version of Spring Framework or Reactor Netty to the version used by Spring Boot 2.0.4, see when the problem occurs, and share you findings on the existing Gateway issue. That should help to identify the change that caused the problem to occur.

@wilkinsona got it, pardon!

Was this page helpful?
0 / 5 - 0 ratings