Skip to content
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

Update Apache Commons Daemon prunsrv to 1-4-0 #30524

Merged

Conversation

jimblye
Copy link
Member

@jimblye jimblye commented Jan 10, 2025

With the new version of prunsrv.exe, there is a slight change of behavior for the registerWinService command when the server has been created, but never started. In that situation, there is no "logs" directory under the server directory,
("!WLP_OUTPUT_DIR!%SERVER_NAME%\logs). The previous version of prunsrv did not complain about that. The new version displays an warning/error message:

[2025-01-13 10:52:15] [warn] [12240] Failed to grant service user 'LocalSystem' write permissions to log path 'C:\wlp\usr\servers\<SERVER_NAME>\logs' due to error '2: The system cannot find the file specified.'

To avoid the message in this scenario, I added a check to see if the directory exists before calling prunsrv to register the service. If the "logs" dir doesn't exist, the server.bat script will create it.

@jimblye jimblye requested a review from hlhoots January 10, 2025 20:21
@jimblye
Copy link
Member Author

jimblye commented Jan 10, 2025

#build
(view Open Liberty Personal Build - ✅ completed successfully!)

Note: Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link

Code analysis and actions

DO NOT DELETE THIS COMMENT.
  • 3 product code files were changed.
  • Please describe in a separate comment how you tested your changes.

@LibbyBot
Copy link

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_FZCjsdAmEe-f-sI4gb7_Pw

Target locations of links might be accessible only to IBM employees.

hlhoots
hlhoots previously approved these changes Jan 13, 2025
Copy link
Member

@hlhoots hlhoots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@hlhoots hlhoots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jimblye
Copy link
Member Author

jimblye commented Jan 15, 2025

#libby
(view Open Liberty Delivery Requirements Verification - ✅ completed successfully!)

Note: Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link

Code analysis and actions

DO NOT DELETE THIS COMMENT.
  • 4 product code files were changed.
  • Please describe in a separate comment how you tested your changes.

@jimblye jimblye merged commit b471fdf into OpenLiberty:integration Jan 15, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Newer version of prunsrv.exe available from Apache Commons Procrun project
3 participants