I have setup both azure and layout containers. When trying to call the syncAnalyze api in azure invoice as follows:
curl -v -X POST "http://:8080/formrecognizer/documentModels/prebuilt-invoice:syncAnalyze?api-version=2023-07-31" -H 'accept: /' -H 'Content-Type: application/octet-stream' --data-binary '@/tmp/amazon.jpg'
{"status":"failed","createdDateTime":"2024-10-01T14:29:19Z","lastUpdatedDateTime":"2024-10-01T14:29:19Z","error":{"code":"InternalServerError","message":"An unexpected error occurred.","details":[{"code":"UnexpectedResponseContentTypeFromUpstream","message":"Received unexpected content type from read/layout host service.","target":"1"}]}}
There are no logs in Azure layout container
Logs from Invoice container as follows
VdiErrorCode:UnexpectedResponseContentTypeFromUpstream(132); HttpStatusCode:500; MethodName:ValidBinaryResponse; SourceFilePath:/__w/1/s/src/OnPremises.Common/Handler/FrBaseHandler.cs; SourceLineNumber: 84; DetailMessage:Unexpected response content type: application/json; StackTrace: at Microsoft.CloudAI.Containers.VDI.OnPremises.Common.Handler.FrBaseHandler.ValidBinaryResponse(HttpResponseMessage response)
at Microsoft.CloudAI.Containers.VDI.OnPremises.Common.Handler.Fr30GaUpstreamHandler.PostUpstreamInternalRequest(String modelId, Byte[] stream, ServiceMessage message)
at Microsoft.CloudAI.Containers.VDI.OnPremises.Common.Handler.Fr30GaUpstreamHandler.HandleMessageAsync(ServiceMessage message) SubscriptionId='' RequestId='78762046-6021-41bc-87da-55e37e1bc4a9' Timestamp='' buildVersion='1.2.978.0-20240808.1-d7499e4c2b8a2802977c570508a77efb62dae609' hostId='vs-azure-invoice-785b4b55ff-w26gk' serviceName='formrecognizerinvoice' namespace='vdi' Namesapce='vdi' fileSizeInBytes='200188' processedPageIndex='0' toSecondaryQueue='False' isSubBatchRequest='False' totalPageCount='1' fileType='Jpeg' apiName='invoice-2023-07-31' ocrModelName='2023-07-31' scenario='fr_async_layout' resultNameEnum='UpstreamFRResult' ocrResolution='Standard' errorCode='UnexpectedResponseContentTypeFromUpstream'
fail: formrecognizerinvoice[0]
Failed to process a queue message SubscriptionId='' RequestId='78762046-6021-41bc-87da-55e37e1bc4a9' Timestamp='' buildVersion='1.2.978.0-20240808.1-d7499e4c2b8a2802977c570508a77efb62dae609' hostId='vs-azure-invoice-785b4b55ff-w26gk' serviceName='formrecognizerinvoice' namespace='vdi' Namesapce='vdi' fileSizeInBytes='200188' processedPageIndex='0' toSecondaryQueue='False' isSubBatchRequest='False' totalPageCount='1' fileType='Jpeg' apiName='invoice-2023-07-31' ocrModelName='2023-07-31' scenario='fr_async_layout' resultNameEnum='UpstreamFRResult' ocrResolution='Standard' queueName='onprem-upstream-handler-frinvoice20230731' workItemId='b870a9a0-ab43-4adb-822d-0c2306284101' dequeueCount='1' performanceMetric='OneMessageStayInQueueTime' durationInMs='152' concurrentRequests='2' errorCode='ProcessMessageFailed'
fail: formrecognizerinvoice[0]
VdiErrorCode:UnexpectedResponseContentTypeFromUpstream(132); HttpStatusCode:500; MethodName:ValidBinaryResponse; SourceFilePath:/__w/1/s/src/OnPremises.Common/Handler/FrBaseHandler.cs; SourceLineNumber: 84; DetailMessage:Unexpected response content type: application/json; StackTrace: at Microsoft.CloudAI.Containers.VDI.OnPremises.Common.Handler.FrBaseHandler.ValidBinaryResponse(HttpResponseMessage response)
at Microsoft.CloudAI.Containers.VDI.OnPremises.Common.Handler.Fr30GaUpstreamHandler.PostUpstreamInternalRequest(String modelId, Byte[] stream, ServiceMessage message)
at Microsoft.CloudAI.Containers.VDI.OnPremises.Common.Handler.Fr30GaUpstreamHandler.HandleMessageAsync(ServiceMessage message) SubscriptionId='' RequestId='78762046-6021-41bc-87da-55e37e1bc4a9' Timestamp='' buildVersion='1.2.978.0-20240808.1-d7499e4c2b8a2802977c570508a77efb62dae609' hostId='vs-azure-invoice-785b4b55ff-w26gk' serviceName='formrecognizerinvoice' namespace='vdi' Namesapce='vdi' fileSizeInBytes='200188' processedPageIndex='0' toSecondaryQueue='False' isSubBatchRequest='False' totalPageCount='1' fileType='Jpeg' apiName='invoice-2023-07-31' ocrModelName='2023-07-31' scenario='fr_async_layout' resultNameEnum='UpstreamFRResult' ocrResolution='Standard' errorCode='UnexpectedResponseContentTypeFromUpstream'
fail: formrecognizerinvoice[0]
Failed to process a queue message SubscriptionId='' RequestId='78762046-6021-41bc-87da-55e37e1bc4a9' Timestamp='' buildVersion='1.2.978.0-20240808.1-d7499e4c2b8a2802977c570508a77efb62dae609' hostId='vs-azure-invoice-785b4b55ff-w26gk' serviceName='formrecognizerinvoice' namespace='vdi' Namesapce='vdi' fileSizeInBytes='200188' processedPageIndex='0' toSecondaryQueue='False' isSubBatchRequest='False' totalPageCount='1' fileType='Jpeg' apiName='invoice-2023-07-31' ocrModelName='2023-07-31' scenario='fr_async_layout' resultNameEnum='UpstreamFRResult' ocrResolution='Standard' queueName='onprem-upstream-handler-frinvoice20230731' workItemId='b870a9a0-ab43-4adb-822d-0c2306284101' dequeueCount='2' performanceMetric='OneMessageStayInQueueTime' durationInMs='136' concurrentRequests='2' errorCode='ProcessMessageFailed'
fail: formrecognizerinvoice[0]
VdiErrorCode:UnexpectedResponseContentTypeFromUpstream(132); HttpStatusCode:500; MethodName:ValidBinaryResponse; SourceFilePath:/__w/1/s/src/OnPremises.Common/Handler/FrBaseHandler.cs; SourceLineNumber: 84; DetailMessage:Unexpected response content type: application/json; StackTrace: at Microsoft.CloudAI.Containers.VDI.OnPremises.Common.Handler.FrBaseHandler.ValidBinaryResponse(HttpResponseMessage response)
at Microsoft.CloudAI.Containers.VDI.OnPremises.Common.Handler.Fr30GaUpstreamHandler.PostUpstreamInternalRequest(String modelId, Byte[] stream, ServiceMessage message)
at Microsoft.CloudAI.Containers.VDI.OnPremises.Common.Handler.Fr30GaUpstreamHandler.HandleMessageAsync(ServiceMessage message) SubscriptionId='' RequestId='78762046-6021-41bc-87da-55e37e1bc4a9' Timestamp='' buildVersion='1.2.978.0-20240808.1-d7499e4c2b8a2802977c570508a77efb62dae609' hostId='vs-azure-invoice-785b4b55ff-w26gk' serviceName='formrecognizerinvoice' namespace='vdi' Namesapce='vdi' fileSizeInBytes='200188' processedPageIndex='0' toSecondaryQueue='False' isSubBatchRequest='False' totalPageCount='1' fileType='Jpeg' apiName='invoice-2023-07-31' ocrModelName='2023-07-31' scenario='fr_async_layout' resultNameEnum='UpstreamFRResult' ocrResolution='Standard' errorCode='UnexpectedResponseContentTypeFromUpstream'
fail: formrecognizerinvoice[0]
Failed to process a queue message SubscriptionId='' RequestId='78762046-6021-41bc-87da-55e37e1bc4a9' Timestamp='' buildVersion='1.2.978.0-20240808.1-d7499e4c2b8a2802977c570508a77efb62dae609' hostId='vs-azure-invoice-785b4b55ff-w26gk' serviceName='formrecognizerinvoice' namespace='vdi' Namesapce='vdi' fileSizeInBytes='200188' processedPageIndex='0' toSecondaryQueue='False' isSubBatchRequest='False' totalPageCount='1' fileType='Jpeg' apiName='invoice-2023-07-31' ocrModelName='2023-07-31' scenario='fr_async_layout' resultNameEnum='UpstreamFRResult' ocrResolution='Standard' queueName='onprem-upstream-handler-frinvoice20230731' workItemId='b870a9a0-ab43-4adb-822d-0c2306284101' dequeueCount='3' performanceMetric='OneMessageStayInQueueTime' durationInMs='135' concurrentRequests='2' errorCode='ProcessMessageFail