The problem is similar to Glassfish There is a process already using the admin port 4848, but my case is on Github actions.
I followed the migrate guide, after upgrading to v2, all my workflow using Glassfish failed due to an error 4848 port is already in use,
But switch back to v1, works again.
Not sure why in @actions/setup-java@v2, port 4848 is used by some process.
Update: Return to v1, in the latest days occured the same problem.
I never encountered this issue before on Github actions. Now all workflow using Payara/Glassfish adapters failed.