diff --git a/ambari-agent/conf/unix/ambari-env.sh b/ambari-agent/conf/unix/ambari-env.sh index 9b4e3e2ab61..1a7d05e1cba 100644 --- a/ambari-agent/conf/unix/ambari-env.sh +++ b/ambari-agent/conf/unix/ambari-env.sh @@ -16,13 +16,7 @@ # To change a passphrase used by the agent adjust the line below. This value is used when no passphrase is # given through environment variable -AMBARI_JVM_ARGS="$AMBARI_JVM_ARGS --add-opens java.base/java.lang=ALL-UNNAMED " -AMBARI_JVM_ARGS="$AMBARI_JVM_ARGS --add-opens java.base/java.util.regex=ALL-UNNAMED " -AMBARI_JVM_ARGS="$AMBARI_JVM_ARGS --add-opens java.base/java.util=ALL-UNNAMED " -export AMBARI_JVM_ARGS="$AMBARI_JVM_ARGS --add-opens java.base/java.lang.reflect=ALL-UNNAMED " - AMBARI_PASSPHRASE="DEV" -export AMBARI_JVM_ARGS="$AMBARI_JVM_ARGS -Xms512m -Xmx2048m -Djava.security.auth.login.config=$ROOT/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -Dcom.sun.jndi.ldap.connect.pool.protocol=\"plain ssl\" -Dcom.sun.jndi.ldap.connect.pool.maxsize=20 -Dcom.sun.jndi.ldap.connect.pool.timeout=300000" export PATH=$PATH:/var/lib/ambari-agent export PYTHONPATH=/usr/lib/ambari-agent/lib:$PYTHONPATH diff --git a/ambari-server/conf/ambari-env.sh b/ambari-server/conf/ambari-env.sh index 62fee14a5f5..23a2ad250b2 100644 --- a/ambari-server/conf/ambari-env.sh +++ b/ambari-server/conf/ambari-env.sh @@ -12,7 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - AMBARI_PID_DIR=/var/run/ambari-server AMBARI_PASSPHRASE="DEV" export PYTHONPATH=/usr/lib/ambari-server/lib:$PYTHONPATH diff --git a/ambari-server/conf/unix/ambari-env.sh b/ambari-server/conf/unix/ambari-env.sh index d080f46fc70..297eee3df39 100644 --- a/ambari-server/conf/unix/ambari-env.sh +++ b/ambari-server/conf/unix/ambari-env.sh @@ -13,15 +13,31 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Exit immediately if a command exits with a non-zero status +set -e +# Set Ambari passphrase +AMBARI_PASSPHRASE="DEV" +# Set JVM arguments for Ambari +AMBARI_JVM_ARGS="--add-opens java.base/java.lang=ALL-UNNAMED " +AMBARI_JVM_ARGS+="--add-opens java.base/java.util.regex=ALL-UNNAMED " +AMBARI_JVM_ARGS+="--add-opens java.base/java.util=ALL-UNNAMED " +AMBARI_JVM_ARGS+="--add-opens java.base/java.lang.reflect=ALL-UNNAMED " +AMBARI_JVM_ARGS+="-Xms512m -Xmx2048m " +AMBARI_JVM_ARGS+="-Djava.security.auth.login.config=$ROOT/etc/ambari-server/conf/krb5JAASLogin.conf " +AMBARI_JVM_ARGS+="-Djava.security.krb5.conf=/etc/krb5.conf " +AMBARI_JVM_ARGS+="-Djavax.security.auth.useSubjectCredsOnly=false " +AMBARI_JVM_ARGS+="-Dcom.sun.jndi.ldap.connect.pool.protocol=\"plain ssl\" " +AMBARI_JVM_ARGS+="-Dcom.sun.jndi.ldap.connect.pool.maxsize=20 " +AMBARI_JVM_ARGS+="-Dcom.sun.jndi.ldap.connect.pool.timeout=300000" +export AMBARI_JVM_ARGS -AMBARI_PASSHPHRASE="DEV" -export AMBARI_JVM_ARGS="$AMBARI_JVM_ARGS -Xms512m -Xmx2048m -XX:MaxPermSize=128m -Djdk.tls.ephemeralDHKeySize=2048 -Djava.security.auth.login.config=$ROOT/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -Dcom.sun.jndi.ldap.connect.pool.protocol=\"plain ssl\" -Dcom.sun.jndi.ldap.connect.pool.maxsize=20 -Dcom.sun.jndi.ldap.connect.pool.timeout=300000" -export PATH=$PATH:$ROOT/var/lib/ambari-server -export PYTHONPATH=$ROOT/usr/lib/ambari-server/lib:$PYTHONPATH +# Update PATH to include Ambari server directory +export PATH="$PATH:$ROOT/var/lib/ambari-server" -# customize python binary for ambari -# export PYTHON=/usr/bin/python3 +# Set Python path for Ambari server +export PYTHONPATH="/usr/lib/ambari-server/lib:$PYTHONPATH" -# to add additional directory or jar to server classpath use SERVER_CLASSPATH variable -# export SERVER_CLASSPATH=/etc/hadoop/conf/secure +# Additional server classpath can be set using SERVER_CLASSPATH +# Uncomment the following line to add additional directories or jars +# export SERVER_CLASSPATH=/etc/hadoop/conf/secure \ No newline at end of file diff --git a/ambari-server/src/main/python/ambari_server_main.py b/ambari-server/src/main/python/ambari_server_main.py index c68ec8ca3ff..e7218827ac3 100644 --- a/ambari-server/src/main/python/ambari_server_main.py +++ b/ambari-server/src/main/python/ambari_server_main.py @@ -56,7 +56,7 @@ ambari_provider_module_option = "-Dprovider.module.class=" + \ ambari_provider_module + " " -jvm_args = os.getenv('AMBARI_JVM_ARGS', '-Xms512m -Xmx2048m -XX:MaxPermSize=128m') +jvm_args = os.getenv('AMBARI_JVM_ARGS', '-Xms512m -Xmx2048m') ENV_FOREGROUND_KEY = "AMBARI_SERVER_RUN_IN_FOREGROUND" CHECK_DATABASE_HELPER_CMD = "{0} -cp {1} org.apache.ambari.server.checks.DatabaseConsistencyChecker"