> On Feb. 10, 2016, 7:01 p.m., Sid Wagle wrote: > > ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector, > > line 264 > > <https://reviews.apache.org/r/43278/diff/1/?file=1236943#file1236943line264> > > > > Not sure what happens because of doulbe quotes? The double-quotes is > > still a valid shell expression. Could you please paste the outcome of the > > "ps aux | grep proc_timelineserver | grep ams" to indicate the problem. > > Sid Wagle wrote: > Defnition from ams-env.sh: > > # AMS Collector options > export > AMS_COLLECTOR_OPTS="-Djava.library.path=/usr/lib/ams-hbase/lib/hadoop-native" > {% if security_enabled %} > export AMS_COLLECTOR_OPTS="$AMS_COLLECTOR_OPTS > -Djava.security.auth.login.config={{ams_collector_jaas_config_file}}" > {% endif %}
Thank you for your comments Sid Wagle! And sorry for lack of information. The result of "ps aux | grep proc_timelineserver | grep ams" is as below. ``` [root@c6403 ambari-metrics-collector]# ps aux | grep proc_timelineserver | grep ams ams 4410 1.8 19.1 2676280 368192 ? Sl 04:52 1:10 /usr/jdk64/jdk1.8.0_60/bin/java -Xms512m -Xmx512m -Djava.library.path=/usr/lib/ams-hbase/lib/hadoop-native -XX:+UseConcMarkSweepGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:/var/log/ambari-metrics-collector/collector-gc.log-201602110452 -cp /usr/lib/ambari-metrics-collector/*:/etc/ambari-metrics-collector/conf -Djava.net.preferIPv4Stack=true -Dams.log.dir=/var/log/ambari-metrics-collector -Dproc_timelineserver org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryServer ``` Looks likes it's OK, but actually `-Djava.library.path=/usr/lib/ams-hbase/lib/hadoop-native -XX:+UseConcMarkSweepGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:/var/log/ambari-metrics-collector/collector-gc.log-201602110452` isn't applied properly. the jinfo is as below. ``` [root@c6403 ambari-metrics-collector]# sudo -u ams /usr/jdk64/jdk1.8.0_60/bin/jinfo 4410 Attaching to process ID 4410, please wait... ...(snip)... java.io.tmpdir = /tmp java.vm.specification.vendor = Oracle Corporation os.name = Linux sun.jnu.encoding = UTF-8 java.library.path = /usr/lib/ams-hbase/lib/hadoop-native -XX:+UseConcMarkSweepGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:/var/log/ambari-metrics-collector/collector-gc.log-201602110452 ...(snip)... ``` `java.library.path` should not contain GC options such as -XX:+UseConcMarkSweepGC. This is because of double quotes. In bash script, if you pass a variable which is within double quotes to function, it is considered as one word and is not delimited by space. So in this case, `-Djava.library.path=/usr/lib/ams-hbase/lib/hadoop-native -XX:+UseConcMarkSweepGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:/var/log/ambari-metrics-collector/collector-gc.log-201602110452` is considered as one option. If a variable is passed to function without double quotes, it will be separated by space. - Masahiro ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/43278/#review118709 ----------------------------------------------------------- On Feb. 10, 2016, 11:34 a.m., Masahiro Tanaka wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/43278/ > ----------------------------------------------------------- > > (Updated Feb. 10, 2016, 11:34 a.m.) > > > Review request for Ambari, Dmytro Sen, Jaimin Jetly, jun aoki, Robert Levas, > Sid Wagle, and Yusaku Sako. > > > Bugs: AMBARI-14945 > https://issues.apache.org/jira/browse/AMBARI-14945 > > > Repository: ambari > > > Description > ------- > > It looks like `AMS_COLLECTOR_GC_OPTS` ( which is defined in `ams-env.xml` ) > is interpreted as `java.library.path`. > > This is caused by an initialization script > `/usr/sbin/ambari-metrics-collector`. > > `AMS_COLLECTOR_OPTS` should not be double-quoted. > > > Diffs > ----- > > > ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector > bf2fc47 > > Diff: https://reviews.apache.org/r/43278/diff/ > > > Testing > ------- > > Manually testing done > > > Thanks, > > Masahiro Tanaka > >
