-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P4
-
None
-
Affects Version/s: 11, 17, 21, 25
-
Component/s: core-libs
The `java/net/httpclient/ConnectTimeoutWithProxyAsync.java` and `java/net/httpclient/ConnectTimeoutWithProxySync.java` tests are failing when run on EC2 (see attached .jtr files) with JDK 11+ across Windows, Macos, and Linux. Network settings are configured for no restrictions, and failure message indicates test is hitting the test url rather than timing out. The tests pass when I run locally on Mac and Linux.
While trying to debug the test, seeing that I get a 405 error when running `curl -m 5 -I -X POST -x http://example.com:8080/ http://example.com:81/` on EC2, rather than the expected timeout I get when running locally. Prior to December 17th, the test was working on EC2. I suspect there may have been a network related change.
As a work around, I've found that using a test IP gets the test passing on EC2: https://github.com/openjdk/jdk21u-dev/compare/master...satyenme:jdk21u-dev:timeout-fix.
Below are steps to replicate (seeing the same behavior when using make targets):
```
mkdir temp
cd temp
sudo yum install -y wget git autoconf file diffutils findutils tar make unzip zip java-25-amazon-corretto-devel gcc14 gcc14-c++ alsa-lib-devel cups-devel fontconfig-devel libXtst-devel libXt-devel libXrender-devel libXrandr-devel libXi-devel
wget https://builds.shipilev.net/jtreg/jtreg-8.1%2B1.zip
unzip jtreg-8.1+1.zip
git clone https://github.com/openjdk/jdk21u-dev.git
wget https://corretto.aws/downloads/latest/amazon-corretto-21-x64-linux-jdk.tar.gz
tar -xzvf amazon-corretto-21-x64-linux-jdk.tar.gz
CC=gcc14-gcc CXX=gcc14-g++ bash ./configure --with-jtreg=/home/ec2-user/temp/jtreg --with-boot-jdk=/home/ec2-user/temp/amazon-corretto-21.0.9.11.1-linux-x64
make run-test TEST="test/jdk/java/net/httpclient/ConnectTimeoutWithProxyAsync.java"
```
While trying to debug the test, seeing that I get a 405 error when running `curl -m 5 -I -X POST -x http://example.com:8080/ http://example.com:81/` on EC2, rather than the expected timeout I get when running locally. Prior to December 17th, the test was working on EC2. I suspect there may have been a network related change.
As a work around, I've found that using a test IP gets the test passing on EC2: https://github.com/openjdk/jdk21u-dev/compare/master...satyenme:jdk21u-dev:timeout-fix.
Below are steps to replicate (seeing the same behavior when using make targets):
```
mkdir temp
cd temp
sudo yum install -y wget git autoconf file diffutils findutils tar make unzip zip java-25-amazon-corretto-devel gcc14 gcc14-c++ alsa-lib-devel cups-devel fontconfig-devel libXtst-devel libXt-devel libXrender-devel libXrandr-devel libXi-devel
wget https://builds.shipilev.net/jtreg/jtreg-8.1%2B1.zip
unzip jtreg-8.1+1.zip
git clone https://github.com/openjdk/jdk21u-dev.git
wget https://corretto.aws/downloads/latest/amazon-corretto-21-x64-linux-jdk.tar.gz
tar -xzvf amazon-corretto-21-x64-linux-jdk.tar.gz
CC=gcc14-gcc CXX=gcc14-g++ bash ./configure --with-jtreg=/home/ec2-user/temp/jtreg --with-boot-jdk=/home/ec2-user/temp/amazon-corretto-21.0.9.11.1-linux-x64
make run-test TEST="test/jdk/java/net/httpclient/ConnectTimeoutWithProxyAsync.java"
```
- links to
-
Review(master)
openjdk/jdk/29431