I am about to use the latest Docker image of ActiveMQ Artemis 2.40.0 (not Alpine), and it fails right after run with the following error:
$ podman run -ti --name mycontainer --security-opt label=disable -p 61616:61616 -p 8161:8161 --rm apache/activemq-artemis:2.40.0
...
2025-04-07 21:14:35,462 WARN [org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory] Error while calling io_getevents IO: Operation not permitted
java.io.IOException: Error while calling io_getevents IO: Operation not permitted
at org.apache.activemq.artemis.nativo.jlibaio.LibaioContext.blockedPoll(Native Method) ~[activemq-artemis-native-2.0.0.jar:2.0.0]
at org.apache.activemq.artemis.nativo.jlibaio.LibaioContext.poll(LibaioContext.java:368) ~[activemq-artemis-native-2.0.0.jar:2.0.0]
at org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory$PollerThread.run(AIOSequentialFileFactory.java:449) [artemis-journal-2.40.0.jar:2.40.0]
2025-04-07 21:14:35,476 INFO [org.apache.activemq.artemis.core.server] AMQ221034: Waiting indefinitely to obtain primary lock
2025-04-07 21:14:35,477 INFO [org.apache.activemq.artemis.core.server] AMQ221035: Primary Server Obtained primary lock
2025-04-07 21:14:35,480 WARN [org.apache.activemq.artemis.journal] AMQ144010: Critical IO Exception happened: Error while calling io_getevents IO: Operation not permitted
org.apache.activemq.artemis.api.core.ActiveMQException: Error on libaio poll
at org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory$PollerThread.run(AIOSequentialFileFactory.java:452) [artemis-journal-2.40.0.jar:2.40.0]
2025-04-07 21:14:35,481 ERROR [org.apache.activemq.artemis.core.server] AMQ222010: Critical IO Error, shutting down the server. file=Error while calling io_getevents IO: Operation not permitted, message=NULL
org.apache.activemq.artemis.api.core.ActiveMQException: Error on libaio poll
at org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory$PollerThread.run(AIOSequentialFileFactory.java:452) [artemis-journal-2.40.0.jar:2.40.0]
That's is pretty unclear what is that and how to fix. Alpine images work well enough, but I'd like not to use Alpine.
I use Podman version 5.4.0 and Fedora Linux 41.
When I run this Docker command everything works:
$ docker run --name mycontainer -p 61616:61616 -p 8161:8161 --rm apache/activemq-artemis:2.40.0
However, if I run the same with Podman it fails:
$ podman run --name mycontainer -p 61616:61616 -p 8161:8161 --rm apache/activemq-artemis:2.40.0
Creating ActiveMQ Artemis instance at: /var/lib/artemis-instance
Auto tuning journal ...
done! Your system can make 125 writes per millisecond, your journal-buffer-timeout will be 8000
You can now start the broker by executing:
"/var/lib/artemis-instance/bin/artemis" run
Or you can run the broker in the background using:
"/var/lib/artemis-instance/bin/artemis-service" start
_ _ _
/ \ ____| |_ ___ __ __(_) _____
/ _ \| _ \ __|/ _ \ \/ | |/ __/
/ ___ \ | \/ |_/ __/ |\/| | |\___ \
/_/ \_\| \__\____|_| |_|_|/___ /
Apache ActiveMQ Artemis 2.40.0
2025-04-08 18:49:30,951 INFO [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server version 2.40.0
2025-04-08 18:49:31,010 INFO [org.apache.activemq.artemis.core.server] AMQ221000: Primary message broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=data/journal,bindingsDirectory=data/bindings,largeMessagesDirectory=data/large-messages,pagingDirectory=data/paging)
2025-04-08 18:49:31,032 INFO [org.apache.activemq.artemis.core.server] AMQ221012: Using AIO Journal
2025-04-08 18:49:31,072 INFO [org.apache.activemq.artemis.core.server] AMQ221057: Global Max Size is being adjusted to 1/2 of the JVM max size (-Xmx). being defined as 1073741824
2025-04-08 18:49:31,089 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
2025-04-08 18:49:31,090 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
2025-04-08 18:49:31,090 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
2025-04-08 18:49:31,090 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-mqtt-protocol]. Adding protocol support for: MQTT
2025-04-08 18:49:31,090 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-openwire-protocol]. Adding protocol support for: OPENWIRE
2025-04-08 18:49:31,091 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
2025-04-08 18:49:31,112 WARN [org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory] Error while calling io_getevents IO: Operation not permitted
java.io.IOException: Error while calling io_getevents IO: Operation not permitted
at org.apache.activemq.artemis.nativo.jlibaio.LibaioContext.blockedPoll(Native Method) ~[activemq-artemis-native-2.0.0.jar:2.0.0]
at org.apache.activemq.artemis.nativo.jlibaio.LibaioContext.poll(LibaioContext.java:368) ~[activemq-artemis-native-2.0.0.jar:2.0.0]
at org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory$PollerThread.run(AIOSequentialFileFactory.java:449) [artemis-journal-2.40.0.jar:2.40.0]
...
If I go back to 2.37.0 everything works, e.g.:
$ podman run --name mycontainer -p 61616:61616 -p 8161:8161 --rm apache/activemq-artemis:2.37.0
Creating ActiveMQ Artemis instance at: /var/lib/artemis-instance
Auto tuning journal ...
done! Your system can make 0.87 writes per millisecond, your journal-buffer-timeout will be 1152000
You can now start the broker by executing:
"/var/lib/artemis-instance/bin/artemis" run
Or you can run the broker in the background using:
"/var/lib/artemis-instance/bin/artemis-service" start
_ _ _
/ \ ____| |_ ___ __ __(_) _____
/ _ \| _ \ __|/ _ \ \/ | |/ __/
/ ___ \ | \/ |_/ __/ |\/| | |\___ \
/_/ \_\| \__\____|_| |_|_|/___ /
Apache ActiveMQ Artemis 2.37.0
2025-04-08 18:56:07,777 INFO [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server version 2.37.0
2025-04-08 18:56:07,833 INFO [org.apache.activemq.artemis.core.server] AMQ221000: Primary message broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=data/journal,bindingsDirectory=data/bindings,largeMessagesDirectory=data/large-messages,pagingDirectory=data/paging)
2025-04-08 18:56:07,856 INFO [org.apache.activemq.artemis.core.server] AMQ221013: Using NIO Journal
2025-04-08 18:56:07,886 INFO [org.apache.activemq.artemis.core.server] AMQ221057: Global Max Size is being adjusted to 1/2 of the JVM max size (-Xmx). being defined as 1073741824
2025-04-08 18:56:07,899 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
2025-04-08 18:56:07,900 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
2025-04-08 18:56:07,900 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
2025-04-08 18:56:07,900 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-mqtt-protocol]. Adding protocol support for: MQTT
2025-04-08 18:56:07,900 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-openwire-protocol]. Adding protocol support for: OPENWIRE
2025-04-08 18:56:07,900 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
2025-04-08 18:56:07,928 INFO [org.apache.activemq.artemis.core.server] AMQ221034: Waiting indefinitely to obtain primary lock
2025-04-08 18:56:07,929 INFO [org.apache.activemq.artemis.core.server] AMQ221035: Primary Server Obtained primary lock
2025-04-08 18:56:08,003 INFO [org.apache.activemq.artemis.core.server] AMQ221080: Deploying address DLQ supporting [ANYCAST]
2025-04-08 18:56:08,010 INFO [org.apache.activemq.artemis.core.server] AMQ221003: Deploying ANYCAST queue DLQ on address DLQ
2025-04-08 18:56:08,040 INFO [org.apache.activemq.artemis.core.server] AMQ221080: Deploying address ExpiryQueue supporting [ANYCAST]
2025-04-08 18:56:08,040 INFO [org.apache.activemq.artemis.core.server] AMQ221003: Deploying ANYCAST queue ExpiryQueue on address ExpiryQueue
2025-04-08 18:56:08,254 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:61616 for protocols [CORE,MQTT,AMQP,STOMP,HORNETQ,OPENWIRE]
2025-04-08 18:56:08,271 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:5445 for protocols [HORNETQ,STOMP]
2025-04-08 18:56:08,289 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:5672 for protocols [AMQP]
2025-04-08 18:56:08,292 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:1883 for protocols [MQTT]
2025-04-08 18:56:08,295 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:61613 for protocols [STOMP]
2025-04-08 18:56:08,301 INFO [org.apache.activemq.artemis.core.server] AMQ221007: Server is now active
2025-04-08 18:56:08,301 INFO [org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ Artemis Message Broker version 2.37.0 [0.0.0.0, nodeID=213eeb8e-14ab-11f0-831f-024f3c5ba3d8]
2025-04-08 18:56:08,305 INFO [org.apache.activemq.artemis] AMQ241003: Starting embedded web server
2025-04-08 18:56:08,414 INFO [org.apache.activemq.hawtio.branding.PluginContextListener] Initialized activemq-branding plugin
2025-04-08 18:56:08,441 INFO [org.apache.activemq.hawtio.plugin.PluginContextListener] Initialized artemis-plugin plugin
2025-04-08 18:56:08,548 INFO [io.hawt.HawtioContextListener] Initialising hawtio services
2025-04-08 18:56:08,552 INFO [io.hawt.system.ConfigManager] Configuration will be discovered via system properties
2025-04-08 18:56:08,561 INFO [io.hawt.jmx.JmxTreeWatcher] Welcome to Hawtio 2.17.7
2025-04-08 18:56:08,564 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"
2025-04-08 18:56:08,567 INFO [io.hawt.web.auth.LoginRedirectFilter] Hawtio loginRedirectFilter is using 1800 sec. HttpSession timeout
2025-04-08 18:56:08,582 INFO [org.apache.activemq.artemis] AMQ241001: HTTP Server started at http://0.0.0.0:8161
2025-04-08 18:56:08,582 INFO [org.apache.activemq.artemis] AMQ241002: Artemis Jolokia REST API available at http://0.0.0.0:8161/console/jolokia
2025-04-08 18:56:08,582 INFO [org.apache.activemq.artemis] AMQ241004: Artemis Console available at http://0.0.0.0:8161/console
It's worth noting that the broker falling back to NIO instead of using AIO. However, if I go back to 2.35.0 it uses AIO as expected:
$ podman run --name mycontainer -p 61616:61616 -p 8161:8161 --rm apache/activemq-artemis:2.35.0
Creating ActiveMQ Artemis instance at: /var/lib/artemis-instance
Auto tuning journal ...
done! Your system can make 83.33 writes per millisecond, your journal-buffer-timeout will be 12000
You can now start the broker by executing:
"/var/lib/artemis-instance/bin/artemis" run
Or you can run the broker in the background using:
"/var/lib/artemis-instance/bin/artemis-service" start
_ _ _
/ \ ____| |_ ___ __ __(_) _____
/ _ \| _ \ __|/ _ \ \/ | |/ __/
/ ___ \ | \/ |_/ __/ |\/| | |\___ \
/_/ \_\| \__\____|_| |_|_|/___ /
Apache ActiveMQ Artemis 2.35.0
2025-04-08 18:58:23,246 INFO [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server version 2.35.0
2025-04-08 18:58:23,300 INFO [org.apache.activemq.artemis.core.server] AMQ221000: Primary message broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=data/journal,bindingsDirectory=data/bindings,largeMessagesDirectory=data/large-messages,pagingDirectory=data/paging)
2025-04-08 18:58:23,320 INFO [org.apache.activemq.artemis.core.server] AMQ221012: Using AIO Journal
2025-04-08 18:58:23,351 INFO [org.apache.activemq.artemis.core.server] AMQ221057: Global Max Size is being adjusted to 1/2 of the JVM max size (-Xmx). being defined as 1073741824
2025-04-08 18:58:23,365 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
2025-04-08 18:58:23,365 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
2025-04-08 18:58:23,365 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
2025-04-08 18:58:23,365 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-mqtt-protocol]. Adding protocol support for: MQTT
2025-04-08 18:58:23,366 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-openwire-protocol]. Adding protocol support for: OPENWIRE
2025-04-08 18:58:23,366 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
2025-04-08 18:58:23,393 INFO [org.apache.activemq.artemis.core.server] AMQ221034: Waiting indefinitely to obtain primary lock
2025-04-08 18:58:23,393 INFO [org.apache.activemq.artemis.core.server] AMQ221035: Primary Server Obtained primary lock
2025-04-08 18:58:23,448 INFO [org.apache.activemq.artemis.core.server] AMQ221080: Deploying address DLQ supporting [ANYCAST]
2025-04-08 18:58:23,459 INFO [org.apache.activemq.artemis.core.server] AMQ221003: Deploying ANYCAST queue DLQ on address DLQ
2025-04-08 18:58:23,484 INFO [org.apache.activemq.artemis.core.server] AMQ221080: Deploying address ExpiryQueue supporting [ANYCAST]
2025-04-08 18:58:23,484 INFO [org.apache.activemq.artemis.core.server] AMQ221003: Deploying ANYCAST queue ExpiryQueue on address ExpiryQueue
2025-04-08 18:58:23,719 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:61616 for protocols [CORE,MQTT,AMQP,STOMP,HORNETQ,OPENWIRE]
2025-04-08 18:58:23,725 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:5445 for protocols [HORNETQ,STOMP]
2025-04-08 18:58:23,741 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:5672 for protocols [AMQP]
2025-04-08 18:58:23,744 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:1883 for protocols [MQTT]
2025-04-08 18:58:23,747 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:61613 for protocols [STOMP]
2025-04-08 18:58:23,761 INFO [org.apache.activemq.artemis.core.server] AMQ221007: Server is now active
2025-04-08 18:58:23,761 INFO [org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ Artemis Message Broker version 2.35.0 [0.0.0.0, nodeID=71fe0044-14ab-11f0-afa3-02bcc4133493]
2025-04-08 18:58:23,765 INFO [org.apache.activemq.artemis] AMQ241003: Starting embedded web server
2025-04-08 18:58:23,879 INFO [org.apache.activemq.hawtio.branding.PluginContextListener] Initialized activemq-branding plugin
2025-04-08 18:58:23,903 INFO [org.apache.activemq.hawtio.plugin.PluginContextListener] Initialized artemis-plugin plugin
2025-04-08 18:58:24,012 INFO [io.hawt.HawtioContextListener] Initialising hawtio services
2025-04-08 18:58:24,015 INFO [io.hawt.system.ConfigManager] Configuration will be discovered via system properties
2025-04-08 18:58:24,022 INFO [io.hawt.jmx.JmxTreeWatcher] Welcome to Hawtio 2.17.7
2025-04-08 18:58:24,024 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"
2025-04-08 18:58:24,027 INFO [io.hawt.web.auth.LoginRedirectFilter] Hawtio loginRedirectFilter is using 1800 sec. HttpSession timeout
2025-04-08 18:58:24,034 INFO [org.apache.activemq.artemis] AMQ241001: HTTP Server started at http://0.0.0.0:8161
2025-04-08 18:58:24,034 INFO [org.apache.activemq.artemis] AMQ241002: Artemis Jolokia REST API available at http://0.0.0.0:8161/console/jolokia
2025-04-08 18:58:24,034 INFO [org.apache.activemq.artemis] AMQ241004: Artemis Console available at http://0.0.0.0:8161/console
The issue appears to be somehow related to ARTEMIS-5055.