Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

unable to start smarsense activity analyzer

avatar

I am trying to start SmartSense activity analyzer but it is getting fail and logs are also not available for the same.

but I cat activity-analyzer.out and below is error :

nohup: failed to run command ‘/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64/bin/java’: No such file or directory

I have checked java_home and it is : /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64/jre

and cat /etc/smartsense-activity/conf/activity.ini :

[java] home = /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64/jre

then why in activity-analyzer.out this error is coming ?

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Anurag Mishra

If you will make changes to the "" script manually then that is not right because upon restart via Ambari Server , it will be replaced with the default JAVA_HOME setting that ambari server is setting.

export JAVA_HOME={{java_home}}

So please make changes via ambari to make it permanently reflected.

Ambari UI --> SmartSense --> Configs --> Advanced --> Advanced activity-env --> activity-env.sh (Edit the "JAVA_HOME" here)

Replace the following:

 export JAVA_HOME={{java_home}}


With:

 export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64/jre

.

Please check your other hosts if the PATH exists? And check if other processes on the other hosts are using the JRE that you wanted to use or the JDK home that is mentioned in the ambari.properties? (usually the {{java_home}} is taken what is set in the ambari.properties if you do not explicitly make changes to it.)

# ls -l /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64/bin/java
# ls -l /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64/jre/bin/java

.

# grep 'java.home' /etc/ambari-server/conf/ambari.properties
java.home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64

.

https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.0.0/bk_ambari-administration/content/ch_changin...

View solution in original post

3 REPLIES 3

avatar
Master Mentor

@Anurag Mishra

If you will make changes to the "" script manually then that is not right because upon restart via Ambari Server , it will be replaced with the default JAVA_HOME setting that ambari server is setting.

export JAVA_HOME={{java_home}}

So please make changes via ambari to make it permanently reflected.

Ambari UI --> SmartSense --> Configs --> Advanced --> Advanced activity-env --> activity-env.sh (Edit the "JAVA_HOME" here)

Replace the following:

 export JAVA_HOME={{java_home}}


With:

 export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64/jre

.

Please check your other hosts if the PATH exists? And check if other processes on the other hosts are using the JRE that you wanted to use or the JDK home that is mentioned in the ambari.properties? (usually the {{java_home}} is taken what is set in the ambari.properties if you do not explicitly make changes to it.)

# ls -l /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64/bin/java
# ls -l /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64/jre/bin/java

.

# grep 'java.home' /etc/ambari-server/conf/ambari.properties
java.home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64

.

https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.0.0/bk_ambari-administration/content/ch_changin...

avatar

it is starting thanks

avatar
Contributor

Nice explanation @Jay Kumar SenSharma