eclipse-ee4j / glassfish

Eclipse GlassFish
https://eclipse-ee4j.github.io/glassfish/
377 stars 143 forks source link

Monitoring through Admin Web UI gives error with applications using Application Versions feature #24079

Open jaceabreu opened 2 years ago

jaceabreu commented 2 years ago

When using Glassfish Monitoring Service from Admin Web UI, viewing monitor data for applications fails with an error on applications that are published with Application Versioning name schema (app-name:version-id); error: "Invalid module name PermitSearch:2.2.0-SNAPSHOT. Application PermitSearch:2.2.0-SNAPSHOT does not contain module with name PermitSearch:2.2.0-SNAPSHOT."

Environment Details


Problem Description

When utilizing Applications Version feature for deployed applications, the monitoring service cannot load application components, listing an error, instead. Problem is easily reproducible and happens every time. There is no stack trace available, but here is the server.log entries (from a clean log file) after viewing the error.

[2022-08-15T09:33:20.936-0400] [glassfish 6.2] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=40 _ThreadName=admin-listener(5)] [timeMillis: 1660570400936] [levelValue: 1000] [[

  RestResponse.getResponse() gives FAILURE.  endpoint = 'https://localhost:4848/management/domain/applications/application/PermitSearch:2.2.0-SNAPSHOT/list-sub-components'&#x3b; attrs = '{appname=PermitSearch:2.2.0-SNAPSHOT, id=PermitSearch:2.2.0-SNAPSHOT}']]

[2022-08-15T09:33:20.936-0400] [glassfish 6.2] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=40 _ThreadName=admin-listener(5)] [timeMillis: 1660570400936] [levelValue: 1000] [[

  Error in getSubComponents ; 

endpoint = https://localhost:4848/management/domain/applications/application/PermitSearch:2.2.0-SNAPSHOT/list-sub-componentsattrs={appname=PermitSearch:2.2.0-SNAPSHOT, id=PermitSearch:2.2.0-SNAPSHOT}method=GET]]

[2022-08-15T09:33:23.901-0400] [glassfish 6.2] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=36 _ThreadName=admin-listener(1)] [timeMillis: 1660570403901] [levelValue: 1000] [[

  RestResponse.getResponse() gives FAILURE.  endpoint = 'https://localhost:4848/management/domain/applications/application/PermitSearch:2.2.0-SNAPSHOT/list-sub-components'&#x3b; attrs = '{appname=PermitSearch:2.2.0-SNAPSHOT, id=PermitSearch:2.2.0-SNAPSHOT}']]

[2022-08-15T09:33:23.901-0400] [glassfish 6.2] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=36 _ThreadName=admin-listener(1)] [timeMillis: 1660570403901] [levelValue: 1000] [[

  Error in getSubComponents ; 

endpoint = https://localhost:4848/management/domain/applications/application/PermitSearch:2.2.0-SNAPSHOT/list-sub-componentsattrs={appname=PermitSearch:2.2.0-SNAPSHOT, id=PermitSearch:2.2.0-SNAPSHOT}method=GET]]

[2022-08-15T09:33:23.946-0400] [glassfish 6.2] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=36 _ThreadName=admin-listener(1)] [timeMillis: 1660570403946] [levelValue: 1000] [[

  RestResponse.getResponse() gives FAILURE.  endpoint = 'https://localhost:4848/management/domain/applications/application/PermitSearch%3A2.2.0-SNAPSHOT/list-sub-components'&#x3b; attrs = '{appname=PermitSearch%3A2.2.0-SNAPSHOT, id=PermitSearch:2.2.0-SNAPSHOT}']]

[2022-08-15T09:33:23.967-0400] [glassfish 6.2] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=36 _ThreadName=admin-listener(1)] [timeMillis: 1660570403967] [levelValue: 1000] [[

  RestResponse.getResponse() gives FAILURE.  endpoint = 'https://localhost:4848/management/domain/applications/application/PermitSearch%3A2.2.0-SNAPSHOT/list-sub-components'&#x3b; attrs = '{appname=PermitSearch%3A2.2.0-SNAPSHOT, id=PermitSearch:2.2.0-SNAPSHOT}']]

[2022-08-15T09:33:23.967-0400] [glassfish 6.2] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=36 _ThreadName=admin-listener(1)] [timeMillis: 1660570403967] [levelValue: 1000] [[

  Error in getSubComponents ; 

endpoint = https://localhost:4848/management/domain/applications/application/PermitSearch%3A2.2.0-SNAPSHOT/list-sub-componentsattrs={appname=PermitSearch%3A2.2.0-SNAPSHOT, id=PermitSearch:2.2.0-SNAPSHOT}method=GET]]

Steps to reproduce

  1. Enable Logging (see screenshot) glassfish-6 2 5_app-monitor-bug_config

  2. Deploy an application using Application Version feature (using a colon to delimit the name and version id, ie - PermitSearch:2.2.0-SNAPSHOT)

  3. Navigate to "server" page and open "Monitor" tab, choosing the versioned application from the "Application" dropdown list (see screenshot) glassfish-6 2 5_app-monitor-bug_view

Impact of Issue

Prevents viewing any monitored data for the versioned application or it's components.

Sorry about lack of labeling; this is my first github issue report and didn't see what labels I could use or the syntax to add them.

github-actions[bot] commented 1 year ago

This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment

github-actions[bot] commented 3 weeks ago

This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment

OndroMih commented 3 weeks ago

I reproduced this. I deployed an app with name "myapp", without a version, and then the same app with name "myapp:v2", with version "v2".

I get the same error when I invoke the REST endpoint directly for the app name "myapp:v2":

http://localhost:4848/management/domain/applications/application/myapp:v2/list-sub-components.json?appname=myapp%3Av2&id=myapp%3Av2

Another symptom of probably the same issue is that the Modules and Components in the Edit Application page, in Admin Console, doesn't contain components, while it does contain components for the app with no versions.

For "myapp" application (correct):

image

For "myapp:v2" application (only first row in the table, components are missing):

image