Skip to content

Bug: Broken view and missing data with Hazelcast #4258

Closed

Description

@cdprete

Spring Boot Admin Server information

  • Version: 3.4.5

  • Spring Boot version: 3.4.5

  • Configured Security: None

  • Webflux or Servlet application: WebFlux

Client information

  • Spring Boot versions: 3.4.5

  • Used discovery mechanism: Eureka

  • Webflux or Servlet application: WebFlux

Description

Hi.
I enabled Hazelcast following your documentation and, since then, the UI is completely broken.
Only the health information are displayed and everything else is missing:
Image

My Config bean is as follows:

    // See https://docs.spring-boot-admin.com/3.4.5/docs/server/server#clustering
    @Bean
    @ConditionalOnProperty(prefix = PREFIX, name = "enabled", matchIfMissing = true)
    public Config hazelcastConfig(HazelcastSbaProperties properties) {
        MergePolicyConfig mergePolicyConfig = new MergePolicyConfig();

        Config config = new Config();
        config
                .setClusterName(properties.clusterName())
                .setInstanceName(properties.instanceName())
                .addMapConfig(new MapConfig(properties.sentNotifications()).setInMemoryFormat(OBJECT).setEvictionConfig(new EvictionConfig().setMaxSizePolicy(PER_NODE)).setMergePolicyConfig(mergePolicyConfig))
                .getNetworkConfig()
                    .setPort(properties.port())
                    .getJoin().getMulticastConfig().setEnabled(false);
        config.getJetConfig().setEnabled(true);
        if(properties.dnsName() == null) {
            config.setProperty(SOCKET_BIND_ANY.getName(), FALSE.toString());
            config.getNetworkConfig().getInterfaces().setEnabled(true).addInterface(InetAddress.getLoopbackAddress().getHostAddress());
        } else {
            config.setProperty(HEALTH_MONITORING_LEVEL.getName(), OFF.toString());
            config.getNetworkConfig().getJoin().getKubernetesConfig()
                    .setEnabled(true)
                    .setProperty(SERVICE_DNS.key(), properties.dnsName());
        }

        return config;
    }

and

import static com.hazelcast.config.Config.DEFAULT_CLUSTER_NAME;
import static com.hazelcast.config.NetworkConfig.DEFAULT_PORT;
import static de.codecentric.boot.admin.server.config.AdminServerHazelcastAutoConfiguration.DEFAULT_NAME_EVENT_STORE_MAP;
import static de.codecentric.boot.admin.server.config.AdminServerHazelcastAutoConfiguration.DEFAULT_NAME_SENT_NOTIFICATIONS_MAP;

@Validated
@ConfigurationProperties(HazelcastSbaProperties.PREFIX)
public record HazelcastSbaProperties(
        @Nullable String dnsName,
        @Nullable String instanceName,
        @DefaultValue(ENABLED_DEFAULT_VALUE) boolean enabled,
        @Min(0) @DefaultValue(HAZELCAST_DEFAULT_PORT) int port,
        @NotBlank @DefaultValue(DEFAULT_CLUSTER_NAME) String clusterName,
        @NotBlank @DefaultValue(DEFAULT_NAME_EVENT_STORE_MAP) String eventStore,
        @NotBlank @DefaultValue(DEFAULT_NAME_SENT_NOTIFICATIONS_MAP) String sentNotifications
) {
    private static final String ENABLED_DEFAULT_VALUE = "true";
    private static final String HAZELCAST_DEFAULT_PORT = "" + DEFAULT_PORT;

    static final String PREFIX = "spring.boot.admin.hazelcast";
}

where dnsName is set to name of an headless service in OpenShift.
For that, I was following https://docs.hazelcast.com/hazelcast/5.5/kubernetes/kubernetes-auto-discovery#using-kubernetes-in-dns-lookup-mode

Can you please help?

Kind regards and thanks.

Activity

  1. cdprete commented on May 8, 2025

    @cdprete
    ContributorAuthor

    Even worse, the instance stays registered even if it gets recognized that it doesn't exist anymore:

    2025-05-08T11:26:32.159Z INFO 1 --- [Zookeepers Monitoring] [reshExecutor-%d] d.c.b.a.s.c.d.InstanceDiscoveryListener : Instance '8304914b0079' missing in DiscoveryClient services and will be removed.
    2025-05-08T11:26:47.161Z INFO 1 --- [Zookeepers Monitoring] [reshExecutor-%d] d.c.b.a.s.c.d.InstanceDiscoveryListener : Instance '8304914b0079' missing in DiscoveryClient services and will be removed.
    2025-05-08T11:28:26.002Z INFO 1 --- [Zookeepers Monitoring] [or-http-epoll-3] d.c.b.a.s.c.d.InstanceDiscoveryListener : Instance '8304914b0079' missing in DiscoveryClient services and will be removed.

  2. cdprete commented on May 8, 2025

    @cdprete
    ContributorAuthor

    Nevermind.
    It seems like I was missing the eventStore map and this was causing the issue.

    It would be nice if it would have been reported in the logs with a nice error, though. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions