Unable to register MBean [HikariDataSource (HikariPool-0)] with key 'dataSource'

后端 未结 7 1653
盖世英雄少女心
盖世英雄少女心 2021-02-01 03:21

I am getting below error in prod mode for (Java8+Oauth2+MySql+Hazelcast+no clustered http sessions) combination. Dev mode has worked fine.

Unable to register MBe         


        
7条回答
  •  囚心锁ツ
    2021-02-01 03:45

    This seems like your application is re-deploying, but when it un-deployed the container did not call the close() or shutdown() method on the HikariDataSource. Spring should have a "destroy" property (or something akin) that can be set for un-deployment.

    Also, make sure that you are using the latest version of HikariCP (2.2.5) if possible, I believe an old version did not unregister MBeans properly.

    EDIT: if you have two WARs in the same VM that need HikariCP, and you want to register MBeans, you need to set each one to use a different poolName. I see it is using the default pool name of HikariPool-0.

提交回复
热议问题