-
Notifications
You must be signed in to change notification settings - Fork 152
GlassFish doesn't start on Windows if running scripts is disabled #25429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Since 7.0.23, the launcher will create a temporary powershell file to start server on Windows, see: glassfish/nucleus/admin/launcher/src/main/java/com/sun/enterprise/admin/launcher/GFLauncher.java Line 1108 in e7b9ab8
Launcher should catch this error and attempt to start the server using the old way. |
That will not work, just limited for playing, but not on production. The command line on windows is limited in length, when you start an instance in cluster, Windows will kill it on logout, etc. I did not do this because I was bored ... At least print warning then. There is a lot of complaints about the windows behavior. Also you should not catch the error, you should detect system capabilities first instead, before you do something with the expectation that it works reliably. |
The link gives some advices, we should reflect that somehow. Not sure what is possible, I doubt we can set execution policies from GF. Can we sign the script? I have doubts about this too. So perhaps we can extend the "capabilities" class I created and add something like
|
I agree. Check first, and then decide whether to execute using script or the old way. If execution using script still wouldn't work, maybe all give a user an option to force it using an env var. |
Yeah, could be also some configuration to enforce chosen way. Especially when we don't have control over all Windows versions, configurations, patches, etc. |
It is more complicated - because the GFLauncher is used by remote commands, and after many tests using many configurations and commands I have found that it is quite clear:
Any alternative to PowerShell still needs special permissions. However, when testing I have found yet few other issues, which should be fixed in #25454 now. Some caused very confusing errors (and just on Windows) like:
|
GlassFish version: 7.0.23
OS: Windows (any supported version)
When executing powershell scripts is disabled on Windows, execution of asadmin start-domain will give the following error:
Thanks to @m-reza-rahman for reporting this.
The text was updated successfully, but these errors were encountered: