F5Networks / f5-appsvcs-extension

F5 BIG-IP Application Services 3 Extension
Apache License 2.0
166 stars 54 forks source link

Failed to send declaration: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY #866

Open kyleklabunde opened 2 months ago

kyleklabunde commented 2 months ago

Environment

Summary

attempting to push out a new as3 declaration results in being unable to complete push out

Steps To Reproduce

Steps to reproduce the behavior:

  1. Submit the following declaration: { "$schema": "https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/master/schema/latest/as3-schema.json", "class": "AS3", "declaration": { "class": "ADC", "schemaVersion": "3.45.0", "target": { "hostname": "loadbalancer1.net.costco.com" },

  2. Observe the following error response: { "id": "c9e48321-fe46-41b2-a708-89748ea958ae", "results": [ { "message": "Failed to send declaration: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 247 path $.results[0].tenant", "dryRun": false, "host": "localhost", "tenant": "application1-wdc", "runTime": 11870, "code": 422 } ], "declaration": { "class": "ADC", "schemaVersion": "3.45.0", "target": { "hostname": "loadbalancer1.net.costco.com" }, "controls": { "class": "Controls", "userAgent": "vscode-f5/3.16.1", "archiveTimestamp": "2024-08-13T16:27:02.684Z" }, "id": "autogen_2dd2a70b-ec23-419a-987e-938d7bd24aff", "updateMode": "selective" }, "selfLink": "https://localhost/mgmt/shared/appsvcs/task/c9e48321-fe46-41b2-a708-89748ea958ae" }

Expected Behavior

expect a 200 Success

Actual Behavior

{ "id": "c9e48321-fe46-41b2-a708-89748ea958ae", "results": [ { "message": "Failed to send declaration: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 247 path $.results[0].tenant", "dryRun": false, "host": "localhost", "tenant": "application1-wdc", "runTime": 11870, "code": 422 } ], "declaration": { "class": "ADC", "schemaVersion": "3.45.0", "target": { "hostname": "loadbalancer1.net.costco.com" }, "controls": { "class": "Controls", "userAgent": "vscode-f5/3.16.1", "archiveTimestamp": "2024-08-13T16:27:02.684Z" }, "id": "autogen_2dd2a70b-ec23-419a-987e-938d7bd24aff", "updateMode": "selective" }, "selfLink": "https://localhost/mgmt/shared/appsvcs/task/c9e48321-fe46-41b2-a708-89748ea958ae" }

kyleklabunde commented 2 months ago

logs from restjavad.0.log

[INFO][13 Aug 2024 09:37:34 PDT][/shared/authn/login AuthnWorker] User admininistraotr successfully logged in from x.x.x.x using the ad authentication provider. [INFO][13 Aug 2024 09:37:36 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Executing step GET_AS3_VERSION [INFO][13 Aug 2024 09:37:36 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] AS3 version found: 3.52.0 [INFO][13 Aug 2024 09:37:36 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Executing step CREATE_TRANSACTION [INFO][13 Aug 2024 09:37:36 PDT][/shared/coordinator/9a81ab73-098d-49ee-b711-8b5fa961cfc3 CoordinationTaskHelperWorker] Sending command tx-start to http://localhost:8100/shared/storage?txid=9a81ab73-098d-49ee-b711-8b5fa961cfc3 [INFO][13 Aug 2024 09:37:36 PDT][/shared/storage StorageWorker] onPatch: {"command":"tx-start"} [INFO][13 Aug 2024 09:37:36 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Started coordination task: 9a81ab73-098d-49ee-b711-8b5fa961cfc3 [INFO][13 Aug 2024 09:37:36 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Executing step GET_DEVICES_ADDRESSES [INFO][13 Aug 2024 09:37:36 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Executing step GET_CLUSTERS [INFO][13 Aug 2024 09:37:37 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Executing step SET_TENANT [INFO][13 Aug 2024 09:37:37 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Executing step SET_TENANT_OBJECTS_FOR_CLUSTER [INFO][13 Aug 2024 09:37:37 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Executing step CHECK_FOR_CREATE_PERMISSIONS [INFO][13 Aug 2024 09:37:37 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Executing step CHECK_FOR_DEVICE_PERMISSION_TO_CREATE_APP [INFO][13 Aug 2024 09:37:37 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Executing step CHECK_FOR_CHANGE_PERMISSIONS [INFO][13 Aug 2024 09:37:37 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Executing step GET_RELEVANT_MANAGEMENT_ROLES [INFO][13 Aug 2024 09:37:37 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Executing step VALIDATE_TEMPLATE [INFO][13 Aug 2024 09:37:37 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Executing step SET_CONFIG_SET [INFO][13 Aug 2024 09:37:37 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Executing step INSTALL_APPSVCS_ON_REMOTE_DEVICE [WARN][13 Aug 2024 09:37:38 PDT][/cm/shared/policymgmt/policy-engine-task/fd898bdf-89c4-4c58-8976-04b4a4668e67/worker PolicyEngineTaskWorker] Unable to connect to the query service to query for open alerts: Connection refused [INFO][13 Aug 2024 09:37:42 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Executing step FORWARD_DECLARATION [ERROR][13 Aug 2024 09:37:46 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Failed monitoring app svcs deployment: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 247 path $.results[0].tenant at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) at com.google.gson.Gson.fromJson(Gson.java:927) at com.google.gson.Gson.fromJson(Gson.java:892) at com.google.gson.Gson.fromJson(Gson.java:841) at com.f5.rest.common.RestOperation.getBody(RestOperation.java:1782) at com.f5.rest.common.RestOperation.getTypedBody(RestOperation.java:1764) at com.f5.rest.workers.global.task.application.appservice.AppSvcsForwardHelper$4.completed(AppSvcsForwardHelper.java:307) at com.f5.rest.workers.global.task.application.appservice.AppSvcsForwardHelper$4.completed(AppSvcsForwardHelper.java:302) at com.f5.rest.common.RestOperation.complete(RestOperation.java:2795) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 247 path $.results[0].tenant at com.google.gson.stream.JsonReader.nextString(JsonReader.java:825) at com.google.gson.internal.bind.TypeAdapters$16.read(TypeAdapters.java:402) at com.google.gson.internal.bind.TypeAdapters$16.read(TypeAdapters.java:390) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) ... 20 more

[ERROR][13 Aug 2024 09:37:46 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 247 path $.results[0].tenant: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 247 path $.results[0].tenant at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) at com.google.gson.Gson.fromJson(Gson.java:927) at com.google.gson.Gson.fromJson(Gson.java:892) at com.google.gson.Gson.fromJson(Gson.java:841) at com.f5.rest.common.RestOperation.getBody(RestOperation.java:1782) at com.f5.rest.common.RestOperation.getTypedBody(RestOperation.java:1764) at com.f5.rest.workers.global.task.application.appservice.AppSvcsForwardHelper$4.completed(AppSvcsForwardHelper.java:307) at com.f5.rest.workers.global.task.application.appservice.AppSvcsForwardHelper$4.completed(AppSvcsForwardHelper.java:302) at com.f5.rest.common.RestOperation.complete(RestOperation.java:2795) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 247 path $.results[0].tenant at com.google.gson.stream.JsonReader.nextString(JsonReader.java:825) at com.google.gson.internal.bind.TypeAdapters$16.read(TypeAdapters.java:402) at com.google.gson.internal.bind.TypeAdapters$16.read(TypeAdapters.java:390) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) ... 20 more

[ERROR][13 Aug 2024 09:37:46 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Failed to send declaration: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 247 path $.results[0].tenant: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 247 path $.results[0].tenant at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) at com.google.gson.Gson.fromJson(Gson.java:927) at com.google.gson.Gson.fromJson(Gson.java:892) at com.google.gson.Gson.fromJson(Gson.java:841) at com.f5.rest.common.RestOperation.getBody(RestOperation.java:1782) at com.f5.rest.common.RestOperation.getTypedBody(RestOperation.java:1764) at com.f5.rest.workers.global.task.application.appservice.AppSvcsForwardHelper$4.completed(AppSvcsForwardHelper.java:307) at com.f5.rest.workers.global.task.application.appservice.AppSvcsForwardHelper$4.completed(AppSvcsForwardHelper.java:302) at com.f5.rest.common.RestOperation.complete(RestOperation.java:2795) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 247 path $.results[0].tenant at com.google.gson.stream.JsonReader.nextString(JsonReader.java:825) at com.google.gson.internal.bind.TypeAdapters$16.read(TypeAdapters.java:402) at com.google.gson.internal.bind.TypeAdapters$16.read(TypeAdapters.java:390) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) ... 20 more

[INFO][13 Aug 2024 09:37:46 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Aborting transaction task: 9a81ab73-098d-49ee-b711-8b5fa961cfc3 [WARN][13 Aug 2024 09:37:46 PDT][/shared/coordinator/9a81ab73-098d-49ee-b711-8b5fa961cfc3 CoordinationTaskHelperWorker] Coordination Task:9a81ab73-098d-49ee-b711-8b5fa961cfc3 has failed [WARN][13 Aug 2024 09:37:46 PDT][/shared/coordinator/9a81ab73-098d-49ee-b711-8b5fa961cfc3 CoordinationTaskHelperWorker] Aborting and rolling back failed coordination task 9a81ab73-098d-49ee-b711-8b5fa961cfc3 (null) [INFO][13 Aug 2024 09:37:46 PDT][/cm/global/config-sets ConfigSetCollectionWorker] Worker handling rollback of task 9a81ab73-098d-49ee-b711-8b5fa961cfc3 [INFO][13 Aug 2024 09:37:46 PDT][/cm/global/tenants TenantCollectionWorker] Worker handling rollback of task 9a81ab73-098d-49ee-b711-8b5fa961cfc3 [INFO][13 Aug 2024 09:37:46 PDT][/shared/coordinator/9a81ab73-098d-49ee-b711-8b5fa961cfc3 CoordinationTaskHelperWorker] Sending command tx-rollback to http://localhost:8100/shared/storage?txid=9a81ab73-098d-49ee-b711-8b5fa961cfc3 [INFO][13 Aug 2024 09:37:46 PDT][/shared/storage StorageWorker] onPatch: {"command":"tx-rollback"} [INFO][13 Aug 2024 09:37:46 PDT][ PgRequestProcessor] logCounters rollback:TX_GET = 1, TX_ROLLBACK = 1, TX_SET = 3, TX_QUERY = 5, TX_COMMIT = 0, TX_START = 1 [INFO][13 Aug 2024 09:37:46 PDT][/shared/coordinator/9a81ab73-098d-49ee-b711-8b5fa961cfc3 CoordinationTaskHelperWorker] Rolled back database transaction: 9a81ab73-098d-49ee-b711-8b5fa961cfc3 [ERROR][13 Aug 2024 09:37:46 PDT][/cm/global/tasks/deploy-app-service/193b9b75-1bdc-4c84-aa27-3ab6f64f09fe/worker AppSvcsDeployTaskWorker] Failed to send declaration: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 247 path $.results[0].tenant