Skip to content

[BUG]: NullPointerException while using prometheus HTTPServer #14

@kaushalaroraharman

Description

@kaushalaroraharman

What happened?

The uidam-user-management MS has issue noticed in image artifactory-fr.harman.com:5056/docker-snapshot/uidam-user-management:1.6.0

2025-04-16 07:35:03.067 main [] INFO  UidamUserManagementApplication - Started UidamUserManagementApplication in 9.804 seconds (process running for 10.758)
2025-04-16 07:35:03.103 main [] DEBUG ApplicationAvailabilityBean - Application availability state LivenessState changed to CORRECT
2025-04-16 07:35:03.105 main [] DEBUG ApplicationAvailabilityBean - Application availability state ReadinessState changed to ACCEPTING_TRAFFIC
2025-04-16 07:35:12.962 cluster-ClusterId{value='67ff5da68129431de555328f', description='null'}-mongodb:27017 [] DEBUG cluster - Updating cluster description to  {type=STANDALONE, servers=[{address=mongodb:27017, type=STANDALONE, roundTripTime=14.9 ms, state=CONNECTED}]
2025-04-16 07:35:12.962 cluster-ClusterId{value='67ff5da68129431de555328f', description='null'}-mongodb:27017 [] DEBUG cluster - Checking status of mongodb:27017
2025-04-16 07:35:22.971 cluster-ClusterId{value='67ff5da68129431de555328f', description='null'}-mongodb:27017 [] DEBUG cluster - Updating cluster description to  {type=STANDALONE, servers=[{address=mongodb:27017, type=STANDALONE, roundTripTime=12.1 ms, state=CONNECTED}]
2025-04-16 07:35:22.971 cluster-ClusterId{value='67ff5da68129431de555328f', description='null'}-mongodb:27017 [] DEBUG cluster - Checking status of mongodb:27017
2025-04-16 07:35:26.737 hikariConnectionPool housekeeper [] DEBUG HikariPool - hikariConnectionPool - Pool stats (total=3, active=1, idle=2, waiting=0)
2025-04-16 07:35:26.737 hikariConnectionPool housekeeper [] DEBUG HikariPool - hikariConnectionPool - Fill pool skipped, pool has sufficient level or currently being filled.
2025-04-16 07:35:32.981 cluster-ClusterId{value='67ff5da68129431de555328f', description='null'}-mongodb:27017 [] DEBUG cluster - Updating cluster description to  {type=STANDALONE, servers=[{address=mongodb:27017, type=STANDALONE, roundTripTime=9.8 ms, state=CONNECTED}]
2025-04-16 07:35:32.981 cluster-ClusterId{value='67ff5da68129431de555328f', description='null'}-mongodb:27017 [] DEBUG cluster - Checking status of mongodb:27017
2025-04-16 07:35:42.989 cluster-ClusterId{value='67ff5da68129431de555328f', description='null'}-mongodb:27017 [] DEBUG cluster - Updating cluster description to  {type=STANDALONE, servers=[{address=mongodb:27017, type=STANDALONE, roundTripTime=8.0 ms, state=CONNECTED}]
2025-04-16 07:35:42.989 cluster-ClusterId{value='67ff5da68129431de555328f', description='null'}-mongodb:27017 [] DEBUG cluster - Checking status of mongodb:27017
2025-04-16 07:35:50.712 SpringApplicationShutdownHook [] DEBUG ApplicationAvailabilityBean - Application availability state ReadinessState changed from ACCEPTING_TRAFFIC to REFUSING_TRAFFIC
2025-04-16 07:35:50.712 SpringApplicationShutdownHook [] DEBUG AnnotationConfigServletWebServerApplicationContext - Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@46ab18da, started on Wed Apr 16 07:34:53 UTC 2025
2025-04-16 07:35:50.714 SpringApplicationShutdownHook [] DEBUG DefaultLifecycleProcessor - Stopping beans in phase 2147482623
2025-04-16 07:35:50.715 SpringApplicationShutdownHook [] INFO  GracefulShutdown - Commencing graceful shutdown. Waiting for active requests to complete
2025-04-16 07:35:50.718 tomcat-shutdown [] INFO  GracefulShutdown - Graceful shutdown complete
2025-04-16 07:35:50.718 tomcat-shutdown [] DEBUG DefaultLifecycleProcessor - Bean 'webServerGracefulShutdown' completed its stop procedure
2025-04-16 07:35:50.719 SpringApplicationShutdownHook [] DEBUG DefaultLifecycleProcessor - Stopping beans in phase 2147481599
2025-04-16 07:35:50.721 SpringApplicationShutdownHook [] DEBUG DefaultLifecycleProcessor - Bean 'webServerStartStop' completed its stop procedure
2025-04-16 07:35:50.721 SpringApplicationShutdownHook [] DEBUG DefaultLifecycleProcessor - Stopping beans in phase 1073741823
2025-04-16 07:35:50.721 SpringApplicationShutdownHook [] DEBUG DefaultLifecycleProcessor - Bean 'applicationTaskExecutor' completed its stop procedure
2025-04-16 07:35:50.721 SpringApplicationShutdownHook [] DEBUG DefaultLifecycleProcessor - Stopping beans in phase 0
2025-04-16 07:35:50.735 SpringApplicationShutdownHook [] DEBUG DefaultLifecycleProcessor - Bean 'resourceFactory' completed its stop procedure
2025-04-16 07:35:50.735 SpringApplicationShutdownHook [] DEBUG DefaultLifecycleProcessor - Stopping beans in phase -2147483647
2025-04-16 07:35:50.735 SpringApplicationShutdownHook [] DEBUG DefaultLifecycleProcessor - Bean 'springBootLoggingLifecycle' completed its stop procedure
2025-04-16 07:35:50.736 SpringApplicationShutdownHook [] DEBUG connection - Connection pool closed for mongodb:27017
2025-04-16 07:35:50.740 SpringApplicationShutdownHook [] DEBUG ThreadPoolTaskExecutor - Shutting down ExecutorService 'applicationTaskExecutor'
2025-04-16 07:35:50.742 SpringApplicationShutdownHook [] WARN  CommonAnnotationBeanPostProcessor - Destroy method on bean with name 'ignitePostgresDbMetricsExporter' threw an exception
java.lang.NullPointerException: Cannot invoke "io.prometheus.client.exporter.HTTPServer.stop()" because "this.prometheusExportServer" is null
    at com.harman.ignite.sql.postgress.metrics.IgnitePostgresDbMetricsExporter.close(IgnitePostgresDbMetricsExporter.java:193)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMethod.invoke(InitDestroyAnnotationBeanPostProcessor.java:457)
    at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeDestroyMethods(InitDestroyAnnotationBeanPostProcessor.java:415)
    at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeDestruction(InitDestroyAnnotationBeanPostProcessor.java:239)
    at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:202)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:735)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:692)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:1401)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:651)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:1394)
    at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1219)
    at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1180)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.doClose(ServletWebServerApplicationContext.java:179)
    at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1126)
    at org.springframework.boot.SpringApplicationShutdownHook.closeAndWait(SpringApplicationShutdownHook.java:147)
    at java.base/java.lang.Iterable.forEach(Iterable.java:75)
    at org.springframework.boot.SpringApplicationShutdownHook.run(SpringApplicationShutdownHook.java:116)
    at java.base/java.lang.Thread.run(Thread.java:840)
2025-04-16 07:35:50.743 SpringApplicationShutdownHook [] INFO  LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default'
2025-04-16 07:35:50.743 SpringApplicationShutdownHook [] DEBUG SessionFactoryImpl - HHH000031: Closing

Versions

1.1.0

Relevant log output

Logs from fod-env-05: https://nh-fod-argocd.nh.ad.harman.com/applications/argocd/fod-env-05-uidam-user-management?view=tree&conditions=false&resource=

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions