Support Questions

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

Issue when upgrade HDF2.1.2 to HDF3.0

avatar
Explorer

Hi,

I am having below issue while upgrade HDF2.1.2 to HDF3.0

The issue happens when I am following the instruction as,

https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.0.0/bk_ambari-upgrade/content/ambari_upgrade_gu...

And at the step of

ambari-server upgrade

The exception message is (by the way, also met the bug 82311, and 82561, and have tried to workaround following the release instruction.

INFO: Upgrading database schema INFO: Return code from schema upgrade command, retcode = 1 ERROR: Error executing schema upgrade, please check the server logs. ERROR: Error output from schema upgrade command: ERROR: Exception in thread "main" org.apache.ambari.server.AmbariException: Guice provision errors: 1) Error injecting constructor, org.apache.ambari.server.AmbariException: Unable to parse stack upgrade file at location: /var/lib/ambari-server/resources/stacks/HDF/2.0/upgrades/nonrolling-upgrade-2.0.xml at org.apache.ambari.server.stack.StackManager.<init>(StackManager.java:144) while locating org.apache.ambari.server.stack.StackManager annotated with interface com.google.inject.assistedinject.Assisted at org.apache.ambari.server.api.services.AmbariMetaInfo.init(AmbariMetaInfo.java:261) at org.apache.ambari.server.api.services.AmbariMetaInfo.class(AmbariMetaInfo.java:135)

and,

[org.xml.sax.SAXParseException; systemId: file:/var/lib/ambari-server/resources/stacks/HDF/2.0/upgrades/nonrolling-upgrade-2.0.xml; lineNumber: 24; columnNumber: 22; cvc-complex-type.2.4.a: Invalid content was found starting with element 'downgrade-allowed'. One of '{upgrade-path, order}' is expected.] at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)

I've checked the content of /var/lib/ambari-server/resources/stacks/HDF/2.0/upgrades/nonrolling-upgrade-2.0.xml,

lineNumber:24

<downgrade-allowed>false</downgrade-allowed>

btw, attached the file for troubleshooting.

nonrolling-upgrade-20.xmlnonrolling-upgrade-20.xml

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Rachel Rui Liu

You are getting parsing error:

[org.xml.sax.SAXParseException; systemId: file:/var/lib/ambari-server/resources/stacks/HDF/2.0/upgrades/nonrolling-upgrade-2.0.xml; lineNumber: 24; columnNumber: 22; cvc-complex-type.2.4.a: Invalid content was found starting with element 'downgrade-allowed'. One of '{upgrade-path, order}' is expected.] at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)

Above is basically a parsing error.

.

So to verify the XML "/var/lib/ambari-server/resources/stacks/HDF/2.0/upgrades/nonrolling-upgrade-2.0.xml" OR "/var/lib/ambari-server/resources/stacks/HDF/2.0/upgrades/nonrolling-upgrade-2.1.xml" please do the following:

1. Open the Online XML Parsing URL:

http://www.utilities-online.info/xsdvalidation/#.WVxX39OGPx4

2. Now Paste your XML File "/var/lib/ambari-server/resources/stacks/HDF/2.0/upgrades/nonrolling-upgrade-2.0.xml" OR "/var/lib/ambari-server/resources/stacks/HDF/2.0/upgrades/nonrolling-upgrade-2.1.xml" content there.

3. Ambari validates the amove XML file using the XSD present here: https://github.com/apache/ambari/blob/release-2.5.1/ambari-server/src/main/resources/upgrade-pack.xs...

4. So copy the XSD content and then paste it in the XSD section of the http://www.utilities-online.info/xsdvalidation/#.WVxX39OGPx4 link and then click on "Validate XML against XSD" button and then see the error if your XML is valid or not?

Example: Here i am trying to validate "hdf-ambari-mpack-2.1.2.0-10.tar.gz" based XML file 'nonrolling-upgrade*.xml' against Ambari 2.5 XSD.

18384-parsing-error.png

