I downloaded the zip from https://activemq.apache.org/components/artemis/download/ and unzipped it. Then I ran
artemis.cmd create broker2
I changed to the bin folder of broker2 and ran
artemis.cmd run
I tried it a lot of time, I restarted several times and tried again, I tried as administrator, I ran netstat -anb and verified nothing is running on port 1883, still the result is always:
D:\apache-artemis-2.15.0\bin\broker2\bin>artemis.cmd run
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector$1 (file:/D:/apache-artemis-2.15.0/lib/jaxb-impl-2.2.7.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
_ _ _
/ \ ____| |_ ___ __ __(_) _____
/ _ \| _ \ __|/ _ \ \/ | |/ __/
/ ___ \ | \/ |_/ __/ |\/| | |\___ \
/_/ \_\| \__\____|_| |_|_|/___ /
Apache ActiveMQ Artemis 2.15.0
Sep. 16, 2020 4:00:07 NACHM. java.lang.System$LoggerFinder lambda$accessProvider$0
WARNING: Failed to instantiate LoggerFinder provider; Using default.
2020-09-16 16:00:07,668 INFO [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server
2020-09-16 16:00:08,288 INFO [org.apache.activemq.artemis.core.server] AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=data/journal,bindingsDirectory=data/bindings,largeMessagesDirectory=data/large-messages,pagingDirectory=data/paging)
2020-09-16 16:00:08,312 INFO [org.apache.activemq.artemis.core.server] AMQ221013: Using NIO Journal
2020-09-16 16:00:08,343 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 536.870.912
2020-09-16 16:00:08,363 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
2020-09-16 16:00:08,365 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
2020-09-16 16:00:08,366 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
2020-09-16 16:00:08,367 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-mqtt-protocol]. Adding protocol support for: MQTT
2020-09-16 16:00:08,367 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-openwire-protocol]. Adding protocol support for: OPENWIRE
2020-09-16 16:00:08,368 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
2020-09-16 16:00:08,438 INFO [org.apache.activemq.artemis.core.server] AMQ221034: Waiting indefinitely to obtain live lock
2020-09-16 16:00:08,439 INFO [org.apache.activemq.artemis.core.server] AMQ221035: Live Server Obtained live lock
2020-09-16 16:00:09,607 INFO [org.apache.activemq.artemis.core.server] AMQ221080: Deploying address DLQ supporting [ANYCAST]
2020-09-16 16:00:09,669 INFO [org.apache.activemq.artemis.core.server] AMQ221003: Deploying ANYCAST queue DLQ on address DLQ
2020-09-16 16:00:09,750 INFO [org.apache.activemq.artemis.core.server] AMQ221080: Deploying address ExpiryQueue supporting [ANYCAST]
2020-09-16 16:00:09,774 INFO [org.apache.activemq.artemis.core.server] AMQ221003: Deploying ANYCAST queue ExpiryQueue on address ExpiryQueue
2020-09-16 16:00:10,542 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started NIO Acceptor at 0.0.0.0:61616 for protocols [CORE,MQTT,AMQP,STOMP,HORNETQ,OPENWIRE]
2020-09-16 16:00:10,553 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started NIO Acceptor at 0.0.0.0:5445 for protocols [HORNETQ,STOMP]
2020-09-16 16:00:10,564 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started NIO Acceptor at 0.0.0.0:5672 for protocols [AMQP]
2020-09-16 16:00:10,581 ERROR [org.apache.activemq.artemis.core.server] AMQ224104: Error starting the Acceptor mqtt {scheme=tcp, tcpReceiveBufferSize=1048576, port=1883, host=0.0.0.0, protocols=MQTT, useEpoll=true, tcpSendBufferSize=1048576}
2020-09-16 16:00:10,581 ERROR [org.apache.activemq.artemis.core.server] AMQ224000: Failure in initialisation: java.lang.IllegalStateException: AMQ229230: Failed to bind acceptor mqtt to 0.0.0.0:1883
at org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptor.startServerChannels(NettyAcceptor.java:688) [artemis-server-2.15.0.jar:2.15.0]
at org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptor.start(NettyAcceptor.java:456) [artemis-server-2.15.0.jar:2.15.0]
at org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl.startAcceptors(RemotingServiceImpl.java:313) [artemis-server-2.15.0.jar:2.15.0]
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.completeActivation(ActiveMQServerImpl.java:3090) [artemis-server-2.15.0.jar:2.15.0]
at org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation.run(LiveOnlyActivation.java:78) [artemis-server-2.15.0.jar:2.15.0]
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:603) [artemis-server-2.15.0.jar:2.15.0]
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:530) [artemis-server-2.15.0.jar:2.15.0]
at org.apache.activemq.artemis.integration.FileBroker.start(FileBroker.java:61) [artemis-cli-2.15.0.jar:2.15.0]
at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:90) [artemis-cli-2.15.0.jar:2.15.0]
at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:153) [artemis-cli-2.15.0.jar:2.15.0]
at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:101) [artemis-cli-2.15.0.jar:2.15.0]
at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:128) [artemis-cli-2.15.0.jar:2.15.0]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java.base:]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [java.base:]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java.base:]
at java.base/java.lang.reflect.Method.invoke(Method.java:567) [java.base:]
at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:134) [artemis-boot.jar:2.15.0]
at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:50) [artemis-boot.jar:2.15.0]
Caused by: java.net.BindException: Address already in use: bind
at java.base/sun.nio.ch.Net.bind0(Native Method) [java.base:]
at java.base/sun.nio.ch.Net.bind(Net.java:455) [java.base:]
at java.base/sun.nio.ch.Net.bind(Net.java:447) [java.base:]
at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:219) [java.base:]
at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:134) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:550) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:506) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:491) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:248) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.15.0.jar:2.15.0]
2020-09-16 16:00:10,586 INFO [org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ Artemis Message Broker version 2.15.0 [0.0.0.0, nodeID=edecc73f-f824-11ea-bed7-309c236ea6f2]
2020-09-16 16:00:10,857 INFO [org.apache.activemq.hawtio.branding.PluginContextListener] Initialized activemq-branding plugin
2020-09-16 16:00:10,956 INFO [org.apache.activemq.hawtio.plugin.PluginContextListener] Initialized artemis-plugin plugin
2020-09-16 16:00:11,936 INFO [io.hawt.HawtioContextListener] Initialising hawtio services
2020-09-16 16:00:11,961 INFO [io.hawt.system.ConfigManager] Configuration will be discovered via system properties
2020-09-16 16:00:11,962 INFO [io.hawt.jmx.JmxTreeWatcher] Welcome to hawtio 1.5.12 : http://hawt.io/ : Don't cha wish your console was hawt like me? ;-)
2020-09-16 16:00:11,969 INFO [io.hawt.jmx.UploadManager] Using file upload directory: D:\apache-artemis-2.15.0\bin\broker2\tmp\uploads
2020-09-16 16:00:11,982 INFO [io.hawt.web.AuthenticationFilter] Starting hawtio authentication filter, JAAS realm: "activemq" authorized role(s): "amq" role principal classes: "org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal"
2020-09-16 16:00:12,002 INFO [io.hawt.web.JolokiaConfiguredAgentServlet] Jolokia overridden property: [key=policyLocation, value=file:/D:/apache-artemis-2.15.0/bin/broker2/etc/\jolokia-access.xml]
2020-09-16 16:00:12,229 INFO [io.hawt.web.RBACMBeanInvoker] Using MBean [hawtio:type=security,area=jmx,rank=0,name=HawtioDummyJMXSecurity] for role based access control
2020-09-16 16:00:12,629 INFO [io.hawt.system.ProxyWhitelist] Initial proxy whitelist: [localhost, 127.0.0.1, 192.168.180.120, pc10.procheck24.de, 172.17.2.161, pc10.mshome.net]
2020-09-16 16:00:12,783 INFO [org.apache.activemq.artemis] AMQ241001: HTTP Server started at http://localhost:8161
2020-09-16 16:00:12,784 INFO [org.apache.activemq.artemis] AMQ241002: Artemis Jolokia REST API available at http://localhost:8161/console/jolokia
2020-09-16 16:00:12,785 INFO [org.apache.activemq.artemis] AMQ241004: Artemis Console available at http://localhost:8161/console
2020-09-16 16:00:13,086 INFO [io.hawt.HawtioContextListener] Destroying hawtio services
2020-09-16 16:00:13,088 INFO [io.hawt.web.AuthenticationFilter] Destroying hawtio authentication filter
2020-09-16 16:00:13,234 INFO [org.apache.activemq.hawtio.plugin.PluginContextListener] Destroyed artemis-plugin plugin
2020-09-16 16:00:13,245 INFO [org.apache.activemq.hawtio.branding.PluginContextListener] Destroyed activemq-branding plugin
2020-09-16 16:00:13,263 INFO [org.apache.activemq.artemis.core.server] AMQ221002: Apache ActiveMQ Artemis Message Broker version 2.15.0 [edecc73f-f824-11ea-bed7-309c236ea6f2] stopped, uptime 5.570 seconds
org.apache.activemq.artemis.component.WebTmpCleaner:Unable to read the logging configuration from 'file:../config/logging.properties' (java.io.FileNotFoundException: ..\config\logging.properties (Das System kann den angegebenen Pfad nicht finden))
What is missing to run a broker on a windows machine?
The root "Caused by" is this:
Caused by: java.net.BindException: Address already in use: bind
at java.base/sun.nio.ch.Net.bind0(Native Method) [java.base:]
at java.base/sun.nio.ch.Net.bind(Net.java:455) [java.base:]
at java.base/sun.nio.ch.Net.bind(Net.java:447) [java.base:]
at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:219) [java.base:]
at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:134) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:550) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:506) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:491) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:248) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-all-4.1.48.Final.jar:4.1.48.Final]
at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.15.0.jar:2.15.0]
Here the JVM is working with the OS to bind a server socket to 0.0.0.0:1883. This operation is failing ostensibly because something is already bound to that address & port. This is an environmental issue between the JVM and the OS. It's not something the broker can overcome directly. The only thing you could do from the broker's perspective is to change the port, e.g.:
<acceptor name="mqtt">tcp://0.0.0.0:81883?protocols=MQTT</acceptor>
I have got this problem few times on my development machine (Windows 10).
No application working on port but AMQ could not acquire it.
I have no idea why problem occurred - I could not reproduce it on purpose.
For me restarting Windows has solved the issue.
I has been also trying logging out user as it (I think) it should kill user processes but with no effect.
Maybe there has been some issue with releasing port after improper AMQ closure?
<!-- MQTT Acceptor -->
<acceptor name="mqtt">tcp://0.0.0.0:4785?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true</acceptor>
I changed the port of MQTT in broker2/etc/broker.xml to a random number and it worked, the broker was able to start. I still have no clue why port 1883 was not accessible (I also tried 1884 and it did not work either).
Related
When I run run-nifi.bat it pops up for a split second but then auto closes. I don't really understand this, I just need it for a university class and it hadn't been properly explained, so I'm just trying on my own really.
I get this in my nifi-app.log:
2021-05-29 17:07:30,179 INFO [main] org.apache.nifi.NiFi Launching NiFi...
2021-05-29 17:07:30,450 INFO [main] org.apache.nifi.security.kms.CryptoUtils Determined default nifi.properties path to be 'D:\SYSTEM\Downloads\nifi-1.13.2-bin\nifi-1.13.2\.\conf\nifi.properties'
2021-05-29 17:07:30,454 INFO [main] o.a.nifi.properties.NiFiPropertiesLoader Loaded 188 properties from D:\SYSTEM\Downloads\nifi-1.13.2-bin\nifi-1.13.2\.\conf\nifi.properties
2021-05-29 17:07:30,465 INFO [main] org.apache.nifi.NiFi Loaded 188 properties
2021-05-29 17:07:30,705 INFO [main] org.apache.nifi.BootstrapListener Started Bootstrap Listener, Listening for incoming requests on port 63487
2021-05-29 17:07:30,711 ERROR [main] org.apache.nifi.NiFi Failure to launch NiFi due to java.net.ConnectException: Connection refused: connect
java.net.ConnectException: Connection refused: connect
at java.base/sun.nio.ch.Net.connect0(Native Method)
at java.base/sun.nio.ch.Net.connect(Net.java:576)
at java.base/sun.nio.ch.Net.connect(Net.java:565)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:588)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:333)
at java.base/java.net.Socket.connect(Socket.java:645)
at java.base/java.net.Socket.connect(Socket.java:595)
at org.apache.nifi.BootstrapListener.sendCommand(BootstrapListener.java:102)
at org.apache.nifi.BootstrapListener.start(BootstrapListener.java:74)
at org.apache.nifi.NiFi.<init>(NiFi.java:102)
at org.apache.nifi.NiFi.<init>(NiFi.java:71)
at org.apache.nifi.NiFi.main(NiFi.java:303)
2021-05-29 17:07:30,712 INFO [Thread-0] org.apache.nifi.NiFi Initiating shutdown of Jetty web server...
2021-05-29 17:07:30,712 INFO [Thread-0] org.apache.nifi.NiFi Jetty web server shutdown completed (nicely or otherwise).
I've tried editing the web properties in the config files in case the default was wrong. Right now it's on, but the errors are the same:
nifi.web.http.host=localhost
nifi.web.http.port=9090
nifi.web.http.network.interface.default=
I have Windows 10 Home Edition.
NiFi requires Java 8 or Java 11 to run. So your environment variables should point to the correct directory with Java 8 or Java 11.
Have you tried setting the JAVA_HOME environment variable? I would recommend checking the config files and telling the configs where to find the Java installation
You might be missing URL ACL
Maybe you can try below command:
netsh http add urlacl url=http://computername:port/ user=username
Source: https://serverfault.com/a/246798/191420
I am trying to create a cluster of Artemis Servers. I have two artemis servers with following settings in the broker.xml as discussed in this documentation.
A snippet of broker.xml is as follows
<acceptors>
<!-- Acceptor for every supported protocol -->
<acceptor name="artemis">tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;amqpMinLargeMessageSize=102400;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpDuplicateDetection=true</acceptor>
<!-- AMQP Acceptor. Listens on default AMQP port for AMQP traffic.-->
<acceptor name="amqp">tcp://0.0.0.0:5672?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpMinLargeMessageSize=102400;amqpDuplicateDetection=true</acceptor>
<!-- STOMP Acceptor. -->
<acceptor name="stomp">tcp://0.0.0.0:61613?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=STOMP;useEpoll=true</acceptor>
<!-- HornetQ Compatibility Acceptor. Enables HornetQ Core and STOMP for legacy HornetQ clients. -->
<acceptor name="hornetq">tcp://0.0.0.0:5445?anycastPrefix=jms.queue.;multicastPrefix=jms.topic.;protocols=HORNETQ,STOMP;useEpoll=true</acceptor>
<!-- MQTT Acceptor -->
<acceptor name="mqtt">tcp://0.0.0.0:1883?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true</acceptor>
</acceptors>
I added following to the broker.xml
<connectors>
<connector name="nettyartemis">tcp://localhost:61619</connector>
</connectors>
<discovery-groups>
<discovery-group name="my-discovery-group">
<local-bind-address>172.16.9.3</local-bind-address>
<group-address>231.7.7.7</group-address>
<group-port>9876</group-port>
<refresh-timeout>10000</refresh-timeout>
</discovery-group>
</discovery-groups>
<broadcast-groups>
<broadcast-group name="my-broadcast-group">
<local-bind-address>172.16.9.3</local-bind-address>
<local-bind-port>5432</local-bind-port>
<group-address>231.7.7.7</group-address>
<group-port>9876</group-port>
<broadcast-period>2000</broadcast-period>
<connector-ref>nettyartemis</connector-ref>
</broadcast-group>
</broadcast-groups>
In local-bind-address of discovery-groups I tried using 172.16.19.3, 172.16.19.7 and 172.16.19.8. Now, when I run one server it gives me following WARNING which (I think) means that the broadcast is not started resulting in no cluster.
2020-06-11 17:10:59,277 WARN [org.apache.activemq.artemis.core.server] AMQ222116: unable to start broadcast group my-broadcast-group: java.net.BindException: Cannot assign requested address: Cannot bind
at java.base/java.net.DualStackPlainDatagramSocketImpl.socketBind(Native Method) [java.base:]
at java.base/java.net.DualStackPlainDatagramSocketImpl.bind0(DualStackPlainDatagramSocketImpl.java:84) [java.base:]
at java.base/java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:131) [java.base:
at java.base/java.net.DatagramSocket.bind(DatagramSocket.java:394) [java.base:]
at java.base/java.net.DatagramSocket.<init>(DatagramSocket.java:244) [java.base:]
at java.base/java.net.DatagramSocket.<init>(DatagramSocket.java:301) [java.base:]
at org.apache.activemq.artemis.api.core.UDPBroadcastEndpointFactory$UDPBroadcastEndpoint.openBroadcaster(UDPBroadcastEndpointFactory.java:176) [artemis-core-client-2.13.0.jar:2.13.0]
at org.apache.activemq.artemis.core.server.cluster.impl.BroadcastGroupImpl.start(BroadcastGroupImpl.java:105) [artemis-server-2.13.0.jar:2.13.0]
at org.apache.activemq.artemis.core.server.cluster.ClusterManager.start(ClusterManager.java:262) [artemis-server-2.13.0.jar:2.13.0]
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.initialisePart2(ActiveMQServerImpl.java:2983) [artemis-server-2.13.0.jar:2.13.0]
at org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation.run(LiveOnlyActivation.java:76) [artemis-server-2.13.0.jar:2.13.0]
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:599) [artemis-server-2.13.0.jar:2.13.0]
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:526) [artemis-server-2.13.0.jar:2.13.0]
at org.apache.activemq.artemis.integration.FileBroker.start(FileBroker.java:70) [artemis-cli-2.13.0.jar:2.13.0]
at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:84) [artemis-cli-2.13.0.jar:2.13.0]
at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:153) [artemis-cli-2.13.0.jar:2.13.0]
at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:101) [artemis-cli-2.13.0.jar:2.13.0]
at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:128) [artemis-cli-2.13.0.jar:2.13.0]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java.base:]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [java.base:]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java.base:]
at java.base/java.lang.reflect.Method.invoke(Method.java:567) [java.base:]
at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:134) [artemis-boot.jar:2.13.0]
at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:50) [artemis-boot.jar:2.13.0]
2020-06-11 17:10:59,502 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started NIO Acceptor at 0.0.0.0:61616 for protocols [CORE,MQTT,AMQP,STOMP,HORNETQ,OPENWIRE]
2020-06-11 17:10:59,514 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started NIO Acceptor at 0.0.0.0:5445 for protocols [HORNETQ,STOMP]
Any suggestion why this is happening? I couldn't find any online resources explaining this on internet.
It might help someone else, I found my mistake just after posting this question
local-bind-address. This is the local bind address that the datagram
socket is bound to. If you have multiple network interfaces on your
server, you would specify which one you wish to use for broadcasts by
setting this property. If this property is not specified then the
socket will be bound to the wildcard address, an IP address chosen by
the kernel. This is a UDP specific attribute.
So this is ip address of the system where artemis server is running.
When I tried to connect to Nifi UI using http://localhost:8080/nifi, i am getting below error
org.apache.nifi.web.server.JettyServer Failed to start web server... shutting down.
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:331)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:299)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:235)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:398)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:935)
at org.apache.nifi.NiFi.<init>(NiFi.java:158)
at org.apache.nifi.NiFi.<init>(NiFi.java:72)
at org.apache.nifi.NiFi.main(NiFi.java:297)
2020-02-27 11:51:11,834 INFO [Thread-1] org.apache.nifi.NiFi Initiating shutdown of Jetty web server...
2020-02-27 11:51:11,836 INFO [Thread-1] o.eclipse.jetty.server.AbstractConnector Stopped ServerConnector#355ee205{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2020-02-27 11:51:11,837 INFO [Thread-1] org.eclipse.jetty.server.session node 0 Stopped scavenging
Can anyone suggest what is the cause of this issue?
Nifi version- 1.9.2,installed on windows machine
Here is the nifi status logs,
12:33:16.886 [main] DEBUG org.apache.nifi.bootstrap.NotificationServiceManager - Found 0 service elements
12:33:16.896 [main] INFO org.apache.nifi.bootstrap.NotificationServiceManager - Successfully loaded the following 0 services: []
12:33:16.897 [main] INFO org.apache.nifi.bootstrap.RunNiFi - Registered no Notification Services for Notification Type NIFI_STARTED
12:33:16.897 [main] INFO org.apache.nifi.bootstrap.RunNiFi - Registered no Notification Services for Notification Type NIFI_STOPPED
12:33:16.898 [main] INFO org.apache.nifi.bootstrap.RunNiFi - Registered no Notification Services for Notification Type NIFI_DIED
12:33:16.899 [main] DEBUG org.apache.nifi.bootstrap.Command - Status File:
12:33:16.900 [main] DEBUG org.apache.nifi.bootstrap.Command - Properties: {pid=9724}
Failed to determine if Process 9724 is running; assuming that it is not
12:33:16.902 [main] INFO org.apache.nifi.bootstrap.Command - Apache NiFi is not running
The port use by nifi is already used by another process.
you can change web server port in conf/nifi.properties
I'd like to run two instances of Apache Flink on one machine, under separate unix users.
I already set different ports for jobmanager.rpc.port as well as rest.port, however when trying to start via start-cluster.sh it complains about alreay used addresses:
2019-04-04 13:48:08,218 INFO akka.remote.Remoting - Starting remoting
2019-04-04 13:48:08,226 INFO akka.remote.Remoting - Remoting started; listening on addresses :[akka.tcp://flink-metrics#localhost:43345]
2019-04-04 13:48:08,227 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Actor system started at akka.tcp://flink-metrics#localhost:43345
2019-04-04 13:48:08,233 INFO org.apache.flink.runtime.dispatcher.FileArchivedExecutionGraphStore - Initializing FileArchivedExecutionGraphStore: Storage directory /tmp/executionGraphStore-dd135030-d700-4b52-8bda-4bcb7e0a7b35, expiration time 3600000, maximum
cache size 52428800 bytes.
2019-04-04 13:48:08,269 INFO org.apache.flink.runtime.blob.TransientBlobCache - Created BLOB cache storage directory /tmp/blobStore-2f3c12d2-ae4f-4185-ae41-a4d845d5a3e8
2019-04-04 13:48:08,288 WARN org.apache.flink.configuration.Configuration - Config uses deprecated configuration key 'jobmanager.rpc.address' instead of proper key 'rest.address'
2019-04-04 13:48:08,289 WARN org.apache.flink.configuration.Configuration - Config uses deprecated configuration key 'web.address' instead of proper key 'rest.bind-address'
2019-04-04 13:48:08,290 WARN org.apache.flink.runtime.dispatcher.DispatcherRestEndpoint - Upload directory /tmp/flink-web-30ad01a5-24d0-47d0-b73e-6c9e0a2fab30/flink-web-upload does not exist, or has been deleted externally. Previously uploaded files are no longer available.
2019-04-04 13:48:08,291 INFO org.apache.flink.runtime.dispatcher.DispatcherRestEndpoint - Created directory /tmp/flink-web-30ad01a5-24d0-47d0-b73e-6c9e0a2fab30/flink-web-upload for file uploads.
2019-04-04 13:48:08,295 INFO org.apache.flink.runtime.dispatcher.DispatcherRestEndpoint - Starting rest endpoint.
2019-04-04 13:48:08,786 INFO org.apache.flink.runtime.webmonitor.WebMonitorUtils - Determined location of main cluster component log file: /home/ideventer/system/flink/flink-1.7.2/log/flink-ideventer-standalonesession-1-devsrv-java-1.log
2019-04-04 13:48:08,786 INFO org.apache.flink.runtime.webmonitor.WebMonitorUtils - Determined location of main cluster component stdout file: /home/ideventer/system/flink/flink-1.7.2/log/flink-ideventer-standalonesession-1-devsrv-java-1.out
2019-04-04 13:48:08,949 INFO org.apache.flink.runtime.dispatcher.DispatcherRestEndpoint - Shutting down rest endpoint.
2019-04-04 13:48:08,954 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Shutting StandaloneSessionClusterEntrypoint down with application status FAILED. Diagnostics org.apache.flink.util.FlinkException: Could not create the DispatcherResourceManagerComponent.
at org.apache.flink.runtime.entrypoint.component.AbstractDispatcherResourceManagerComponentFactory.create(AbstractDispatcherResourceManagerComponentFactory.java:242)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runCluster(ClusterEntrypoint.java:215)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.lambda$startCluster$0(ClusterEntrypoint.java:163)
at org.apache.flink.runtime.security.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:30)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:162)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runClusterEntrypoint(ClusterEntrypoint.java:517)
at org.apache.flink.runtime.entrypoint.StandaloneSessionClusterEntrypoint.main(StandaloneSessionClusterEntrypoint.java:65)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at org.apache.flink.shaded.netty4.io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:128)
at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:558)
at org.apache.flink.shaded.netty4.io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1358)
at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:501)
at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:486)
at org.apache.flink.shaded.netty4.io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:1019)
at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel.bind(AbstractChannel.java:254)
at org.apache.flink.shaded.netty4.io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:366)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at java.lang.Thread.run(Thread.java:745)
.
2019-04-04 13:48:08,958 INFO org.apache.flink.runtime.blob.BlobServer - Stopped BLOB server at 0.0.0.0:60277
2019-04-04 13:48:08,959 INFO org.apache.flink.runtime.blob.TransientBlobCache - Shutting down BLOB cache
2019-04-04 13:48:08,970 INFO org.apache.flink.runtime.rpc.akka.AkkaRpcService - Stopping Akka RPC service.
2019-04-04 13:48:08,973 INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Shutting down remote daemon.
2019-04-04 13:48:08,973 INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Shutting down remote daemon.
2019-04-04 13:48:08,975 INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Remote daemon shut down; proceeding with flushing remote transports.
2019-04-04 13:48:08,975 INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Remote daemon shut down; proceeding with flushing remote transports.
2019-04-04 13:48:08,997 INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Remoting shut down.
2019-04-04 13:48:09,010 INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Remoting shut down.
2019-04-04 13:48:09,028 INFO org.apache.flink.runtime.rpc.akka.AkkaRpcService - Stopped Akka RPC service.
2019-04-04 13:48:09,032 ERROR org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Could not start cluster entrypoint StandaloneSessionClusterEntrypoint.
org.apache.flink.runtime.entrypoint.ClusterEntrypointException: Failed to initialize the cluster entrypoint StandaloneSessionClusterEntrypoint.
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:181)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runClusterEntrypoint(ClusterEntrypoint.java:517)
at org.apache.flink.runtime.entrypoint.StandaloneSessionClusterEntrypoint.main(StandaloneSessionClusterEntrypoint.java:65)
Caused by: org.apache.flink.util.FlinkException: Could not create the DispatcherResourceManagerComponent.
at org.apache.flink.runtime.entrypoint.component.AbstractDispatcherResourceManagerComponentFactory.create(AbstractDispatcherResourceManagerComponentFactory.java:242)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runCluster(ClusterEntrypoint.java:215)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.lambda$startCluster$0(ClusterEntrypoint.java:163)
at org.apache.flink.runtime.security.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:30)
at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:162)
... 2 more
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at org.apache.flink.shaded.netty4.io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:128)
at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:558)
at org.apache.flink.shaded.netty4.io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1358)
at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:501)
at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:486)
at org.apache.flink.shaded.netty4.io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:1019)
at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel.bind(AbstractChannel.java:254)
at org.apache.flink.shaded.netty4.io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:366)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at java.lang.Thread.run(Thread.java:745)
What other options must be set so that the second instance can be started?
I haven't tried this myself, but looking through https://ci.apache.org/projects/flink/flink-docs-release-1.7/ops/config.html searching for "port" I find a few places where it says things like "It is recommended to set a range of ports to avoid collisions".
Take a look at taskmanager.rpc.port and metrics.internal.query-service.port for starters. The queryable state and blob server ports might also be a factor -- not sure.
This is my blueprint code.
Internal activemq:queue:x messages work.
External stomp:queue:y messages don't.
<bean id="artemisConnectionFactory"
class="org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory">
<argument value="${activeMq.Uri}" />
<argument value="${activeMq.userName}" />
<argument value="${activeMq.password}" />
</bean>
<bean id="activemq" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory" ref="artemisConnectionFactory" />
</bean>
<bean id="stomp" class="org.apache.camel.component.stomp.StompComponent">
<property name="brokerURL" value="${activeMq.Uri}" />
<property name="login" value="${activeMq.userName}" />
<property name="passcode" value="${activeMq.password}" />
</bean>
I am running Red Hat AMQ 7 and Fuse 7 inside a docker. The internal message queues work fine between services.
With AMQ 6 I was able to send and receive STOMP messages to an embedded broker on 61613 when set up in the activemq.xml
Now I am using the default setup for AMQ 7.0, which has acceptors set up for 0.0.0.0:61616 and 61613, both accepting STOMP protocol.
But the same client code no longer reaches AMQ 7. I'm using the ports exposed and mapped by Docker.
I use this code for the client.
https://github.com/apache/activemq/tree/master/assembly/src/release/examples/stomp/java
Likewise, I could connect as a consumer with AMQ 6 but no longer with AMQ 7.
Any idea?
Edit: Adding info for Justin:
19:10:41.325 INFO [Blueprint Event Dispatcher: 1] Attempting to start CamelContext: ProxyService
19:10:41.326 INFO [Blueprint Event Dispatcher: 1] Apache Camel 2.21.0.fuse-000077-redhat-1 (CamelContext: ProxyService) is starting
19:10:41.326 INFO [Blueprint Event Dispatcher: 1] JMX is enabled
19:10:41.415 INFO [Blueprint Event Dispatcher: 1] StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
19:10:41.682 INFO [Blueprint Event Dispatcher: 1] Route: proxyqueue started and consuming from: activemq://queue:registration?password=xxxxxx&username=admin
19:10:41.683 INFO [Blueprint Event Dispatcher: 1] Route: proxyreplyqueue started and consuming from: stomp://queue:reply?login=admin&passcode=xxxxxx
19:10:41.683 INFO [Blueprint Event Dispatcher: 1] Total 2 routes, of which 2 are started
19:10:41.683 INFO [Blueprint Event Dispatcher: 1] Apache Camel 2.21.0.fuse-000077-redhat-1 (CamelContext: ProxyService) started in 0.358 seconds
Artemis logs
2018-11-28 17:38:24,066 INFO [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server
2018-11-28 17:38:24,286 INFO [org.apache.activemq.artemis.core.server] AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=data/journal,bindingsDirectory=data/bindings,largeMessagesDirectory=data/large-messages,pagingDirectory=data/paging)
2018-11-28 17:38:24,504 INFO [org.apache.activemq.artemis.core.server] AMQ221013: Using NIO Journal
2018-11-28 17:38:24,628 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 1,073,741,824
2018-11-28 17:38:24,687 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
2018-11-28 17:38:24,699 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
2018-11-28 17:38:24,700 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
2018-11-28 17:38:24,700 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-mqtt-protocol]. Adding protocol support for: MQTT
2018-11-28 17:38:24,700 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-openwire-protocol]. Adding protocol support for: OPENWIRE
2018-11-28 17:38:24,701 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
2018-11-28 17:38:24,952 INFO [org.apache.activemq.artemis.core.server] AMQ221034: Waiting indefinitely to obtain live lock
2018-11-28 17:38:24,952 INFO [org.apache.activemq.artemis.core.server] AMQ221035: Live Server Obtained live lock
2018-11-28 17:38:25,335 INFO [org.apache.activemq.artemis.core.server] AMQ221003: Deploying queue DLQ on address DLQ
2018-11-28 17:38:25,511 INFO [org.apache.activemq.artemis.core.server] AMQ221003: Deploying queue ExpiryQueue on address ExpiryQueue
2018-11-28 17:38:26,119 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]
2018-11-28 17:38:26,171 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:5445 for protocols [HORNETQ,STOMP]
2018-11-28 17:38:26,231 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:5672 for protocols [AMQP]
2018-11-28 17:38:26,243 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:1883 for protocols [MQTT]
2018-11-28 17:38:26,250 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:61613 for protocols [STOMP]
2018-11-28 17:38:26,255 INFO [org.apache.activemq.artemis.core.server] AMQ221007: Server is now live
2018-11-28 17:38:26,255 INFO [org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ Artemis Message Broker version 2.6.1.amq-720004-redhat-1 [0.0.0.0, nodeID=a46b729a-f323-11e8-9efc-0242ac120003]
2018-11-28 17:38:26,861 INFO [io.hawt.branding.plugin.PluginContextListener] Initialized hawtio-redhat-fuse-branding plugin
2018-11-28 17:38:26,978 INFO [org.apache.activemq.hawtio.plugin.PluginContextListener] Initialized artemis-plugin plugin
2018-11-28 17:38:27,066 INFO [org.apache.qpid.dispatch.PluginContextListener] Initialized dispatch-hawtio-console plugin
2018-11-28 17:38:27,915 INFO [io.hawt.system.ConfigManager] Configuration will be discovered via system properties
2018-11-28 17:38:27,918 INFO [io.hawt.jmx.JmxTreeWatcher] Welcome to hawtio 1.4.0.redhat-630329 : http://hawt.io/ : Don't cha wish your console was hawt like me? ;-)
2018-11-28 17:38:27,925 INFO [io.hawt.jmx.UploadManager] Using file upload directory: /opt/amq/broker/tmp/uploads
2018-11-28 17:38:27,980 INFO [io.hawt.web.AuthenticationFilter] Starting hawtio authentication filter, JAAS realm: "activemq" authorized role(s): "amq" role principal classes: "org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal"
2018-11-28 17:38:28,068 INFO [io.hawt.web.JolokiaConfiguredAgentServlet] Jolokia overridden property: [key=policyLocation, value=file:/opt/amq/broker/etc/jolokia-access.xml]
2018-11-28 17:38:28,093 INFO [io.hawt.web.RBACMBeanInvoker] Using MBean [hawtio:type=security,area=jmx,rank=0,name=HawtioDummyJMXSecurity] for role based access control
2018-11-28 17:38:28,289 INFO [io.hawt.system.ProxyWhitelist] Initial proxy whitelist: [localhost, 127.0.0.1, 172.18.0.3, 9f81c3ea25d9]
2018-11-28 17:38:28,989 INFO [org.apache.activemq.artemis] AMQ241001: HTTP Server started at http://localhost:8161
2018-11-28 17:38:28,989 INFO [org.apache.activemq.artemis] AMQ241002: Artemis Jolokia REST API available at http://localhost:8161/console/jolokia
2018-11-28 17:38:28,989 INFO [org.apache.activemq.artemis] AMQ241004: Artemis Console available at http://localhost:8161/console
2018-11-28 17:45:54,038 WARN [org.apache.activemq.artemis.core.server] AMQ222067: Connection failure has been detected: AMQ119014: Did not receive data from /127.0.0.1:51052 within the 60,000ms connection TTL. The connection will now be closed. [code=CONNECTION_TIMEDOUT]
2018-11-28 17:45:54,039 WARN [org.apache.activemq.artemis.core.server] AMQ222061: Client connection failed, clearing up resources for session 8bc75a6c-f324-11e8-9efc-0242ac120003
2018-11-28 17:45:54,039 WARN [org.apache.activemq.artemis.core.server] AMQ222107: Cleared up resources for session 8bc75a6c-f324-11e8-9efc-0242ac120003
Extra client code snippet:
String user = env("ACTIVEMQ_USER", "admin");
String password = env("ACTIVEMQ_PASSWORD", "password");
String host = env("ACTIVEMQ_HOST", "10.20.40.20");
int port = Integer.parseInt(env("ACTIVEMQ_PORT", "19999"));
String destination = arg(args, 0, "/queue/reply");
External camel route:
<camel:route id="proxyreplyqueue">
<camel:from uri="stomp:queue:reply?login=admin&passcode=password"/>
<camel:to uri="log:input?showAll=true&level=INFO"/>
<camel:to uri="bean:replyHandlerService"/>
</camel:route>
Internal camel route:
<camel:route id="profproxyqueue">
<camel:from uri="activemq:queue:registration?username=admin&password=xxxxx"/>
<camel:to uri="stomp:queue:stompregister"/>
</camel:route>
Add this to your STOMP acceptor(s) in the Artemis broker.xml file:
anycastPrefix=/queue/;multicastPrefix=/topic/
For example:
<acceptor name="stomp">tcp://host:61613?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=STOMP;useEpoll=true;anycastPrefix=/queue/;multicastPrefix=/topic/</acceptor>
This tell the broker that STOMP messages sent to destinations beginning with /queue/ (like you are using) should be routed using anycast semantics rather than the default multicast semantics.
Ok well maybe there's more to it, but I've been fiddling with this for a week, and am pretty sure it just doesn't work as advertised.
I switched to using "activemq:queue:reply" instead of "stomp:queue:reply", and it's not perfect - but it handles STOMP messages, at least.