Gradle error "Connection refused" with WSL2 and VPN.
Answered
I'm trying to run the gradle project on wsl2. Everything is ok when VPN is disconnected. But there is in no network connection specifically in the gradle in the IDEA.
I've fixed WSL2 issue with VPN using wsl-vpnkit.
Now there is no network issues with WSL2+VPN and maven build works perfectly. Gradle build works as well if I execute it from the command line. Unfortunately it doesn't work with IDEA.
What can I do to fix it?

Please sign in to leave a comment.
Could you please report it at https://youtrack.jetbrains.com/newIssue?project=IDEA and attach the logs using Help | Collect Logs and Diagnostic Data?
Ok, sure.