I'm using Apache ActiveMQ Artemis 2.17.0 in a docker container with a configured database-store in the broker.xml. When starting the container up, the connection to DB is not possible (which is ok in that case). Artemis container throws then the exception
2023-06-12 08:04:30,644 ERROR [org.apache.activemq.artemis.core.server] AMQ224097: Failed to start server: java.lang.IllegalStateException: FAILED TO SETUP the JDBC Shared State NodeId
Still it is able to startup and provides the console. I would have expected that the container then fails and would restart (as configured in the restart policy)
Do I miss something here? Can I force Artemis to shutdown the container on failed DB connection?
See attached log:
2023-06-12 14:31:26,705 ERROR [org.apache.activemq.artemis.core.server] AMQ224097: Failed to start server: java.lang.IllegalStateException: FAILED TO SETUP the JDBC Shared State NodeId
at org.apache.activemq.artemis.core.server.impl.jdbc.JdbcSharedStateManager.setup(JdbcSharedStateManager.java:241) [artemis-server-2.17.0.jar:2.17.0]
at org.apache.activemq.artemis.core.server.impl.jdbc.JdbcNodeManager.start(JdbcNodeManager.java:177) [artemis-server-2.17.0.jar:2.17.0]
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:616) [artemis-server-2.17.0.jar:2.17.0]
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:559) [artemis-server-2.17.0.jar:2.17.0]
at org.apache.activemq.artemis.integration.FileBroker.start(FileBroker.java:64) [artemis-cli-2.17.0.jar:2.17.0]
at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:115) [artemis-cli-2.17.0.jar:2.17.0]
at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:154) [artemis-cli-2.17.0.jar:2.17.0]
at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:102) [artemis-cli-2.17.0.jar:2.17.0]
at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:129) [artemis-cli-2.17.0.jar:2.17.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_282]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_282]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_282]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_282]
at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:134) [artemis-boot.jar:2.17.0]
at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:50) [artemis-boot.jar:2.17.0]
2023-06-12 14:31:32,427 INFO [org.apache.activemq.hawtio.branding.PluginContextListener] Initialized activemq-branding plugin
2023-06-12 14:31:32,465 INFO [org.apache.activemq.hawtio.plugin.PluginContextListener] Initialized artemis-plugin plugin
2023-06-12 14:31:32,629 INFO [io.hawt.HawtioContextListener] Initialising hawtio services
2023-06-12 14:31:32,642 INFO [io.hawt.system.ConfigManager] Configuration will be discovered via system properties
2023-06-12 14:31:32,644 INFO [io.hawt.jmx.JmxTreeWatcher] Welcome to Hawtio 2.11.0
2023-06-12 14:31:32,650 INFO [io.hawt.web.auth.AuthenticationConfiguration] Starting hawtio authentication filter, JAAS realm: "activemq" authorized role(s): "amq" role principal classes: "org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal"
2023-06-12 14:31:32,660 INFO [io.hawt.web.proxy.ProxyServlet] Proxy servlet is disabled
2023-06-12 14:31:32,665 INFO [io.hawt.web.servlets.JolokiaConfiguredAgentServlet] Jolokia overridden property: [key=policyLocation, value=file:/var/lib/artemis-instance/./etc/jolokia-access.xml]
2023-06-12 14:31:32,731 INFO [org.apache.activemq.artemis] AMQ241001: HTTP Server started at http://0.0.0.0:8161
2023-06-12 14:31:32,731 INFO [org.apache.activemq.artemis] AMQ241002: Artemis Jolokia REST API available at http://0.0.0.0:8161/console/jolokia
2023-06-12 14:31:32,731 INFO [org.apache.activemq.artemis] AMQ241004: Artemis Console available at http://0.0.0.0:8161/console
Console is available although -> FAILED TO SETUP the JDBC Shared State NodeId