You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "SURYAS1306 (via GitHub)" <gi...@apache.org> on 2026/01/29 21:53:10 UTC
[PR] Fix HTTP/3 server startup when REST runs in servlet mode [dubbo]
SURYAS1306 opened a new pull request, #16060:
URL: https://github.com/apache/dubbo/pull/16060
## What is the purpose of the change?
When Dubbo REST is configured to run in `server=servlet` mode, the servlet
container (such as Tomcat or Jetty) is responsible for managing the server
lifecycle and port binding.
However, `Http3Exchanger.bind(URL)` still attempted to start an internal
Netty HTTP/3 server in this mode. This can lead to port conflicts and
unexpected behavior because two servers attempt to bind to the same port.
This PR fixes the incorrect server startup behavior in REST servlet mode.
Fixes #15273
---
## What is changed?
### 1. Prevent HTTP/3 server startup in REST servlet mode
A small guard is added in `Http3Exchanger.bind(URL)` to detect REST servlet
deployments:
- If the protocol is `rest`
- And the URL parameter `server=servlet` is present
- Skip HTTP/3 server initialization
This ensures that the servlet container remains the sole owner of the
server lifecycle and port binding.
### 2. Introduce a helper method for clarity
A dedicated helper method is added to encapsulate the REST servlet mode
check, improving readability and future maintainability.
---
## Why is this needed?
Dubbo REST deployments running in servlet mode rely on the container to
manage networking resources. Starting an additional Netty HTTP/3 server
in this scenario can cause:
- Port binding conflicts
- Unclear server ownership
- Unexpected startup failures
Without this fix, REST servlet users enabling HTTP/3 may encounter runtime
errors that are difficult to diagnose.
This change aligns HTTP/3 behavior with Dubbo’s existing REST servlet
architecture.
---
## Verifying this change
- Code formatting verified with `mvn spotless:apply`
- Module build passed locally:
```bash
mvn -pl dubbo-rpc/dubbo-rpc-triple -am -DskipTests clean install
```
---
## Checklist
- [x] Make sure there is a GitHub issue field for the change.
- [x] Write a pull request description that is detailed enough...
- [ ] Write necessary unit-test...
- [x] Make sure github actions can pass.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Fix HTTP/3 server startup when REST runs in servlet mode [dubbo]
Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw commented on PR #16060:
URL: https://github.com/apache/dubbo/pull/16060#issuecomment-3821722650
the pr has nothing to do with https://github.com/apache/dubbo/issues/15273
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Fix HTTP/3 server startup when REST runs in servlet mode [dubbo]
Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw closed pull request #16060: Fix HTTP/3 server startup when REST runs in servlet mode
URL: https://github.com/apache/dubbo/pull/16060
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Fix HTTP/3 server startup when REST runs in servlet mode [dubbo]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #16060:
URL: https://github.com/apache/dubbo/pull/16060#issuecomment-3820720585
## [Codecov](https://app.codecov.io/gh/apache/dubbo/pull/16060?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `0%` with `7 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 37.01%. Comparing base ([`f5d6436`](https://app.codecov.io/gh/apache/dubbo/commit/f5d6436fae851c577fcf2eb1aaab543e92acf9b4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`3d7260a`](https://app.codecov.io/gh/apache/dubbo/commit/3d7260a4f9bb739e28bc4018ec7888f8c50fcb28?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/dubbo/pull/16060?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...rotocol/tri/stream/AbstractTripleClientStream.java](https://app.codecov.io/gh/apache/dubbo/pull/16060?src=pr&el=tree&filepath=dubbo-rpc%2Fdubbo-rpc-triple%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fdubbo%2Frpc%2Fprotocol%2Ftri%2Fstream%2FAbstractTripleClientStream.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy10cmlwbGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9wcm90b2NvbC90cmkvc3RyZWFtL0Fic3RyYWN0VHJpcGxlQ2xpZW50U3RyZWFtLmphdmE=) | 0.00% | [3 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/dubbo/pull/16060?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [.../apache/dubbo/rpc/protocol/tri/Http3Exchanger.java](https://app.codecov.io/gh/apache/dubbo/pull/16060?src=pr&el=tree&filepath=dubbo-rpc%2Fdubbo-rpc-triple%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fdubbo%2Frpc%2Fprotocol%2Ftri%2FHttp3Exchanger.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy10cmlwbGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9wcm90b2NvbC90cmkvSHR0cDNFeGNoYW5nZXIuamF2YQ==) | 0.00% | [1 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/dubbo/pull/16060?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
> :exclamation: There is a different number of reports uploaded between BASE (f5d6436) and HEAD (3d7260a). Click for more details.
>
> <details><summary>HEAD has 5 uploads less than BASE</summary>
>
>| Flag | BASE (f5d6436) | HEAD (3d7260a) |
>|------|------|------|
>|unit-tests-java8|1|0|
>|unit-tests-java25|1|0|
>|unit-tests-java11|1|0|
>|unit-tests-java17|1|0|
>|unit-tests-java21|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 3.3 #16060 +/- ##
=============================================
- Coverage 60.75% 37.01% -23.75%
+ Complexity 11757 11746 -11
=============================================
Files 1952 1951 -1
Lines 89012 88997 -15
Branches 13421 13339 -82
=============================================
- Hits 54079 32938 -21141
- Misses 29367 51466 +22099
+ Partials 5566 4593 -973
```
| [Flag](https://app.codecov.io/gh/apache/dubbo/pull/16060/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [integration-tests-java21](https://app.codecov.io/gh/apache/dubbo/pull/16060/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `32.19% <0.00%> (+<0.01%)` | :arrow_up: |
| [integration-tests-java8](https://app.codecov.io/gh/apache/dubbo/pull/16060/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `32.35% <0.00%> (+<0.01%)` | :arrow_up: |
| [samples-tests-java21](https://app.codecov.io/gh/apache/dubbo/pull/16060/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `32.06% <0.00%> (-0.07%)` | :arrow_down: |
| [samples-tests-java8](https://app.codecov.io/gh/apache/dubbo/pull/16060/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `29.61% <0.00%> (-0.11%)` | :arrow_down: |
| [unit-tests-java11](https://app.codecov.io/gh/apache/dubbo/pull/16060/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit-tests-java17](https://app.codecov.io/gh/apache/dubbo/pull/16060/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit-tests-java21](https://app.codecov.io/gh/apache/dubbo/pull/16060/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit-tests-java25](https://app.codecov.io/gh/apache/dubbo/pull/16060/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit-tests-java8](https://app.codecov.io/gh/apache/dubbo/pull/16060/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/dubbo/pull/16060?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org