spring-boot-admin icon indicating copy to clipboard operation
spring-boot-admin copied to clipboard

Instances list and instance sidebar not working, instance.statusInfo.status undefined

Open arikab opened this issue 2 years ago • 7 comments

Spring Boot Admin Server information

  • Version: 3.2.3

  • Spring Boot version: 3.2.5

  • Configured Security: Security disabled for now (all requests permitted)

  • Webflux or Servlet application: servlet

Client information

  • Spring Boot versions:3.2.5

  • Used discovery mechanism: self registration

  • Webflux or Servlet application: servlet

Description

A client instance registers to the admin server, but the list is empty, with JS errors "Cannot read properties of undefined (reading 'status')", referring to instance.statusInfo.status in multiple occurrences. In addition, when opening the instance view from the wallboard, the data is displayed and the graphs are working, but the sidebar is missing, again showing the same JS error. The same error appears in Wallboard too. The actuators on the client all seem to be working and are accessible. I'm not sure if it's an issue on my side, or some edge case on SBA causing a UI issue image image

arikab avatar May 17 '24 15:05 arikab

Hi @arikab , did this happen after changing/updating something (was working before)? Or are you doing your initial setup?

erikpetzold avatar May 17 '24 19:05 erikpetzold

Hi, it's the initial setup, hasn't been working before

arikab avatar May 17 '24 20:05 arikab

Can you please check

  • the http responses in the network tab of the devtools? No error responses and useful content?
  • the logs of the server, are there any errors?
  • if you have changed the jackson config for the actuator endpoints? (in spring boot 3 there is an own object mapper for actuator, so should not happen by accident)

erikpetzold avatar May 17 '24 21:05 erikpetzold

There are no errors in the network tab, all the requests made are successful and have a valid response. There are no errors on the server logs, and I couldn't find any change done to the actuator endpoints. The logs in the Event Journal also seem valid, and they do contain a statusInfo.status value. Would it be helpful if I attach the Event Journal logs?

arikab avatar May 21 '24 15:05 arikab

Please provide the JSON object that is returned by the /applications endpoint. In case of our example applications it looks like as follows.

Most importantly is the key statusInfo in the instances array that has to be present. Case-sensitivity is relevant here as well.

