I have a better explanation!
I had the same problem. I kept setting the glassfish password, then carefully entering it, and it would be rejected. Strangely, it would tell me several times and keep asking repeatedly.
I
thought I was setting the password when I would change it in Netbeans, either by changing the properties of the Server or by removing & recreating the server (all 3 accessible through Tools Menu -> Servers). No! The password was set when Glassfish was installed (by default, admin is the user and adminadmin is the password).
That’s why it would ask me once for the password, then reject the answer twice. Netbeans had tried the password I had given it, then asked me, but I gave it the same answer.
To configure glassfish, use the web browser to access:
http://localhost:4848/. You can change the p/w there! Then tell NetBeans what the password is, and it won't even trouble you for it anymore!