Hi I've installed Apache Marathon (latest version available on APT repo) on Debian 8.5 (Jessie). The configuration in
/etc/marathon/conf/
works very well for that kind of parameters but how can I change the default -xmx512m parameter?
regards
guenther
As per Marathon documentation Java options including -Xmxvalue is configured using JAVA_OPTS environment variable. You can set JAVA_OPTS for marathon by defining it in /etc/default/marathon like so JAVA_OPTS="-Xmx768m -Xms384m"
Related
quick question; is it possible and reasonable to run different Artemis ActiveMQ versions with different JDK versions?
There are currently two separate Artemis-Services on my VM running different Artemis versions (2.4.0 not cool, I know :/ and 2.16.0).
Now I want to upgrade the 2.16.0 to 2.21.0 which would mean, that I also need a new JDK version. The problem is I still have to provide a customer with the 2.4.0 version.
Can I run the 2.21.0 with JDK 17 and the 2.4.0 still with JDK 8?
The Java-Version seems to be referenced in the artemis-service.xml as %JAVA_HOME% which is a windows environment variable and outputs either JDK 17 or JDK 8.
Could I just switch this variable to a local env, similar to ARTEMIS_INSTANCE in the artemis-service.xml or is this not an intended use?
So the new artemis-service.xml would look something like this:
...
<env name="ARTEMIS_INSTANCE_ETC_URI" value="file:/C:/ApacheMQ/BROKER/etc/"/>
<env name="ARTEMIS_DATA_DIR" value="C:\ApacheMQ\BROKER\data"/>
<env name="JAVA_V17" value="C:\PATH_TO_JDK_17"/>
<logpath>C:\ApacheMQ\BROKER\log</logpath>
<logmode>roll</logmode>
<executable>%JAVA_V17%\bin\java.exe</executable>
...
Obviously one of the JDK versions wouldn't be properly installed but just residing in a folder.
Yes, I know this is more of a dirty workaround, but would it be an option in principle?
Your solution will works, an alternative could be to use the full path to define the executable element, i.e.
<executable>C:\PATH_TO_JDK_17\bin\java.exe</executable>
I searched this forum already, no working answer is found for my case:
I installed java 1.8
I downloaded the binary version of zookeeper-3.5.5 from https://www.apache.org/dist/zookeeper/zookeeper-3.5.5/apache-zookeeper-3.5.5-bin.tar.gz
I changed the zoo_sample.cfg to zoo.cfg, no changes made to the cfg
I tried to start zookeeper as root:
[root#pocdnr1n1 apache-zookeeper-3.5.5-bin]# bin/zkServer.sh start conf/zoo.cfg
I received error in log:
Could not find the main class: org.apache.zookeeper.server.quorum.QuorumPeerMain. Program will exit.
Thanks.
I think I have found the root cause, posting it here for future readers:
The culprit is Java.
I had an old java version on the node, this can be verified by running java -version
In my case the java was 1.6, what I did is to reset the environment to add the new java 1.8 to it:
# export JAVA_HOME=/opt/jdk1.8.0_151
# export JRE_HOME=/opt/jdk1.8.0_151/jre/
# export PATH=$PATH:/opt/jdk1.8.0_151/bin:/opt/jdk1.8.0_151/jre/bin
You should add the PATH to the .bash_profile so that it becomes permanent.
Now after that you run source .bash_profile, now you have set java 1.8 as the default java. again, you can confirm that by running java -version
Run your zookeeper again and it will be started as expected.
The common missings here are:
downloaded the non-binary zookeeper
java is too low (1.6 doesn't work, 1.8 is recommended)
environment should be set to ensure java 1.8 is picked up as default version
I hope this helps.
If you look at ZooKeeper Administrator's Guide - Required Software for 3.5.5 it says:
ZooKeeper runs in Java, release 1.7 or greater (JDK 7 or greater, FreeBSD support requires openjdk7).
which affirms what you found out. Your Java version was too low.
What worked for me was rebuilding with ./gradlew jar -PscalaVersion-2.13.10
I was using kafka straight from source from github.com/apache/kafka and that step was given to me when I cloned a fresh copy of the repo to start from scratch.
I had done a git pull on my old version, so it broke the dependencies, which I forgot I must have at one point installed.
I have two applications: one is JDK 1.6 compatible and another is JDK 1.8 compatible. I need to deploy these two in JBoss-EAP 6.4.
Below are the steps I followed:
1. I created two instances standalone and standalone1 and changed the port number in Linux /opt/jboss/standalone/standalone-full-ha.xml and /opt/jboss/standalone2/standalone-full-ha.xml
2. created two JAVA_HOME and JAVA_HOME1 and changed the path as
/home/app/JDK/jdk1.6.0_26/bin:/home/app/JDK/jre1.8.0_111/bin:/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin**
3. Created two services in /etc/app1 and /etc/app2 and in app1 set the path as JAVA_HOME and in app2 as JAVA_HOME
[ -r /etc/java/java.conf ] && . /etc/java/java.conf
export JAVA_HOME1
But while starting app2 it is not pointing to JDK 1.8; it is pointing to 1.6 and both instances are not starting up. Could you help me on this?
I got it. There is no need of two instances.If we compile the application in jdk1.6 and run in jer1.8 it works.
I am trying to run an application called vdbench on my windows2008R2 which is a VM. However, the application does not have 64 bit support and can be only run with 32 bit version of Java. I am trying to understand if I can install the 32 bit JRE and run the application on the windows2008R2 64 bit server? I tried it but the application is not able to run saying 'java' is not recognized as a program. I am wondering if I need to map my windows2008R2 to run the specific 32bit version of JRE?
You need to do nothing except install the 32-bit JRE / JDK whatever your requirement.
I do this all the time. The only real reason to use the 64-bit version is if you application needs to be able to access more than 4GB of RAM (or some programmatic lib dependency)
Make sure you install the 32-bit version and point the JAVA_HOME environment variable to the install dir so if you install JRE 1.6 it JAVA_HOME should be something like
C:\Program Files (x86)\Java\jre1.6.0_XX
Also, in your Path environment variable add %JAVA_HOME%\bin to its end, this will make all the java executable's available at the command line.
In the case of a JRE you can use an environment variable called JRE_HOME if you want instead of JAVA_HOME.
You can also add -d32 to the JVM options, which should tell the JVM to run in 32-bit mode.
You must install a 32-bit JDK or JRE. Then, add a new system environment variable named EXE4J_JAVA_HOME pointing to the new install dir (there's no need to overwrite the JAVA_HOME env. var.).
I want my jruby 1.6.1 installation to operate with ruby 1.9 mode only. I want to uninstall or surely disable the support for 1.8.7 because I do not want to pull my hair out if I forget to set the environment or the command line parameter somewhere.
And also! I have another JRuby (1.5.1) installation on my machine which I want to keep there in safety using ruby 1.8.7. I would like to have ruby 1.9 compatibility when (and only when) I choose "c:\opt\jruby-1.6.1" as "Ruby platform" in NetBeans, or I set my PATH to include "c:\opt\jruby-1.6.1\bin", and so on.
All words in one: I want to lock my jruby installation to a ruby version regardless of the environment. Or is there a jruby 1.6.1 installer with ruby 1.9 exclusively? If not, why not? Should I even wish for that?
You can specify the JRUBY_OPTS environment variable: JRUBY_OPTS = --1.9
If you do it in your Windows system environment variables it will always apply anywhere a JRuby executable runs.
If you only add it to your Netbeans project properties then you could have it different depending on which configuration you select. e.g. Don't set it for your JRuby 1.5.1 configuration.
You cannot have it change automatically just by changing your PATH environment variable though.