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

Unrecognized jetty-home/start.jar command line option not reported clearly #5681

Closed
janbartel opened this issue Nov 17, 2020 · 8 comments · Fixed by #7769
Closed

Unrecognized jetty-home/start.jar command line option not reported clearly #5681

janbartel opened this issue Nov 17, 2020 · 8 comments · Fixed by #7769
Assignees

Comments

@janbartel
Copy link
Contributor

jetty-10.0.x

If I use an unknown command option to start the distro like so:
[941] java -jar ../jetty-home/start.jar --foople

Jetty simply starts. I would expect at least an "unknown option" type warning, maybe even not starting.

@joakime
Copy link
Contributor

joakime commented Nov 17, 2020

In this case, --foople is seen as an unknown command requiring a forked JVM.

It's passed to the forked JVM as a JVM argument.

Seeing as we run on a large variety of JVMs, this is about as good as we can get.

@gregw
Copy link
Contributor

gregw commented Nov 17, 2020

yeah, this is kind of a known problem.... without --exec, we don't start another JVM so you don't get an error from the JVM:

[721] java -jar ../start.jar --exec --foobar
Unrecognized option: --foobar
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

[722] java -jar ../start.jar --foobar
WARN  : System properties and/or JVM args set.  Consider using --dry-run or --exec
2020-11-17 16:01:44.545:INFO :oejs.Server:main: jetty-10.0.0-SNAPSHOT; built: 2020-11-17T14:41:00.807Z; git: 3508fdc9559c49792cf1c9a706cb4f5a0a4cc050; jvm 14.0.1+7
2020-11-17 16:01:44.575:INFO :oejdp.ScanningAppProvider:main: Deployment monitor [file:///home/gregw/src/jetty-10.0.x/jetty-home/target/jetty-home/demo/webapps/]
2020-11-17 16:01:44.591:INFO :oejs.AbstractConnector:main: Started ServerConnector@3de26be2{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2020-11-17 16:01:44.604:INFO :oejs.Server:main: Started Server@4fb0f2b9{STARTING}[10.0.0-SNAPSHOT,sto=5000] @700ms

I guess we could change this WARN to a fatal error? Shall we? do it now for 10 or wait for 12???

@janbartel
Copy link
Contributor Author

Well, could the output be at least a little more explicit? I had no idea that the WARN was related to the --foople.

@janbartel janbartel reopened this Nov 17, 2020
@github-actions
Copy link

github-actions bot commented Dec 8, 2021

This issue has been automatically marked as stale because it has been a
full year without activity. It will be closed if no further activity occurs.
Thank you for your contributions.

@github-actions github-actions bot added the Stale For auto-closed stale issues and pull requests label Dec 8, 2021
@github-actions
Copy link

github-actions bot commented Jan 7, 2022

This issue has been closed due to it having no activity.

@github-actions github-actions bot closed this as completed Jan 7, 2022
@sbordet sbordet reopened this Jan 10, 2022
@github-actions
Copy link

This issue has been closed due to it having no activity.

@sbordet sbordet reopened this Feb 10, 2022
@github-actions
Copy link

This issue has been closed due to it having no activity.

@sbordet sbordet reopened this Mar 13, 2022
@joakime
Copy link
Contributor

joakime commented Mar 22, 2022

How about this result?
Seen in PR #7769

$ java start.jar --foople -Dzed.key=0.value
WARN  : System properties and/or JVM args set.  Consider using --dry-run or --exec
WARN  :   Detected JVM System Property: zed.key=0.value
WARN  :   Detected JVM Arg: --foople

@github-actions github-actions bot removed the Stale For auto-closed stale issues and pull requests label Mar 23, 2022
joakime added a commit that referenced this issue Mar 24, 2022
joakime added a commit that referenced this issue Mar 25, 2022
joakime added a commit that referenced this issue Mar 25, 2022
Signed-off-by: Joakim Erdfelt <[email protected]>
joakime added a commit that referenced this issue Mar 25, 2022
- Improved warning on unrecognized Command Line Options

Signed-off-by: Joakim Erdfelt <[email protected]>
@joakime joakime changed the title Unknown distro command ignored Unrecognized jetty-home/start.jar command line option not reported clearly Mar 29, 2022
joakime added a commit that referenced this issue Oct 6, 2022
- Improved warning on unrecognized Command Line Options

Signed-off-by: Joakim Erdfelt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants