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

Issue #10473 - Better warnings in jetty.sh on filesystem permission issues #10605

Merged
merged 4 commits into from
Sep 28, 2023

Conversation

joakime
Copy link
Contributor

@joakime joakime commented Sep 27, 2023

Adding more checks in jetty.sh for common file system permission issues.

Examples:

Don't have write/create access to JETTY_RUN directory path

[jetty-base]$ export JETTY_RUN=/var/run/jetty-no-exist
[jetty-base]$ ../jetty-home-10.0.17-SNAPSHOT/bin/jetty.sh start
mkdir: cannot create directory ‘/var/run/jetty-no-exist’: Permission denied
** ERROR: Unable to create directory: /var/run/jetty-no-exist
          Correct issues preventing use of $JETTY_RUN and try again.

Don't have write/create access to JETTY_PID file path location

Note: the /var/run/ path exist in the following tests, but the Jetty user doesn't have permissions to write there.

[jetty-base]$ export JETTY_PID=/var/run/jetty.pid
[jetty-base]$ ../jetty-home-10.0.17-SNAPSHOT/bin/jetty.sh start
Starting Jetty: touch: cannot touch ‘/var/run/jetty.pid’: Permission denied
** ERROR: Unable to touch file: /var/run/jetty.pid
          Correct issues preventing use of $JETTY_PID and try again.

Don't have write/create access to JETTY_STATE file path location

[jetty-base]$ export JETTY_STATE=/var/run/jetty.state
[jetty-base]$ ../jetty-home-10.0.17-SNAPSHOT/bin/jetty.sh start
Starting Jetty: touch: cannot touch ‘/var/run/jetty.state’: Permission denied
** ERROR: Unable to touch file: /var/run/jetty.state
          Correct issues preventing use of $JETTY_STATE and try again.

jetty-home/src/main/resources/bin/jetty.sh Outdated Show resolved Hide resolved
jetty-home/src/main/resources/bin/jetty.sh Show resolved Hide resolved
jetty-home/src/main/resources/bin/jetty.sh Outdated Show resolved Hide resolved
Signed-off-by: Joakim Erdfelt <[email protected]>
@joakime joakime requested a review from sbordet September 28, 2023 13:00
@joakime joakime merged commit 551ad8b into jetty-10.0.x Sep 28, 2023
@joakime joakime deleted the fix/10.0.x/jetty-sh-debug-enhance branch September 28, 2023 15:24
@olamy olamy mentioned this pull request Oct 1, 2023
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.

Startup Script reports ok too fast, and doesn't wait for actual start of Jetty
2 participants