"ERROR: value too long for type character varying(256)" and vCenter Server disconnection occurs in Cloud Director
search cancel

"ERROR: value too long for type character varying(256)" and vCenter Server disconnection occurs in Cloud Director

book

Article ID: 373180

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • vCenter Server disconnects from Cloud Director.
  • Within the log file /opt/vmware/vcloud-director/logs/vcloud-container-debug.log a lengthy error similar to the following is seen updating the task_inv table.

Caused by: java.sql.BatchUpdateException: Batch entry 0 /* Method: unknown */ /* Method: unknown */ /* update com.vmware.vcloud.common.model.inventory.TaskInventoryModel */ update task_inv set age=0, task_cancellable='FALSE', task_cancelled='FALSE', completion_date='2024-07-22 06:37:32.225+00', description='VirtualMachine.mountToolsInstaller', error_message='The operation cannot be allowed at the current time because the virtual machine has a question pending:
''msg.cdromdisconnect.locked:The guest operating system has locked the CD-ROM door and is probably using the CD-ROM, which can prevent the guest from recognizing media changes. If possible, eject the CD-ROM from inside the guest before disconnecting.
Disconnect anyway and override the lock?
''.', moref='task-<taskid>', object_moref='vm-<vm-id>.', object_name='<vm-name>', object_type='VirtualMachine', parent_moref=NULL, task_progress=0, result=NULL, result_object_type=NULL, start_timestamp='2024-07-22 06:37:32.147+00', status=2, task_exception=?, vc_id='#######-####-####-####-#######'::uuid where task_inv_id='#######-####-####-####-#######'::uuid was aborted: ERROR: value too long for type character varying(256)

Environment

VMware Cloud Director 10.x

Cause

This issue occurs when an error message with more than 256 characters is generated. The task_inv table has a character limit of 256 for the error_message column. When an attempt is made to write that lengthy error message to the database table it causes the problem.

Resolution

This problem is resolved in Cloud Director 10.5.1.1 and Cloud Director 10.6 which are available for download here.