Remote tasks no longer appear on TCA Manager (TCA-M) after upgrade to TCA 2.3.0
search cancel

Remote tasks no longer appear on TCA Manager (TCA-M) after upgrade to TCA 2.3.0


Article ID: 345717


Updated On:


VMware VMware Telco Cloud Automation


This fix will help users restore the remote tasks functionality and prevent the flooding of TCA-CP app logs.

  1. Lower level task updates will no longer show up on TCA-M UI. Eg: During VNF instantiation, as part of the create servers step, we will no longer see an intermediate message like "cloning server <vdu-name>"
  2. TCA Control Plane (TCA-CP) app logs will be flooded with error messages similar to the following:
TCA-CP app log error Snippet:
ERROR c.v.h.s.remote.task.RemoteTaskSync- Unable to send remote tasks for location 20200304090132532-7c4fe304-7790-4f4d-9867-d521fafce26a. Error Error at index 3 in: "643Z"
java.lang.NumberFormatException: Error at index 3 in: "643Z"
 at java.base/java.lang.NumberFormatException.forCharSequence(Unknown Source)
 at java.base/java.lang.Integer.parseInt(Unknown Source)
 at java.sql/java.sql.Timestamp.valueOf(Unknown Source)
 at com.vmware.hybridity.service.remote.task.RemoteTaskSync.getInstantFromString(
 at com.vmware.hybridity.service.remote.task.RemoteTaskSync.getLastSyncTime(
 at com.vmware.hybridity.service.remote.task.RemoteTaskSync.getDataToSend(
 at com.vmware.hybridity.service.remote.task.RemoteTaskSync.sendData(
 at java.base/java.util.concurrent.Executors$ Source)
 at java.base/ Source)
 at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ Source)
 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 at java.base/java.util.concurrent.ThreadPoolExecutor$ Source)
 at java.base/ Source)


VMware Telco Cloud Automation 2.2


This is due to a change in the expected format of the lastSyncTime field in the RemoteTaskStatus table. The RemoteTaskSync job does not expect the format as it was in TCA 2.2.0.


- This issue will be fixed in TCA 3.0.0

- For the existing TCA 2.3.0 environment kindly patch the system using the steps as mentioned in workaround section.


This issue can be resolved by following the steps listed below:

1. Login to TCA-CP shell 

2. Open the PostgreSQL console using the following command:


PGPASSWORD=$(cat /common/pgsql/passwords/tca_admin) psql -U tca_admin -d tca

3. Execute the following command on the PostgreSQL console:

DROP FUNCTION IF EXISTS "remoteTask_getSyncStatus";
CREATE FUNCTION "remoteTask_getSyncStatus"(given jsonb) RETURNS json AS $$
    res json;
    SELECT COALESCE(json_agg(json_strip_nulls(to_json(t)->'val')) FILTER (WHERE is_json_object_not_empty(to_json(t)->'val')), '[]'::json) INTO res
                WHEN (to_jsonb(level1)->'val' 'lastSyncTime')
                THEN jsonb_set(to_jsonb(level1), '{val, lastSyncTime}', to_jsonb(RTRIM(to_jsonb(level1)->'val'->>'lastSyncTime''Z')))->'val'
                ELSE to_jsonb(level1)->'val'
        END as val
        FROM (
            SELECT val
            FROM "RemoteTaskStatus"
            WHERE ( ( NOT( given ? 'location')  or  val->>'location' = given->>'location' )  and  ( NOT( given ? 'status')  or  val->>'status' = given->>'status' ) )
        ) as level1
    ) AS t;
    RETURN res;
LANGUAGE plpgsql;