This error may occur when you try to apply old "hdf-ambari-mpack" (i see you are using hdf-ambari-mpack-2.1.2.0-10.tar.gz), Please try the latest mpack "hdf-ambari-mpack-3.0.0.0-453.tar.gz".

.

http://public-repo-1.hortonworks.com/HDF/centos7/3.x/updates/3.0.0.0/tars/hdf_ambari_mp/hdf-ambari-m...

https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.0.0/bk_release-notes/content/ch_hdf_relnotes.ht...

.

.

As you are upgrading from HDF 2.1 ro HDF3.0 so suspecting that you might have not used the correct mpack tar of "hdf-ambari-mpack-3.0.0.0-453.tar.gz" please double check the same and compare the XML difference on your local filesystem to find out if by any chance the "nonrolling-upgrade-2.1.xml" is not from old version.

View solution in original post

4 REPLIES 4

avatar
Master Mentor

@Rachel Rui Liu

You are getting parsing error:

[org.xml.sax.SAXParseException; systemId: file:/var/lib/ambari-server/resources/stacks/HDF/2.0/upgrades/nonrolling-upgrade-2.0.xml; lineNumber: 24; columnNumber: 22; cvc-complex-type.2.4.a: Invalid content was found starting with element 'downgrade-allowed'. One of '{upgrade-path, order}' is expected.] at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)

Above is basically a parsing error.

.

So to verify the XML "/var/lib/ambari-server/resources/stacks/HDF/2.0/upgrades/nonrolling-upgrade-2.0.xml" OR "/var/lib/ambari-server/resources/stacks/HDF/2.0/upgrades/nonrolling-upgrade-2.1.xml" please do the following:

1. Open the Online XML Parsing URL:

http://www.utilities-online.info/xsdvalidation/#.WVxX39OGPx4

2. Now Paste your XML File "/var/lib/ambari-server/resources/stacks/HDF/2.0/upgrades/nonrolling-upgrade-2.0.xml" OR "/var/lib/ambari-server/resources/stacks/HDF/2.0/upgrades/nonrolling-upgrade-2.1.xml" content there.

3. Ambari validates the amove XML file using the XSD present here: https://github.com/apache/ambari/blob/release-2.5.1/ambari-server/src/main/resources/upgrade-pack.xs...

4. So copy the XSD content and then paste it in the XSD section of the http://www.utilities-online.info/xsdvalidation/#.WVxX39OGPx4 link and then click on "Validate XML against XSD" button and then see the error if your XML is valid or not?

Example: Here i am trying to validate "hdf-ambari-mpack-2.1.2.0-10.tar.gz" based XML file 'nonrolling-upgrade*.xml' against Ambari 2.5 XSD.

18384-parsing-error.png

This error may occur when you try to apply old "hdf-ambari-mpack" (i see you are using hdf-ambari-mpack-2.1.2.0-10.tar.gz), Please try the latest mpack "hdf-ambari-mpack-3.0.0.0-453.tar.gz".

.

http://public-repo-1.hortonworks.com/HDF/centos7/3.x/updates/3.0.0.0/tars/hdf_ambari_mp/hdf-ambari-m...

https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.0.0/bk_release-notes/content/ch_hdf_relnotes.ht...

.

.

As you are upgrading from HDF 2.1 ro HDF3.0 so suspecting that you might have not used the correct mpack tar of "hdf-ambari-mpack-3.0.0.0-453.tar.gz" please double check the same and compare the XML difference on your local filesystem to find out if by any chance the "nonrolling-upgrade-2.1.xml" is not from old version.

avatar
Master Mentor

@Rachel Rui Liu

Good to know that you are able to run the mpack upgrade file now, Without any issue. If you are not facing any issue now then can you please mark this thread as answered by clicking on the "Accept" link.

avatar
Master Mentor

avatar
Explorer

@Jay SenSharma

Thanks very much Jay, you are right.

Because the steps changed a little bit compared to the previous version. I was wondering why I do not need to upgrade the mpack for this version (thought it was merged in ambari-server upgrade step). Then following your reply I found this step is mandatory but in the seperate link before even backup step.

After re-run mpack upgrade step everything works fine for me.