Where to add the configuration file and where to locate the config file.
The ActiveMQ Artemis default installation includes the ARTEMIS_HOME directory where the distribution has been extracted and a broker instance directory containing all the configuration and runtime data, see the installation documentation for further details.
The cluster settings are defined in the the server configuration file broker.xml included in the etc directory of the broker instance, see the cluster documentation for further details.
The ActiveMQ Artemis Core client supports automatic failover for servers with High Availability, see the documentation for further details.
Related
Where in the configuration do you enable/disable authentication for JMX in Artemis? In the artemis.profile file I have -Dcom.sun.management.jmxremote.authenticate=false on two instances of Artemis, one on a local VM and one on a remote VM. The local one doesn't require authentication (such as from JConsole) and will fail if I give is the user/password. The remote instance requires authentication, which accepts the user/password I created when setting up Artemis.
Is there another configuration I'm missing?
ActiveMQ Artemis guards JMX calls using role based authentication that leverages Artemis's JAAS plugin support with the login.config file. This is configured via the authorisation element in the management.xml configuration file and can be used to restrict access to attributes and methods on mbeans.
I deployed Apache Active MQ on my Mac and the Transport connector is as follows.
<transportConnector name="openwire" uri="tcp://localhost:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="amqp" uri="amqp://localhost:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
However, I would like to replace "localhost" by a hostname that I specified in my /etc/hosts. I therefore modified my Transport Connector as follows:
After doing so, I have the following message when starting the broker:
Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
INFO: Broker not available at: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
Obviously, there is a JMX configuration that needs to be done ... but where? There is nothing related to JMX in conf/activemq.xml
Thanks for your help.
Christian
The ActiveMQ installation folder contains a bin dir where there is a file named "env" which has configuration for the JMX endpoints on the JVM that is started to house the broker. You can also place some user specific files in separate locations to control this. There is some documentation on this subject on the ActiveMQ website.
I want to run ActiveMQ Artemis (2.10.1) as a Windows Service as a windows service on a Windows Server 2016. I followed the documentation:
On windows you will have the option to run ActiveMQ Artemis as a service. Just use the following command to install it:
$ ./artemis-service.exe install
It works very well as long as I switch user to an account with Administrator rights. However in the project I am working it would be preferable to run the service as a special "service user" account.
When one develops your own Windows service one can use the ServiceProcessInstaller.Account class/property to control which account is used for the service.
I guess this behavior is built into the artemis-service.exe binary and accompanying configuration file, artemis-service.xml.
However I cannot find any documentation or source code for this. Anyone knows?
According to pom.xml during build of Artemis artemis-service.exe is pulled from Maven Repository Artifact winsw what is from WinSW on github. According to its documentation you have to specify the service account in the xml file:
Service account
It is possible to specify the useraccount (and password) that the
service will run as. To do this, specify a element
like this:
<serviceaccount>
<domain>YOURDOMAIN</domain>
<user>useraccount</user>
<password>Pa55w0rd</password>
<allowservicelogon>true</allowservicelogon>
</serviceaccount>
The <allowservicelogon> is optional. If set to true, will
automatically set the "Allow Log On As A Service" right to the listed
account.
Someone already tried to do something similar you are triying and opened the issue register service as local service and not system service #121.
I'm trying to enable JMX for my wildfly swarm component. I'm used to seeing several mbeans for a variety of wildfly subsystems, I'm specifically interested in the data source mbeans.
I've pasted a snippet below, I've got the jmx fraction and I have statistics-enabled set to true. When thorntail is running I can connect to the JVM via JMX, but I am cannot see any datasource mbeans. Is there something else that needs to be enabled for them to show up?
The app is currently on swarm 2018.2.0.Final
swarm:
jmx:
expression-expose-model.domain-name: RemoteJMX
jmx-remoting-connector:
use-management-endpoint: true
resolved-expose-model.domain-name: RemoteJMX
show-model: true
datasources:
data-sources:
MyDataSourceName:
driver-name: com.microsoft.sqlserver
connection-url: jdbc:xyz
statistics-enabled: true
First of all, WildFly Swarm 2018.2.0.Final is very old. In the meantime, WildFly Swarm got renamed to Thorntail; you can automatically migrate by running mvn io.thorntail:thorntail-maven-plugin:2.5.0.Final:migrate-from-wildfly-swarm.
And then: if you connect to JMX, do you see any WildFly MBeans at all? I mean, is the problem with datasources only, or is it more general?
During boot, you should see JMX-related log messages, such as JMX not configured for remote access or JMX configured for remote connector: implicitly using ... interface. Do you see any of them?
Finally, it seems you want JMX exposed on the management port. Do you have a dependency on the management fraction?
I'd like to keep track of data that might be stuck in Apache Artemis queues and I'd like to leverage its JMX management abilities together with our Zabbix instance.
What steps do I need to take in order to successfully connect Zabbix to Artemis via JMX? The ones mentioned in https://activemq.apache.org/artemis/docs/latest/management.html are not quite clear to me.
I had to disable the internal connector and go the other way around by adding this to the artemis.profile file:
JAVA_ARGS="$JAVA_ARGS -Dcom.sun.management.jmxremote"
JAVA_ARGS="$JAVA_ARGS -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_ARGS="$JAVA_ARGS -Dcom.sun.management.jmxremote.ssl=false"
JAVA_ARGS="$JAVA_ARGS -Dcom.sun.management.jmxremote.port=1099"
JAVA_ARGS="$JAVA_ARGS -Dcom.sun.management.jmxremote.rmi.port=1098"
JAVA_ARGS="$JAVA_ARGS -Djava.rmi.server.hostname=edimq-broker-master-az1.dc01.clouedi.local"
However, this way it's anything but secure, I know.
As the documentation states, you need to add this to your management.xml:
<connector connector-port="1099"/>
This will expose a JMX connector on localhost so if you want to be able to access it remotely from another machine on your network (i.e. your Zabbix instance) then you should do something like:
<connector connector-port="1099" connector-host="myhost" />
Also, if you have multiple IP addresses on the machine hosting the broker you'll want to set this system property in the JAVA_ARGS variable in artemis.profile:
-Djava.rmi.server.hostname=myhost
Then point your Zabbix instance at the broker using a url like:
service:jmx:rmi:///jndi/rmi://myhost:1099/jmxrmi
You can see this in action by running the jmx example shipped with Artemis in the examples/features/standard/ directory. Just navigate into that directory and run mvn verify. Running the example will create a broker instance, start the broker instance, and run the client all automatically. After the example runs you can go to into the target/server0 directory and look at all the configuration files to compare them to your own. You can also start broker independently of the example if you wish (by running ./artemis run from the target/server0/bin directory). Once the broker is running you should be able to connect to it with JConsole no problem using a JMX url like this:
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi