I've got a health-check script running in Jenkins using PowerShell (Windows PowerShell 5.1) that calls an HTTPS endpoint. The command looks like this: `$response = Invoke-WebRequest -Uri "https://[0m${IP_Name}:2443/ngat-service/admin/health" -UseBasicParsing -TimeoutSec 600`. This works perfectly with our older Java 8 + Tomcat 8 app, but when I switch to our newer Java 17 + Tomcat 10 app, it consistently fails with a timeout error. I know the endpoint is reachable since `Test-NetConnection` passes. Also, when I use `curl`, it takes about 7 minutes to get the full HTML, which is concerning. I've already ensured that TLS1.2 is enforced and that cert validation is ignored. Has anyone encountered this issue and found a solution?
2 Answers
Having to wait 7 minutes to fetch a page definitely points to an issue on the app side, rather than your PowerShell script. I would check the performance of your Java application, especially around the endpoint you're hitting. It might be worth seeing if there's any logging to get more insight into what's causing that delay.
Is Java using any specific ports? Since you mentioned that you're reaching port 2443 fine with `Test-NetConnection`, it's good to know. Also, if there's a `httpRuntime executionTimeout="180"` setting in the web.config file, that could potentially lead to a timeout situation. Double-check if that's affecting your setup.
Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically