Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/epomatti/java-httpclient-closewait-leak
Dummy project to test JDK 11+ leaky connections
https://github.com/epomatti/java-httpclient-closewait-leak
httpclient java maven undertow
Last synced: 6 days ago
JSON representation
Dummy project to test JDK 11+ leaky connections
- Host: GitHub
- URL: https://github.com/epomatti/java-httpclient-closewait-leak
- Owner: epomatti
- License: mit
- Created: 2022-05-09T17:14:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-09T19:22:37.000Z (over 2 years ago)
- Last Synced: 2024-11-17T00:23:44.538Z (2 months ago)
- Topics: httpclient, java, maven, undertow
- Language: Java
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Java HttpClient CLOSE_WAIT Troubleshoot
Sample project to track [JDK-8221395](https://bugs.openjdk.java.net/browse/JDK-8221395) and [JDK-8236596](https://bugs.openjdk.java.net/browse/JDK-8236596) bug fixes.
Download the desired distributions from the [archive](https://www.oracle.com/java/technologies/javase/jdk11-archive-downloads.html) to test the scenarios. Reference:
- `jdk-11.0.5` - Bug reported
- `jdk-11.0.6` - Fix backported from JDK 13
- `jdk-11.0.15+10` - Most recent version (as of today)Get the dependencies and compile the project:
```sh
mvn install
mvn compile
```Set the `JAVA_HOME` environment according to the desired test. Must be set on both client and server bash sessions.
```sh
# Issue should happen
export JAVA_HOME='/opt/java/jdk-11.0.5'# Issue should NOT happen
export JAVA_HOME='/opt/java/jdk-11.0.15+10'
```Execute the code to generate the connections:
```sh
# Start the mock server
mvn exec:java -pl server# Trigger client connections using HttpClient
mvn exec:java -pl client
```Display connections to check if they are in a lock state:
```sh
ss -np | grep ''
```