'AttributeError: 'str' object has no attribute 'decode'' 1603 error while upgrading vCenter Server 6.7 with a SQL database and Windows Authentication
search cancel

'AttributeError: 'str' object has no attribute 'decode'' 1603 error while upgrading vCenter Server 6.7 with a SQL database and Windows Authentication

book

Article ID: 305921

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • Upgrading from vCenter Server 6.7.x to vCenter Server 6.7 Update 1 fails with 1603 when using a SQL database and Windows Authentication. In vminst-con.log file, you will see entires similar to:
Traceback (most recent call last):
  File "C:\Program Files\VMware\vCenter Server\vpxd\py\vcdb_update_hci.py", line 326, in <module>
    if not main():
  File "C:\Program Files\VMware\vCenter Server\vpxd\py\vcdb_update_hci.py", line 322, in main
    return doWork(getDBConnection(getConnectionString()))
  File "C:\Program Files\VMware\vCenter Server\vpxd\py\vcdb_update_hci.py", line 142, in getConnectionString
    decodeStr(get_db_pass_symkey(is_windows_authentication())))
  File "C:\Program Files\VMware\vCenter Server\vpxd\py\vcdb_update_hci.py", line 82, in decodeStr
    return inputString.decode(sys.getfilesystemencoding())
AttributeError: 'str' object has no attribute 'decode'
  • Once the update fails, rollback also will fail and vsphere-client service or vsphere-ui service will never start. In vsphere_client_virgo.log file, you will see entires similar to:
[2018-12-04T17:24:59.711-08:00] [ERROR] GiLogServiceListener@ee251b8  org.osgi.service.log.LogService                                   Bundle org.eclipse.virgo.kernel.services_3.7.2.RELEASE, FrameworkEvent ERROR org.osgi.framework.BundleException: The bundle "org.eclipse.virgo.kernel.services_3.7.2.RELEASE [35]" could not be resolved. Reason: Missing Constraint: Import-Package: org.springframework.beans.factory; version="[2.5.6,5.0.0)"
 at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1332)
 at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1316)
 at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:323)
 at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
 at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
 at org.eclipse.osgi.framework.internal.core.StartLevelManager.setBundleSL(StartLevelManager.java:670)
 at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:435)
 at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
 at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
 at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
[2018-12-04T17:34:59.723-08:00] [ERROR] startup-tracker               org.eclipse.virgo.nano.core.internal.StartupTracker               Kernel has failed to start before the timeout of 600 seconds. 
[2018-12-04T17:34:59.726-08:00] [ERROR] startup-tracker               org.eclipse.virgo.medic.eventlog.default                         KE0004E Kernel failed to start within 600 seconds. 


Environment

VMware vCenter Server 6.7.x

Cause

In the case of Windows authentication, the vCenter server installer is unable to determine the database password and hence cannot successfully connect to the database.

Resolution

This issue "AttributeError: 'str' object has no attribute 'decode'" 1603 error while upgrading vCenter Server 6.7 with a SQL database and Windows Authenticationis is resolved in vCenter Server 6.7 U2.
Available at VMware Downloads.

Workaround:
To workaround this issue you can change the SQL authentication mode from Windows to SQL Server prior to starting the update. Please consult the following KB article on how to change vCenter Server database credentials. 

*For more information click here: Changing the vCenter Server database user ID and password (1006482)

Additional Information

Impact/Risks:
Once the upgrade fails the roll back may be incomplete. You will need to revert the vCenter from a backup or snapshot to restore operation.