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

Cluster Monitoring Data values not Display on Administration Console #24619

Closed
yoshioza opened this issue Oct 4, 2023 · 2 comments · Fixed by #24942
Closed

Cluster Monitoring Data values not Display on Administration Console #24619

yoshioza opened this issue Oct 4, 2023 · 2 comments · Fixed by #24942

Comments

@yoshioza
Copy link

yoshioza commented Oct 4, 2023

Cluster Monitoring Data values not Display on Administration Console

Environment Details

  • GlassFish Version (and build number): 7.0.9 (commit: 5860e42)
  • JDK version: 17
  • OS: Windows10
  • Database: -

Problem Description

I am unable to monitor the status of clusters in the Administration Console.
It is possible to check using the asadmin command.

Steps to reproduce

  1. Set up GlassFish (unzip to C:\glassfish).
  2. Start GlassFish (use the command asadmin start-domain).
  3. Access the Administration Console (localhost:4848).
  4. Create a cluster.
  5. Deploy the Sample Application to the cluster.
  6. Set all Monitoring settings of the created cluster to HIGH.

Glassfish_01_cluster_monitoringconfig

  1. Start the cluster.

  2. Display the Sample Application page.
    Glassfish_02_checksampleapp

  3. Attempt to check the state of Cluster instances from Monitoring Data.

Cluster Monitoring Data is not displayed.

  • application
    Glassfish_03_cluster_monitoring_notdisplay_application_

  • server
    Glassfish_04_cluster_monitoring_notdisplay_server_

  • resource
    Glassfish_05_cluster_monitoring_notdisplay_resource_

  • Monitoring Data for the DAS server is displayed.

Glassfish_90_DasServer_monitoring_display_server

  • The result of obtaining cluster information using the asadmin command.
    glassfish_06_asadmin_monitoring_data

DAS_server.log

testcluster01_server.log

Impact of Issue

In the Administration Console, it is not possible to monitor cluster resource usage, including memory consumption.

@OndroMih
Copy link
Contributor

OndroMih commented Apr 6, 2024

I can reproduce on GlassFish 7.0.15-SNAPSHOT. I see the following exception in the log:

[#|2024-04-07T01:50:31.193947+02:00|WARNING|GF 7.0.15-SNAPSHOT|org.glassfish.jersey.server.ServerRuntime$Responder|_ThreadID=61;_ThreadName=admin-listener(2);_LevelValue=900;|
  An exception mapping did not successfully produce and processed a response. Logging the exception propagated to the default exception mapper.
java.lang.RuntimeException: java.lang.ClassNotFoundException: Provider for jakarta.ws.rs.client.ClientBuilder cannot be found
	at jakarta.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:75)
	at jakarta.ws.rs.client.ClientBuilder.newClient(ClientBuilder.java:86)
	at org.glassfish.admin.rest.utils.Util.getJerseyClient(Util.java:269)
	at org.glassfish.admin.rest.resources.MonitoringResource.getChildNodes(MonitoringResource.java:159)

@OndroMih
Copy link
Contributor

OndroMih commented Apr 7, 2024

The reason for the exception is that in Admin Console, the context classloader is an OSGI classloader for the bundle org.glassfish.main.core.kernel, which doesn't see the service loader file jakarta.ws.rs.client.ClientBuilder present in jersey-client.jar.

ClientBuilder works in an a normal application deployed to the server because the web app classloader finds the service loader file.

OndroMih added a commit to OndroMih/glassfish that referenced this issue May 4, 2024
Signed-off-by:Ondro Mihalyi <mihalyi@omnifish.ee>
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.

2 participants