Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
avatar

Found in version Ambari 2.4.2.0

Generation of SmartSense bundle fails with following error:

ERROR 2017-02-24 10:52:53,284 shell.py:95 - Execution of command returned 1. Exception in thread "main" java.lang.IllegalArgumentException: Illegal group reference
        at java.util.regex.Matcher.appendReplacement(Matcher.java:857)
        at java.util.regex.Matcher.replaceAll(Matcher.java:955)
        at java.lang.String.replaceAll(String.java:2223)
        at com.hortonworks.smartsense.anonymization.BundleAnonymizer.handleApplyGroupPatternKeyValue(BundleAnonymizer.java:690)
        at com.hortonworks.smartsense.anonymization.BundleAnonymizer.applyGroupPattern(BundleAnonymizer.java:673)
        at com.hortonworks.smartsense.anonymization.BundleAnonymizer.applyPropertyRule(BundleAnonymizer.java:612)
        at com.hortonworks.smartsense.anonymization.BundleAnonymizer.applyRules(BundleAnonymizer.java:393)
        at com.hortonworks.smartsense.anonymization.BundleAnonymizer.anonymizeFolder(BundleAnonymizer.java:291)
        at com.hortonworks.smartsense.anonymization.BundleAnonymizer.anonymizeFolder(BundleAnonymizer.java:259)
        at com.hortonworks.smartsense.anonymization.BundleAnonymizer.anonymizeFolder(BundleAnonymizer.java:224)
        at com.hortonworks.smartsense.anonymization.BundleAnonymizer.anonymize(BundleAnonymizer.java:160)
        at com.hortonworks.smartsense.anonymization.Main.run(Main.java:82)
        at com.hortonworks.smartsense.anonymization.Main.start(Main.java:210)
        at com.hortonworks.smartsense.anonymization.Main.main(Main.java:294)
ERROR 2017-02-24 10:52:53,284 anonymize.py:67 - Execution of script /usr/java/default/bin/java -Xmx2048m -Xms1024m -Dlog.file.name=anonymization.log -Djava.io.tmpdir=/hadoop/smartsense/hst-agent/data/tmp -cp :/etc/hst/conf/:/usr/hdp/share/hst/hst-common/lib/* com.hortonworks.smartsense.anonymization.Main  -m /hadoop/smartsense/hst-agent/data/tmp/master001.dev.company.com-a-00027129-c-00065260_comhdpdev_0_2017-02-24_10-52-04 -c /etc/hst/conf/hst-agent.ini failed
ERROR 2017-02-24 10:52:53,284 anonymize.py:68 - Execution of command returned 1. Exception in thread "main" java.lang.IllegalArgumentException: Illegal group reference
        at java.util.regex.Matcher.appendReplacement(Matcher.java:857)
        at java.util.regex.Matcher.replaceAll(Matcher.java:955)
        at java.lang.String.replaceAll(String.java:2223)
        at com.hortonworks.smartsense.anonymization.BundleAnonymizer.handleApplyGroupPatternKeyValue(BundleAnonymizer.java:690)
        at com.hortonworks.smartsense.anonymization.BundleAnonymizer.applyGroupPattern(BundleAnonymizer.java:673)
        at com.hortonworks.smartsense.anonymization.BundleAnonymizer.applyPropertyRule(BundleAnonymizer.java:612)
        at com.hortonworks.smartsense.anonymization.BundleAnonymizer.applyRules(BundleAnonymizer.java:393)
        at com.hortonworks.smartsense.anonymization.BundleAnonymizer.anonymizeFolder(BundleAnonymizer.java:291)
        at com.hortonworks.smartsense.anonymization.BundleAnonymizer.anonymizeFolder(BundleAnonymizer.java:259)
        at com.hortonworks.smartsense.anonymization.BundleAnonymizer.anonymizeFolder(BundleAnonymizer.java:224)
        at com.hortonworks.smartsense.anonymization.BundleAnonymizer.anonymize(BundleAnonymizer.java:160)
        at com.hortonworks.smartsense.anonymization.Main.run(Main.java:82)
        at com.hortonworks.smartsense.anonymization.Main.start(Main.java:210)
        at com.hortonworks.smartsense.anonymization.Main.main(Main.java:294)
ERROR 2017-02-24 10:52:53,285 AnonymizeBundleCommand.py:62 - Anonymization failed. Please check logs.
Traceback (most recent call last):
  File "/usr/hdp/share/hst/hst-agent/lib/hst_agent/command/AnonymizeBundleCommand.py", line 58, in execute
    context['bundle_dir'] = anonymizer.anonymize(bundle_dir)
  File "/usr/hdp/share/hst/hst-agent/lib/hst_agent/anonymize.py", line 69, in anonymize
    raise Exception("Anonymization failed.")
Exception: Anonymization failed.

Cause: A group Regex exception is happening when the constant REPLACE_PROPERTY_VALUE_PATTERN regex pattern is not able to properly group search the parameter patternStr;

Resolution for the above error:

Option1 (preferred):

Preferred way to upgrade is upgrade Ambari and follow post upgrade procedures as per hortonworks docs

NOTE: Make sure that current Ambari version is lower than 2.4.2.8-2

Option2:

1. Stop Smartsense from Ambari
2. Uninstall smartsense-hst rpm on all nodes 
     rpm -e smartsense-hst
3. Install smartsense-hst rpm on all nodes 
For Centos/Redhat 7:
     rpm -ivh http://private-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.4.2.8-2/smartsense/smartsense-hst...
For  Centos/Redhat 6:
     rpm -ivh http://private-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.4.2.8-2/smartsense/smartsense-hst...    
4. On Ambari Server host run 
    hst add-to-ambari
5. Restart Ambari Server
6. Delete SmartSense service from Ambari if already there
7. Add SmartSense service through Ambari's add service wizard

A great many thanks to @sheetal for providing the solution.

Thanks.

1,611 Views
0 Kudos
Version history
Last update:
‎03-05-2017 06:17 PM
Updated by:
Contributors