java.net.SocketException: Permission denied

WSL から Spring Boot のアプリを起動しようとしたらソケットが使えないエラーが発生!

Exception in thread "main" java.net.SocketException: Permission denied  

ソケットを開放する

sudo 権限でソケットアクセスを開放すれば使えるようになります。

sudo /sbin/sysctl -w net.ipv4.ip_unprivileged_port_start=0  

参考サイト

how to fix java.net.SocketException: Permission denied on ubuntu - stack overflow

Subscribe to 猫好きが猫以外のことも書く

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe