Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMBARI-26233: Fix ambari-env.sh after jdk upgrade #3873

Open
wants to merge 3 commits into
base: upgrade/jdk-spring-dependencies
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions ambari-agent/conf/unix/ambari-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 6 additions & 1 deletion ambari-server/conf/ambari-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
# 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_JVM_ARGS:=}"
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 "
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"
AMBARI_PID_DIR=/var/run/ambari-server
AMBARI_PASSPHRASE="DEV"
export PYTHONPATH=/usr/lib/ambari-server/lib:$PYTHONPATH
Expand Down
21 changes: 10 additions & 11 deletions ambari-server/conf/unix/ambari-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@
# 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_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

# customize python binary for ambari
# export PYTHON=/usr/bin/python3

: "${AMBARI_JVM_ARGS:=}"
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 "
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"
AMBARI_PID_DIR=/var/run/ambari-server
AMBARI_PASSPHRASE="DEV"
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
# export SERVER_CLASSPATH=/etc/hadoop/conf/secure
2 changes: 1 addition & 1 deletion ambari-server/src/main/python/ambari_server_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down