[
  {
    "name": "spring-boot-admin-sample-servlet",
    "buildVersion": "3.2.4-SNAPSHOT",
    "status": "UP",
    "statusTimestamp": "2024-05-21T15:54:27.397841Z",
    "instances": [
      {
        "id": "3153b559eebc",
        "version": 3,
        "registration": {
          "name": "spring-boot-admin-sample-servlet",
          "managementUrl": "http://192.168.178.20:8080/actuator",
          "healthUrl": "http://192.168.178.20:8080/actuator/health",
          "serviceUrl": "http://192.168.178.20:8080/",
          "source": "http-api",
          "metadata": {
            "tags.de-service-test-6": "A large content",
            "tags.de-service-test-4": "A large content",
            "tags.de-service-test-5": "A large content",
            "startup": "2024-05-21T17:54:26.486461+02:00",
            "kubectl.kubernetes.iolast-applied-configuration": "{\"name\":\"jvm.threads.peak\",\"description\":\"The peak live thread count since the Java virtual machine started or peak was reset\",\"baseUnit\":\"threads\",\"measurements\":[{\"statistic\":\"VALUE\",\"value\":64.0}],\"availableTags\":[]}",
            "tags.de-service-test-2": "A large content",
            "tags.de-service-test-3": "A large content",
            "tags.environment": "test",
            "tags.de-service-test-1": "A large content"
          }
        },
        "registered": true,
        "statusInfo": {
          "status": "UP",
          "details": {
            "reactiveDiscoveryClients": {
              "description": "Discovery Client not initialized",
              "status": "UNKNOWN",
              "components": {
                "Simple Reactive Discovery Client": {
                  "description": "Discovery Client not initialized",
                  "status": "UNKNOWN"
                }
              }
            },
            "clientConfigServer": {
              "status": "UNKNOWN",
              "details": {
                "error": "no property sources located"
              }
            },
            "diskSpace": {
              "status": "UP",
              "details": {
                "total": 994662584320,
                "free": 323502788608,
                "threshold": 10485760,
                "path": "/",
                "exists": true
              }
            },
            "ping": {
              "status": "UP"
            },
            "discoveryComposite": {
              "description": "Discovery Client not initialized",
              "status": "UNKNOWN",
              "components": {
                "discoveryClient": {
                  "description": "Discovery Client not initialized",
                  "status": "UNKNOWN"
                }
              }
            },
            "refreshScope": {
              "status": "UP"
            },
            "db": {
              "status": "UP",
              "details": {
                "database": "HSQL Database Engine",
                "validationQuery": "isValid()"
              }
            }
          }
        },
        "statusTimestamp": "2024-05-21T15:54:27.397841Z",
        "info": {
          "build": {
            "artifact": "spring-boot-admin-sample-servlet",
            "name": "Spring Boot Admin Sample Servlet",
            "time": "2024-05-17T13:28:18.618Z",
            "version": "3.2.4-SNAPSHOT",
            "group": "de.codecentric"
          }
        },
        "endpoints": [
          {
            "id": "caches",
            "url": "http://192.168.178.20:8080/actuator/caches"
          },
          {
            "id": "loggers",
            "url": "http://192.168.178.20:8080/actuator/loggers"
          },
          {
            "id": "heapdump",
            "url": "http://192.168.178.20:8080/actuator/heapdump"
          },
          {
            "id": "features",
            "url": "http://192.168.178.20:8080/actuator/features"
          },
          {
            "id": "startup",
            "url": "http://192.168.178.20:8080/actuator/startup"
          },
          {
            "id": "beans",
            "url": "http://192.168.178.20:8080/actuator/beans"
          },
          {
            "id": "configprops",
            "url": "http://192.168.178.20:8080/actuator/configprops"
          },
          {
            "id": "threaddump",
            "url": "http://192.168.178.20:8080/actuator/threaddump"
          },
          {
            "id": "auditevents",
            "url": "http://192.168.178.20:8080/actuator/auditevents"
          },
          {
            "id": "info",
            "url": "http://192.168.178.20:8080/actuator/info"
          },
          {
            "id": "resume",
            "url": "http://192.168.178.20:8080/actuator/resume"
          },
          {
            "id": "sessions",
            "url": "http://192.168.178.20:8080/actuator/sessions"
          },
          {
            "id": "restart",
            "url": "http://192.168.178.20:8080/actuator/restart"
          },
          {
            "id": "logfile",
            "url": "http://192.168.178.20:8080/actuator/logfile"
          },
          {
            "id": "custom",
            "url": "http://192.168.178.20:8080/actuator/custom"
          },
          {
            "id": "health",
            "url": "http://192.168.178.20:8080/actuator/health"
          },
          {
            "id": "refresh",
            "url": "http://192.168.178.20:8080/actuator/refresh"
          },
          {
            "id": "env",
            "url": "http://192.168.178.20:8080/actuator/env"
          },
          {
            "id": "pause",
            "url": "http://192.168.178.20:8080/actuator/pause"
          },
          {
            "id": "scheduledtasks",
            "url": "http://192.168.178.20:8080/actuator/scheduledtasks"
          },
          {
            "id": "mappings",
            "url": "http://192.168.178.20:8080/actuator/mappings"
          },
          {
            "id": "metrics",
            "url": "http://192.168.178.20:8080/actuator/metrics"
          },
          {
            "id": "conditions",
            "url": "http://192.168.178.20:8080/actuator/conditions"
          },
          {
            "id": "httpexchanges",
            "url": "http://192.168.178.20:8080/actuator/httpexchanges"
          },
          {
            "id": "shutdown",
            "url": "http://192.168.178.20:8080/actuator/shutdown"
          }
        ],
        "buildVersion": "3.2.4-SNAPSHOT",
        "tags": {
          "environment": "test"
        }
      }
    ]
  }
]

SteKoe avatar May 21 '24 16:05 SteKoe

Thank you, here's the JSON object:

