is it possible to start activemq with a configuration file that's not in one of the default locations? - configuration

All right all you activemq guru's out there...
Currently activemq require a configuration file before it runs. It appears from its debug output message:
$ ./activemq start -h
INFO: Using default configuration (you can configure options in one of these file: /etc/default/activemq /home/user_name/.activemqrc)
That you can only put it in one of those two locations. Anybody know if this is the case? Is there some command line parameter to specify its location?
Thanks!
-roger-

Yes, it is possible. Here are 3 possible answers.
If classpath is setup properly:
activemq start xbean:myconfig.xml
activemq start xbean:file:./conf/broker1.xml
Not using the classpath:
activemq start xbean:file:C:/ActiveMQ/conf/broker2.xml
reference:
http://activemq.apache.org/activemq-command-line-tools-reference.html

I have not been able to find the answer to this and I struggled with this myself for a while, but I've found a bit of a workaround. When you use bin/activemq create, you can create a runnable instance that will have its own bin, conf, and data directories. Then you have more control over that runnable insance and the .activemqrc becomes less important.
See this for detail on the create option : http://activemq.apache.org/unix-shell-script.html

Try this:
bin/activemq start xbean:/home/user/activemq.xml
Note that if the xml file includes other files like jetty.xml then it needs to be in that dir also.
If using a recent 5.6 SNAPSHOT you can set the env var ACTIVEMQ_CONF to point to the location where you have the config files

in the /bin/activemq script under # CONFIGURATION # For using instances, you can add or remove any file destinations you'd like.
Be very though since it ignores the others at the first occurrency of a file, read more here
Unix configuration
happy coding !

Related

Change Kubernetes log format to json at create or runtime?

I would like to change the default Kubernetes log format to "json" for system logs at "create" or preferably at "runtime".
The documentation designates the --logging-format=json for this purpose. However, I have been unable to identify what command-line call I would use to specific this flag.
I have tried kube-apiserver and kind cmd-line with no luck so far.
I am currently using Kind, but any reference related to Kube would be fine.
Questions:
Does this need be at "create" for the cluster?
If runtime is ok, what cmd util would I use to change a cluster configuration at runtime?
Do I need to apply a configuration with "kubectl" with a yaml file?

can not find cas.log for apereo/cas 4

I need to configire an apereo/cas in a few of days.
First I build the cas.war 4.2.2 according to https://github.com/apereo/cas-overlay-template. And then I deployed it in tomcat 8.0.36. After I start up the tomcat, I can login by the sample user(casuser: Mellon), but I can't find the cas.log file in tomcat/logs folder and other place by find / -name cas.log.
I have copied the log4j2.xml to /etc/cas/ as per the reference. Besides, I can't any error in tomcat/logs.
Did some one solve this problem or have a clue?
By the way, the log4j2 xml is available at https://github.com/apereo/cas-overlay-template/blob/master/etc/log4j2.xml.
Your log4j file describes where the log should be found. You'll file the location inside a file appender.
Your logging configuration doesn't specify a path so the files are going to end up in whatever the current directory is when you start tomcat or whatever tomcat sets the working directory to. That probably isn't what you want.

Executing mrjob boostrap commands on head-node only

I have a mrjob configuration that includes loading a large file from s3 into HDFS. I would like to include these commands in the configuration file, but it seems that all bootstrap commands execute on all of the nodes in the cluster. This is over-kill and might also create synchronization problems.
Is there some way to include startup commands for the master node only in the mrjob configuration or is the only solution to SSH into the head node after the cluster is up to perform these operations?
Yoav
Well, you could have your steps start with a mapper and set mapred.map.tasks=1 in your jobconf. I've never tried it, but seems like it should work.
Another suggestion:
Use a filesystem or zookeeper for coordination:
if get_exclusive_lock_on_resource(filesystem_path_or_zookeeper_path):
Do the expensive bit
release_lock(filesystem_path_or_zookeeper_path)
if expensive_bit_not_complete():
sleep 10

Supervisord on Fedora configuration error

I am trying to install supervisor on my Fedora 17, using this link as reference:
https://www.digitalocean.com/community/articles/how-to-install-and-manage-supervisor-on-ubuntu-and-debian-vps
It works fine except one trivial problem (I believe).
A simple configuration for our script, saved at /etc/supervisor/conf.d/long_script.conf, would look like so (...)
My problem is, that I have only files/directories:
/etc/supervisord/
/etc/supervisord.conf
I have tried to create conf.d directory under /etc/supervisord/. I have put my config file into /etc/supervisord/conf.d/ and /etc/supervisord/ and also /etc/sueprvisor/.
Despite my effort when issuing command:
supervisortctl reread
I receive:
No config updates to processes
Anyone has a clue what I might be doing wrong? Thanks in advance.
(I'm on Fedora 20) If you look at /etc/supervisord.conf at the bottom you see
[include]
files = supervisord.d/*.ini
So on Fedora your configuration files should end in .ini instead of .conf. I had this same problem and running supervisorctl reread after this detects stuff
There is no need to create a folder specifically for your configuration file, you can specify its path with the -c /path/to/your/file or --configuration=/path/to/your/file option.
Source: http://supervisord.org/running.html

JBoss - Moving the modules directory around

Wondering if it's possible to move the module directory in a JBoss 7 install to a non-default loco.
Does anyone know of a config param to specify where to pick it up?
Kinda like a conf-dir, bin-dir type of thing.
Thanks,
Aaron.
Yes, it's actually possible. As the documentation states, from within the standard launch scripts users are able to manipulate the module path by setting the $JBOSS_MODULEPATH environment variable. (If not set, $JBOSS_MODULEPATH is set to $JBOSS_HOME/modules). The module path is provided to the running process via the -mp command line argument that is set in the standard scripts.