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

Failure when running add-module for openid, websocket, and stats modules #9145

Closed
gregpoulos opened this issue Jan 9, 2023 · 3 comments · Fixed by #9291
Closed

Failure when running add-module for openid, websocket, and stats modules #9145

gregpoulos opened this issue Jan 9, 2023 · 3 comments · Fixed by #9291
Assignees
Labels
Bug For general bugs on Jetty side

Comments

@gregpoulos
Copy link
Contributor

Jetty version(s)
12

Java version/vendor (use: java -version)
openjdk version "19.0.1" 2022-10-18
OpenJDK Runtime Environment (build 19.0.1+10-21)
OpenJDK 64-Bit Server VM (build 19.0.1+10-21, mixed mode, sharing)

OS type/version
macOS Monterey, 12.6.2

Description
I get error messages when trying to add the openid and stats modules:

$ java -jar $JETTY_HOME/start.jar --add-modules=openid
ERROR : No module found to provide security for openid{enabled}

Usage: java -jar $JETTY_HOME/start.jar [options] [properties] [configs]
       java -jar $JETTY_HOME/start.jar --help  # for more information
$ java -jar $JETTY_HOME/start.jar --add-modules=stats
ERROR : No module found to provide servlet for stats{enabled}

Usage: java -jar $JETTY_HOME/start.jar [options] [properties] [configs]
       java -jar $JETTY_HOME/start.jar --help  # for more information

This is confusing, because both openid and stats appear in the list of modules that appears when I run java -jar $JETTY_HOME/start.jar --list-modules=*:

$ java -jar $JETTY_HOME/start.jar --list-modules=* | grep openid
                           ee10-openid - Adds OpenId Connect authentication to the server.
                            ee9-openid - Adds OpenId Connect authentication to the server.
                                openid - Adds OpenId Connect authentication to the server.
$ java -jar $JETTY_HOME/start.jar --list-modules=* | grep stats
                                 stats - Enables detailed statistics collection for the server.

How to reproduce?
Run java -jar $JETTY_HOME/start.jar --add-modules=openid,stats

@gregpoulos gregpoulos added the Bug For general bugs on Jetty side label Jan 9, 2023
@lorban
Copy link
Contributor

lorban commented Jan 10, 2023

The stats module bug is a bit complex and will need some time to get fixed, but the openid one looks fairly trivial.

The openid module should have been called ee8-openid. You could fix it temporarily by renaming $JETTY_HOME/modules/openid.mod to $JETTY_HOME/modules/ee8-openid.mod and editing it, you'll see that it contains a [depends] section like the following that needs to be changed:

[depend]
security
client

The security module doesn't exist anymore as it's specific to which ee version you're running so it should be changed to:

[depend]
ee8-security
client

That way you should be able to run java -jar $JETTY_HOME/start.jar --add-modules=ee8-openid and --list-modules=* should now report ee10-openid, ee9-openid and ee8-openid.

@gregpoulos gregpoulos changed the title Failure when running add-module for openid and stats modules Failure when running add-module for openid, websocket, and stats modules Jan 10, 2023
@gregpoulos
Copy link
Contributor Author

@lorban Just a heads up that I noticed a similar error when trying to add the websocket module:

𝄢 java -jar $JETTY_HOME/start.jar --add-modules=websocket
ERROR : No module found to provide websocket-jetty for websocket{enabled}

Usage: java -jar $JETTY_HOME/start.jar [options] [properties] [configs]
       java -jar $JETTY_HOME/start.jar --help  # for more information

This looks quite similar to the openid bug: I think this error is simply an artifact of how the various websocket-* modules got split/renamed to support EE8/9/10.

@lorban
Copy link
Contributor

lorban commented Jan 11, 2023

Thanks, I've added a fix for the websocket module too. You are right: it depends on outdated module names that should be prefixed with ee*.

lorban added a commit that referenced this issue Jan 11, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Jan 11, 2023
lorban added a commit that referenced this issue Jan 11, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Jan 12, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Jan 12, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Jan 24, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Jan 24, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Jan 24, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Jan 24, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Jan 25, 2023
lorban added a commit that referenced this issue Jan 25, 2023
lorban added a commit that referenced this issue Jan 26, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Jan 26, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Jan 26, 2023
lorban added a commit that referenced this issue Jan 26, 2023
lorban added a commit that referenced this issue Jan 26, 2023
lorban added a commit that referenced this issue Jan 27, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Jan 27, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Jan 27, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Jan 27, 2023
lorban added a commit that referenced this issue Jan 27, 2023
lorban added a commit that referenced this issue Jan 27, 2023
lorban added a commit that referenced this issue Feb 2, 2023
Signed-off-by: Ludovic Orban <[email protected]>
@lorban lorban linked a pull request Feb 2, 2023 that will close this issue
@lorban lorban moved this to 👀 In review in Jetty 12.0.0.beta1 Feb 2, 2023
lorban added a commit that referenced this issue Feb 3, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Feb 3, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Feb 6, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Feb 6, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Feb 6, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Feb 6, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Feb 6, 2023
lorban added a commit that referenced this issue Feb 6, 2023
lorban added a commit that referenced this issue Feb 6, 2023
lorban added a commit that referenced this issue Feb 7, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Feb 7, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Feb 7, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Feb 7, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Feb 7, 2023
lorban added a commit that referenced this issue Feb 7, 2023
lorban added a commit that referenced this issue Feb 7, 2023
lorban added a commit that referenced this issue Feb 7, 2023
Signed-off-by: Ludovic Orban <[email protected]>
lorban added a commit that referenced this issue Feb 7, 2023
#9145 cleanup statistics

Signed-off-by: Ludovic Orban <[email protected]>
@lorban lorban closed this as completed Feb 8, 2023
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Jetty 12.0.0.beta1 Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants