[ https://issues.apache.org/jira/browse/AMBARI-15995?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dmitry Lysnichenko updated AMBARI-15995: ---------------------------------------- Resolution: Fixed Status: Resolved (was: Patch Available) Committed To https://git-wip-us.apache.org/repos/asf/ambari.git 6e46135..8416c0d trunk -> trunk > ambari upgrade fail (upgrade of ambari packages ... not hdp (eu/standard) > upgrade) > ---------------------------------------------------------------------------------- > > Key: AMBARI-15995 > URL: https://issues.apache.org/jira/browse/AMBARI-15995 > Project: Ambari > Issue Type: Bug > Components: ambari-server > Affects Versions: 2.4.0 > Reporter: Dmitry Lysnichenko > Assignee: Dmitry Lysnichenko > Fix For: 2.4.0 > > Attachments: AMBARI-15995.patch > > > Ambari packages upgrade to 2.4.0.0.160. It fails at stage of upgrading ambari > database. > Step of failure > ambari-server upgrade. > 1. It complains about following > [root@host]# ambari-server upgrade > Using python /usr/bin/python > Upgrading ambari-server > Updating properties in ambari.properties ... > WARNING: Can not find ambari.properties.rpmsave file from previous version, > skipping import of settings > WARNING: Can not find ambari-env.sh.rpmsave file from previous version, > skipping restore of environment settings > Fixing database objects owner > Ambari Server configured for Embedded Postgres. Confirm you have made a > backup of the Ambari Server database [y/n] (y)? y > Upgrading database schema > WARNING: Multiple versions of javax.servlet.jsp.jstl.jar found in java class > path (/usr/lib/ambari-server/javax.servlet.jsp.jstl-1.2.2.jar and > /usr/lib/ambari-server/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar). > Make sure that you include only one javax.servlet.jsp.jstl.jar in the java > class path > '/etc/ambari-server/conf:/usr/lib/ambari-server/*:/usr/share/java/postgresql-jdbc.jar'. > So I rename > /usr/lib/ambari-server/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar to > something else and kept only > /usr/lib/ambari-server/javax.servlet.jsp.jstl-1.2.2.jar > 2. After above changes ambari-server upgrade does finishes but throws > following error when trying to start ambari-server. > 06 Apr 2016 15:29:17,518 ERROR [main] AmbariServer:930 - Failed to run the > Ambari Server > javax.persistence.PersistenceException: Exception [EclipseLink-116] (Eclipse > Persistence Services - 2.6.2.v20151217-774c696): > org.eclipse.persistence.exceptions.DescriptorException > Exception Description: No conversion value provided for the value [UPGRADED] > in field [host_version.state]. > Mapping: > org.eclipse.persistence.mappings.DirectToFieldMapping[state-->host_version.state] > Descriptor: > RelationalDescriptor(org.apache.ambari.server.orm.entities.HostVersionEntity > --> [DatabaseTable(host_version)]) > at > org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:484) > at org.apache.ambari.server.orm.dao.DaoUtils.selectList(DaoUtils.java:62) > at org.apache.ambari.server.orm.dao.CrudDAO.findAll(CrudDAO.java:72) > at > org.apache.ambari.server.orm.AmbariLocalSessionInterceptor.invoke(AmbariLocalSessionInterceptor.java:43) > at > org.apache.ambari.server.StateRecoveryManager.checkHostAndClusterVersions(StateRecoveryManager.java:53) > at > org.apache.ambari.server.StateRecoveryManager.doWork(StateRecoveryManager.java:48) > at org.apache.ambari.server.controller.AmbariServer.run(AmbariServer.java:595) > at > org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:928) > Caused by: Exception [EclipseLink-116] (Eclipse Persistence Services - > 2.6.2.v20151217-774c696): > org.eclipse.persistence.exceptions.DescriptorException > Exception Description: No conversion value provided for the value [UPGRADED] > in field [host_version.state]. > Mapping: > org.eclipse.persistence.mappings.DirectToFieldMapping[state-->host_version.state] > Descriptor: > RelationalDescriptor(org.apache.ambari.server.orm.entities.HostVersionEntity > --> [DatabaseTable(host_version)]) > at > org.eclipse.persistence.exceptions.DescriptorException.noFieldValueConversionToAttributeValueProvided(DescriptorException.java:1066) > at > org.eclipse.persistence.mappings.converters.ObjectTypeConverter.convertDataValueToObjectValue(ObjectTypeConverter.java:226) > at > org.eclipse.persistence.mappings.converters.EnumTypeConverter.convertDataValueToObjectValue(EnumTypeConverter.java:141) > at > org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.getObjectValue(AbstractDirectMapping.java:616) > at > org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.valueFromRow(AbstractDirectMapping.java:1220) > at > org.eclipse.persistence.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1539) > at > org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:462) > at > org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:1005) > at > org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneNormally(ObjectBuilder.java:899) > at > org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:852) > at > org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:735) > at > org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:689) > at > org.eclipse.persistence.queries.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:805) > at > org.eclipse.persistence.queries.ReadAllQuery.registerResultInUnitOfWork(ReadAllQuery.java:962) > at > org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:573) > at > org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1175) > at > org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:904) > at > org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1134) > at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:460) > at > org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1222) > at > org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896) > at > org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1857) > at > org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1839) > at > org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804) > at > org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258) > at > org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:473) > Please find ambari-server.log attached with this JIRA. Let me know and I have > the env available to reproduce bug. I am right now in a limbo to upgrade my > cluster to > 1. Upgrade to Ambari 2.4.0.0-169 > 2. Later upgrade to hdp2.5.* -- This message was sent by Atlassian JIRA (v6.3.4#6332)