[
    {
        "name": "test-application",
        "build_version": "0.1",
        "status": "UP",
        "status_timestamp": "2024-05-21T15:15:37.270517442Z",
        "instances": [
            {
                "id": "ab334289a425",
                "version": 3,
                "registration": {
                    "name": "test-application",
                    "management_url": "http://10.230.185.66:8080/actuator",
                    "health_url": "http://10.230.185.66:8080/actuator/health",
                    "service_url": "http://10.230.185.66:8080/",
                    "source": "http-api",
                    "metadata": {
                        "startup": "2024-05-21T17:15:29.781983916+02:00"
                    }
                },
                "registered": true,
                "status_info": {
                    "status": "UP",
                    "details": {
                        "livenessState": {
                            "status": "UP"
                        },
                        "readinessState": {
                            "status": "UP"
                        },
                        "db": {
                            "status": "UP",
                            "components": {
                                "database": {
                                    "status": "UP",
                                    "details": {
                                        "database": "MySQL",
                                        "validationQuery": "isValid()"
                                    }
                                }
                            }
                        },
                        "diskSpace": {
                            "status": "UP",
                            "details": {
                                "total": 845414178816,
                                "free": 776295903232,
                                "threshold": 10485760,
                                "path": "/.",
                                "exists": true
                            }
                        },
                        "ping": {
                            "status": "UP"
                        }
                    }
                },
                "status_timestamp": "2024-05-21T15:15:37.270517442Z",
                "info": {
                    "build": {
                        "encoding": {
                            "reporting": "UTF-8",
                            "source": "UTF-8"
                        },
                        "version": "0.1",
                        "artifact": "example",
                        "java": {
                            "source": "17",
                            "target": "17"
                        },
                        "name": "test-application",
                        "time": "2024-05-21T15:12:30.914Z",
                        "group": "com.example"
                    },
                    "java": {
                        "version": "17.0.11",
                        "vendor": {
                            "name": "Azul Systems, Inc.",
                            "version": "Zulu17.50+20-SA"
                        },
                        "runtime": {
                            "name": "OpenJDK Runtime Environment",
                            "version": "17.0.11+9-LTS"
                        },
                        "jvm": {
                            "name": "OpenJDK 64-Bit Server VM",
                            "vendor": "Azul Systems, Inc.",
                            "version": "17.0.11+9-LTS"
                        }
                    }
                },
                "endpoints": [
                    {
                        "id": "caches",
                        "url": "http://10.230.185.66:8080/actuator/caches"
                    },
                    {
                        "id": "loggers",
                        "url": "http://10.230.185.66:8080/actuator/loggers"
                    },
                    {
                        "id": "health",
                        "url": "http://10.230.185.66:8080/actuator/health"
                    },
                    {
                        "id": "env",
                        "url": "http://10.230.185.66:8080/actuator/env"
                    },
                    {
                        "id": "heapdump",
                        "url": "http://10.230.185.66:8080/actuator/heapdump"
                    },
                    {
                        "id": "scheduledtasks",
                        "url": "http://10.230.185.66:8080/actuator/scheduledtasks"
                    },
                    {
                        "id": "mappings",
                        "url": "http://10.230.185.66:8080/actuator/mappings"
                    },
                    {
                        "id": "beans",
                        "url": "http://10.230.185.66:8080/actuator/beans"
                    },
                    {
                        "id": "configprops",
                        "url": "http://10.230.185.66:8080/actuator/configprops"
                    },
                    {
                        "id": "threaddump",
                        "url": "http://10.230.185.66:8080/actuator/threaddump"
                    },
                    {
                        "id": "metrics",
                        "url": "http://10.230.185.66:8080/actuator/metrics"
                    },
                    {
                        "id": "conditions",
                        "url": "http://10.230.185.66:8080/actuator/conditions"
                    },
                    {
                        "id": "info",
                        "url": "http://10.230.185.66:8080/actuator/info"
                    }
                ],
                "build_version": "0.1",
                "tags": {}
            }
        ]
    }
]

arikab avatar May 21 '24 16:05 arikab

Thanks for the help and sorry for the noise, it was a server configuration issue

arikab avatar May 22 '24 10:05 arikab