[ 
https://issues.apache.org/jira/browse/AMBARI-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vitaly Brodetskyi updated AMBARI-18748:
---------------------------------------
    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Committed to trunk, branch-2.4, branch-2.5

> ambari-server upgrade fail (from 2.2.2.0/2.4.0.0/2.4.0.1/2.4.1.0 to 2.4.2.0 )
> -----------------------------------------------------------------------------
>
>                 Key: AMBARI-18748
>                 URL: https://issues.apache.org/jira/browse/AMBARI-18748
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.4.2
>            Reporter: Vitaly Brodetskyi
>            Assignee: Vitaly Brodetskyi
>            Priority: Blocker
>             Fix For: 2.4.2
>
>         Attachments: AMBARI-18748.patch
>
>
> 1)Install old version regarding env. 
> 2)Make ambari only  upgrade
> Actual result: 
> ambari-server upgrade fell  
> {code}
> 2016-10-28 01:20:19,601 ERROR 
> com.hw.ambari.ui.util.cluster_managers.CommandExecutor.executeCommandSequence():
>  *************************Command '[ambari-server upgrade --verbose, ]' 
> failed with exitcode 11 ***************************
> 2016-10-28 01:20:19,603 INFO 
> com.hw.ambari.ui.util.cluster_managers.UpgradeClusterManager.upgrade_schema():
>  Result of ambari-server upgrade command:
> 2016-10-28 01:20:19,603 INFO 
> com.hw.ambari.ui.util.cluster_managers.UpgradeClusterManager.upgrade_schema():
>  [OUTPUT STREAM]
> Using python  /usr/bin/python
> Upgrading ambari-server
> Updating properties in ambari.properties ...
> WARNING: Original file ambari-env.sh kept
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> INFO: No mpack replay logs found. Skipping replaying mpack commands
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> Fixing database objects owner
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> Ambari Server configured for MySQL. Confirm you have made a backup of the 
> Ambari Server database [y/n] (y)? INFO: Loading properties from 
> /etc/ambari-server/conf/ambari.properties
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> Upgrading database schema
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> INFO: AMBARI_SERVER_LIB is not set, using default /usr/lib/ambari-server
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> INFO: about to run command: /usr/lib/jvm/java-7-openjdk-amd64/bin/java -cp 
> '/etc/ambari-server/conf:/usr/lib/ambari-server/*:/usr/share/java/mysql-connector-java.jar'
>  org.apache.ambari.server.upgrade.SchemaUpgradeHelper > 
> /var/log/ambari-server/ambari-server.out 2>&1
> INFO: Return code from schema upgrade command, retcode = 1
> Error output from schema upgrade command:
> Exception in thread "main" org.apache.ambari.server.AmbariException: Entity 
> must be managed to call remove: 
> org.apache.ambari.server.orm.entities.PrincipalEntity@5e81dbde, try merging 
> the detached and try the remove again.
>       at 
> org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:240)
>       at 
> org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:356)
> Caused by: java.lang.IllegalArgumentException: Entity must be managed to call 
> remove: org.apache.ambari.server.orm.entities.PrincipalEntity@5e81dbde, try 
> merging the detached and try the remove again.
>       at 
> org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.performRemove(UnitOfWorkImpl.java:3578)
>       at 
> org.eclipse.persistence.internal.jpa.EntityManagerImpl.remove(EntityManagerImpl.java:574)
>       at 
> org.apache.ambari.server.orm.dao.PrincipalDAO.remove(PrincipalDAO.java:132)
>       at 
> org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:128)
>       at 
> org.apache.ambari.server.upgrade.UpgradeCatalog242.convertRolePrincipals(UpgradeCatalog242.java:213)
>       at 
> org.apache.ambari.server.upgrade.UpgradeCatalog242.executeDMLUpdates(UpgradeCatalog242.java:122)
>       at 
> org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:908)
>       at 
> org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:237)
>       ... 1 more
> ERROR: Error executing schema upgrade, please check the server logs.
> ERROR: Ambari server upgrade failed. Please look at 
> /var/log/ambari-server/ambari-server.log, for more details.
> ERROR: Exiting with exit code 11. 
> REASON: Schema upgrade failed.
> [ERROR STREAM]
> stdin: is not a tty
> [EXIT CODE]
> 11
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to