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

Bug Report: Docker container doesn't start anymore in case of JVM option with spaces in value #6638

Closed
jaylemur opened this issue Apr 8, 2024 · 2 comments
Assignees
Labels
Status: Open Issue has been triaged by the front-line engineers and is being worked on verification Type: Bug Label issue as a bug defect

Comments

@jaylemur
Copy link

jaylemur commented Apr 8, 2024

Brief Summary

Container doesn't start anymore if a JVM options is configured in the domain with one or more space(s) in the value.

Expected Outcome

Container starts successfully.

Current Outcome

Domain doesn't start with an error message saying that it cannot find the main class

Reproducer

  • Start a container with the last image of Payara full server
  • Using the console, add a new JVM options with a value that contains spaces for example:
    -Djames.smtp.smtpGreeting=“ESMTP Server by xxx”
  • The container doesn’t restart anymore and you can see the error message : Error: Could not find or load main class Server

Operating System

Window 10 pro + Docker Desktop

JDK Version

Version from Payara image, tag latest

Payara Distribution

Payara Docker Image

@jaylemur jaylemur added Status: Open Issue has been triaged by the front-line engineers and is being worked on verification Type: Bug Label issue as a bug defect labels Apr 8, 2024
@artur-mal
Copy link

The issue you’re experiencing is not specifically a problem with Payara or Docker. It’s more about how JVM options are passed and interpreted.
You can try enclosing the entire system property in quotes:

-D"james.smtp.smtpGreeting=ESMTP Server by xxx"

Make sure you don't use non-standard quotation marks (“” instead of "). When setting JVM options, it’s important to use standard ASCII double quotes (").

@jaylemur
Copy link
Author

jaylemur commented Apr 9, 2024

Thanks for your hint, but I think that the problem is more related to the way the script "startInForeground.sh" starts the domain.
First it takes the output of the command start-domain with the "--dry-run" option.
Makes some string manipulation using "sed" and uses the result as the final command to start the domain.
Unfortunately, the ouput of the command with *--dry-run" already removes any quotes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Open Issue has been triaged by the front-line engineers and is being worked on verification Type: Bug Label issue as a bug defect
Projects
None yet
Development

No branches or pull requests

2 participants