Support Questions
Find answers, ask questions, and share your expertise

There is an error in installing HDF 3.0.2.0 in HDP 2.6.4.0 cluster. I installed Registry 0.3.0 with "Add Service" and the service does not run due to "ClassNotFoundException" error. How do I install the Schema Registry service?

New Contributor

Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: com.hortonworks.registries.schemaregistry.webservice.RewriteUriFilter at com.hortonworks.registries.webservice.RegistryApplication.addServletFilters(RegistryApplication.java:218) at com.hortonworks.registries.webservice.RegistryApplication.run(RegistryApplication.java:75) at com.hortonworks.registries.webservice.RegistryApplication.run(RegistryApplication.java:58) at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:43) at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:85) at io.dropwizard.cli.Cli.run(Cli.java:75) at io.dropwizard.Application.run(Application.java:79) at com.hortonworks.registries.webservice.RegistryApplication.main(RegistryApplication.java:226) Caused by: java.lang.ClassNotFoundException: com.hortonworks.registries.schemaregistry.webservice.RewriteUriFilter at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.hortonworks.registries.webservice.RegistryApplication.addServletFilters(RegistryApplication.java:213)

1 ACCEPTED SOLUTION

Accepted Solutions

Rising Star

Hi @Changwon Choi ,

As @Jay Kumar SenSharma mentioned the important part was updating the base url first. The problem is that without that update Ambari downloaded the older version of the registry (and other components). You can check this by doing the following on each host that has registry components installed:

1) Confirm that the correct version of registry was installed

yum list info | grep registry

This command should show the installed repositories for registry as shown below:

registry_3_0_2_0_76

If that version is not in the list then perform the following (on each host missing correct version). If it is installed skip to step 2.

a) Verify that /etc/yum.repos.d/ambari-hdp-*.repo has the updated HDF BASE URL (* denotes number 1 or two depending on your setup). If it does not, you will need to manually edit this file to set the correct BASE URL for HDF

b) Install the newest library

yum install -y registry_3_0_2_0_76*

c) Ensure the stack recognizes the latest version

hdf-select set registry 3.0.2.0-76

d) Continue to step 2 to check stack has the appropriate version selected

2) Check the version of the component recognized by the stack:

hdf-select status | grep registry

This should show registry as the following:

registry - 3.0.2.0-76

If the version is not accurate (e.g. showing 3.0.0.0-453) then perform step 1c above and check the version again.

Once the above is performed on all hosts affected, return to Ambari and restart Registry.

One thing to note is that the above can be performed to manual correct other HDF components (e.g. nifi, SAM as well)

Please let me know if this helps!

View solution in original post

5 REPLIES 5

Super Mentor

@Changwon Choi

When you installed the mpack then While running the "install-mpack" command have you used "--purge" option?

# ambari-server install-mpack \
--mpack=/tmp/hdf-ambari-mpack-<version>.tar.gz \
--verbose
--purge

.

Also You should try the following as well:

1. Remove Schema Registry service.

2. Following the steps mentioned in the Doc "Update the HDF Base URL"
https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.0.2/bk_installing-hdf-on-hdp/content/ch_base-ur...

3. Add Schema Registry Service again.

.

New Contributor

I did not include the "--purge" option when I first installed the HDF.

# ambari-server install-mpack --mpack=/tmp/hdf-ambari-mpack-3.0.2.0-76.tar.gz --verbose

You have only deleted the Registry service as you have noticed.

And, I have an error installing it, including the "--purge" option.

# ambari-server install-mpack --mpack=/tmp/hdf-ambari-mpack-3.0.2.0-76.tar.gz --verbose --purge

======= Error Message ===========

ERROR: This Ambari instance is already managing the cluster HDP that has the HDP-2.6 stack installed on it. The management pack you are attempting to install only contains stack definitions for [HDF]. Since this management pack does not contain a stack that has already being deployed by Ambari, the --purge option would cause your existing Ambari installation to be unusable. Due to that we cannot install this management pack. Mpack installation checker failed!

ERROR: Exiting with exit code 1. REASON: This Ambari instance is already managing the cluster HDP that has the HDP-2.6 stack installed on it. The management pack you are attempting to install only contains stack definitions for [HDF]. Since this management pack does not contain a stack that has already being deployed by Ambari, the --purge option would cause your existing Ambari installation to be unusable. Due to that we cannot install this management pack. Mpack installation checker failed!

Rising Star

Hi @Changwon Choi ,

As @Jay Kumar SenSharma mentioned the important part was updating the base url first. The problem is that without that update Ambari downloaded the older version of the registry (and other components). You can check this by doing the following on each host that has registry components installed:

1) Confirm that the correct version of registry was installed

yum list info | grep registry

This command should show the installed repositories for registry as shown below:

registry_3_0_2_0_76

If that version is not in the list then perform the following (on each host missing correct version). If it is installed skip to step 2.

a) Verify that /etc/yum.repos.d/ambari-hdp-*.repo has the updated HDF BASE URL (* denotes number 1 or two depending on your setup). If it does not, you will need to manually edit this file to set the correct BASE URL for HDF

b) Install the newest library

yum install -y registry_3_0_2_0_76*

c) Ensure the stack recognizes the latest version

hdf-select set registry 3.0.2.0-76

d) Continue to step 2 to check stack has the appropriate version selected

2) Check the version of the component recognized by the stack:

hdf-select status | grep registry

This should show registry as the following:

registry - 3.0.2.0-76

If the version is not accurate (e.g. showing 3.0.0.0-453) then perform step 1c above and check the version again.

Once the above is performed on all hosts affected, return to Ambari and restart Registry.

One thing to note is that the above can be performed to manual correct other HDF components (e.g. nifi, SAM as well)

Please let me know if this helps!

View solution in original post

Very helpful response Yolanda. One minor typo - In 1.a) the path is - /etc/yum.repos.d/ambari-hdp-*.repo

For those who are not familiar with yum repo location.

BTW - This solutuion works for me.

Rising Star

Thanks @bsaini, I've made the correction. Glad this worked for you!