Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to upload document Details: Error: 500: Internal Server Error #1402

Closed
XunLi-Nick opened this issue Jun 10, 2023 · 4 comments · Fixed by #1533
Closed

Failed to upload document Details: Error: 500: Internal Server Error #1402

XunLi-Nick opened this issue Jun 10, 2023 · 4 comments · Fixed by #1533
Assignees
Milestone

Comments

@XunLi-Nick
Copy link

After deploying the web API to Azure, there was an error uploading the file: Failed to upload document Details: Error: 500: Internal Server Error
image

Category: Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer
EventId: 2
SpanId: 7e2e32cb5d4200de
TraceId: 51a29c23e281c02ef3bea59f1790dc02
ParentId: 0000000000000000
RequestId: 80000efb-0000-f400-b63f-84710c7967bb
RequestPath: /importDocument

Connection ID "17582052946865032943", Request ID "80000efb-0000-f400-b63f-84710c7967bb": An unhandled exception was thrown by the application.

Exception:
Microsoft.Azure.Cosmos.CosmosException : Response status code does not indicate success: NotFound (404); Substatus: 0; ActivityId: 6bd35e5f-134b-433b-b48c-385e5c5537b5; Reason: (Message: {"Errors":["Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found"]}
ActivityId: 6bd35e5f-134b-433b-b48c-385e5c5537b5, Request URI: /apps/06083555-7b7a-4bf8-83bf-339684435fd8/services/3b15b24b-4e61-4334-9f3b-4a7262d573e7/partitions/18f75d11-6231-459b-9f20-f14979824f2e/replicas/133275438074978963s, RequestStats:
RequestStartTime: 2023-06-10T09:22:34.3022862Z, RequestEndTime: 2023-06-10T09:22:34.3022862Z, Number of regions attempted:1
{"systemHistory":[{"dateUtc":"2023-06-10T09:21:34.9711206Z","cpu":1.660,"memory":430070036.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.0669,"availableThreads":32764,"minThreads":40,"maxThreads":32767},"numberOfOpenTcpConnection":3448},{"dateUtc":"2023-06-10T09:21:44.9813016Z","cpu":1.634,"memory":430059520.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.0569,"availableThreads":32764,"minThreads":40,"maxThreads":32767},"numberOfOpenTcpConnection":3448},{"dateUtc":"2023-06-10T09:21:54.9914917Z","cpu":2.792,"memory":430035292.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.1166,"availableThreads":32764,"minThreads":40,"maxThreads":32767},"numberOfOpenTcpConnection":3449},{"dateUtc":"2023-06-10T09:22:05.0016668Z","cpu":2.076,"memory":430030176.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.0445,"availableThreads":32764,"minThreads":40,"maxThreads":32767},"numberOfOpenTcpConnection":3447},{"dateUtc":"2023-06-10T09:22:15.0118980Z","cpu":1.167,"memory":430034688.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.0849,"availableThreads":32763,"minThreads":40,"maxThreads":32767},"numberOfOpenTcpConnection":3447},{"dateUtc":"2023-06-10T09:22:25.0221353Z","cpu":1.062,"memory":430048956.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.0474,"availableThreads":32764,"minThreads":40,"maxThreads":32767},"numberOfOpenTcpConnection":3447}]}
RequestStart: 2023-06-10T09:22:34.3022862Z; ResponseTime: 2023-06-10T09:22:34.3022862Z; StoreResult: StorePhysicalAddress: rntbd://10.0.0.19:11300/apps/06083555-7b7a-4bf8-83bf-339684435fd8/services/3b15b24b-4e61-4334-9f3b-4a7262d573e7/partitions/18f75d11-6231-459b-9f20-f14979824f2e/replicas/133275438074978963s, LSN: 12, GlobalCommittedLsn: 12, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#12, UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.296, ActivityId: 6bd35e5f-134b-433b-b48c-385e5c5537b5, RetryAfterInMs: , TransportRequestTimeline: {"requestTimeline":[{"event": "Created", "startTimeUtc": "2023-06-10T09:22:34.3022862Z", "durationInMs": 0.018},{"event": "ChannelAcquisitionStarted", "startTimeUtc": "2023-06-10T09:22:34.3023042Z", "durationInMs": 0.0129},{"event": "Pipelined", "startTimeUtc": "2023-06-10T09:22:34.3023171Z", "durationInMs": 0.1023},{"event": "Transit Time", "startTimeUtc": "2023-06-10T09:22:34.3024194Z", "durationInMs": 0.949},{"event": "Received", "startTimeUtc": "2023-06-10T09:22:34.3033684Z", "durationInMs": 0.0761},{"event": "Completed", "startTimeUtc": "2023-06-10T09:22:34.3034445Z", "durationInMs": 0}],"serviceEndpointStats":{"inflightRequests":1,"openConnections":2},"connectionStats":{"waitforConnectionInit":"False","callsPendingReceive":0,"lastSendAttempt":"2023-06-10T09:22:33.0322686Z","lastSend":"2023-06-10T09:22:33.0322686Z","lastReceive":"2023-06-10T09:22:33.0322686Z"},"requestSizeInBytes":499,"responseMetadataSizeInBytes":135,"responseBodySizeInBytes":87};
ResourceType: Collection, OperationType: Read
RequestStart: 2023-06-10T09:22:34.3022862Z; ResponseTime: 2023-06-10T09:22:34.3022862Z; StoreResult: StorePhysicalAddress: rntbd://10.0.0.21:11300/apps/06083555-7b7a-4bf8-83bf-339684435fd8/services/3b15b24b-4e61-4334-9f3b-4a7262d573e7/partitions/18f75d11-6231-459b-9f20-f14979824f2e/replicas/133288265952632441s, LSN: 12, GlobalCommittedLsn: 12, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#12, UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.267, ActivityId: 6bd35e5f-134b-433b-b48c-385e5c5537b5, RetryAfterInMs: , TransportRequestTimeline: {"requestTimeline":[{"event": "Created", "startTimeUtc": "2023-06-10T09:22:34.3022862Z", "durationInMs": 0.0063},{"event": "ChannelAcquisitionStarted", "startTimeUtc": "2023-06-10T09:22:34.3022925Z", "durationInMs": 0.0039},{"event": "Pipelined", "startTimeUtc": "2023-06-10T09:22:34.3022964Z", "durationInMs": 0.1281},{"event": "Transit Time", "startTimeUtc": "2023-06-10T09:22:34.3024245Z", "durationInMs": 0.9069},{"event": "Received", "startTimeUtc": "2023-06-10T09:22:34.3033314Z", "durationInMs": 0.0894},{"event": "Completed", "startTimeUtc": "2023-06-10T09:22:34.3034208Z", "durationInMs": 0}],"serviceEndpointStats":{"inflightRequests":1,"openConnections":2},"connectionStats":{"waitforConnectionInit":"False","callsPendingReceive":0,"lastSendAttempt":"2023-06-10T09:22:33.3122535Z","lastSend":"2023-06-10T09:22:33.3122535Z","lastReceive":"2023-06-10T09:22:33.3622907Z"},"requestSizeInBytes":499,"responseMetadataSizeInBytes":135,"responseBodySizeInBytes":87};
ResourceType: Collection, OperationType: Read
, SDK: Microsoft.Azure.Documents.Common/2.14.0, Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum, Windows/10.0.14393 cosmos-netstandard-sdk/3.30.8);
at Microsoft.Azure.Cosmos.GatewayStoreClient.ParseResponseAsync(HttpResponseMessage responseMessage, JsonSerializerSettings serializerSettings, DocumentServiceRequest request)
at Microsoft.Azure.Cosmos.GatewayStoreClient.InvokeAsync(DocumentServiceRequest request, ResourceType resourceType, Uri physicalAddress, CancellationToken cancellationToken)
at Microsoft.Azure.Cosmos.GatewayStoreModel.ProcessMessageAsync(DocumentServiceRequest request, CancellationToken cancellationToken)
at Microsoft.Azure.Cosmos.GatewayStoreModel.ProcessMessageAsync(DocumentServiceRequest request, CancellationToken cancellationToken)
at Microsoft.Azure.Cosmos.Routing.ClientCollectionCache.ReadCollectionAsync(String collectionLink, IDocumentClientRetryPolicy retryPolicyInstance, ITrace trace, IClientSideRequestStatistics clientSideRequestStatistics, CancellationToken cancellationToken)
at Microsoft.Azure.Documents.BackoffRetryUtility1.ExecuteRetryAsync[TParam,TPolicy](Func1 callbackMethod, Func3 callbackMethodWithParam, Func2 callbackMethodWithPolicy, TParam param, IRetryPolicy retryPolicy, IRetryPolicy1 retryPolicyWithArg, Func1 inBackoffAlternateCallbackMethod, Func2 inBackoffAlternateCallbackMethodWithPolicy, TimeSpan minBackoffForInBackoffCallback, CancellationToken cancellationToken, Action1 preRetryCallback)
at Microsoft.Azure.Documents.ShouldRetryResult.ThrowIfDoneTrying(ExceptionDispatchInfo capturedException)
at Microsoft.Azure.Documents.BackoffRetryUtility1.ExecuteRetryAsync[TParam,TPolicy](Func1 callbackMethod, Func3 callbackMethodWithParam, Func2 callbackMethodWithPolicy, TParam param, IRetryPolicy retryPolicy, IRetryPolicy1 retryPolicyWithArg, Func1 inBackoffAlternateCallbackMethod, Func2 inBackoffAlternateCallbackMethodWithPolicy, TimeSpan minBackoffForInBackoffCallback, CancellationToken cancellationToken, Action1 preRetryCallback)
at Microsoft.Azure.Cosmos.Common.CollectionCache.<>c__DisplayClass10_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Azure.Cosmos.Common.AsyncCache2.GetAsync(TKey key, TValue obsoleteValue, Func1 singleValueInitFunc, CancellationToken cancellationToken, Boolean forceRefresh)
at Microsoft.Azure.Cosmos.Common.CollectionCache.ResolveByNameAsync(String apiVersion, String resourceAddress, Boolean forceRefesh, ITrace trace, IClientSideRequestStatistics clientSideRequestStatistics, CancellationToken cancellationToken)
at Microsoft.Azure.Cosmos.ContainerCore.GetCachedContainerPropertiesAsync(Boolean forceRefresh, ITrace trace, CancellationToken cancellationToken)
--- Cosmos Diagnostics ---{"Summary":{"GatewayCalls":{"(404, 0)":1}},"name":"UpsertItemAsync","start datetime":"2023-06-10T09:22:34.214Z","duration in milliseconds":128.6697,"data":{"Client Configuration":{"Client Created Time Utc":"2023-06-10T09:21:41.0359007Z","MachineId":"hashedMachineName:0fe7fbdb-5684-1831-d200-05da72e49356","NumberOfClientsCreated":3,"NumberOfActiveClients":3,"ConnectionMode":"Direct","User Agent":"cosmos-netstandard-sdk/3.34.0|3|X64|Microsoft Windows 10.0.14393|.NET 7.0.5|N|","ConnectionConfig":{"gw":"(cps:50, urto:10, p:False, httpf: False)","rntbd":"(cto: 5, icto: -1, mrpc: 30, mcpe: 65535, erd: True, pr: ReuseUnicastPort)","other":"(ed:False, be:False)"},"ConsistencyConfig":"(consistency: NotSet, prgns:[], apprgn: )","ProcessorCount":1}},"children":[{"name":"ItemSerialize","duration in milliseconds":22.5321},{"name":"Get PkValue From Stream","duration in milliseconds":76.9248,"children":[{"name":"Get Collection Cache","duration in milliseconds":0.0069},{"name":"Read Collection","duration in milliseconds":44.1749,"data":{"Client Side Request Stats":{"Id":"AggregatedClientSideRequestStatistics","ContactedReplicas":[],"RegionsContacted":[],"FailedReplicas":[],"AddressResolutionStatistics":[],"StoreResponseStatistics":[],"HttpResponseStats":[{"StartTimeUTC":"2023-06-10T09:22:34.3048575Z","DurationInMs":20.1123,"RequestUri":"https://cosmos-skwebapi-vhv2yzum7u2xs-eastus.documents.azure.com/dbs/CopilotChat/colls/chatmemorysources","ResourceType":"Collection","HttpMethod":"GET","ActivityId":"6bd35e5f-134b-433b-b48c-385e5c5537b5","StatusCode":"NotFound","ReasonPhrase":"Not Found"}]},"Exception Message":"Message: {"Errors":["Resource Not Found. Learn more: https:\/\/aka.ms\/cosmosdb-tsg-not-found"]}\r\nActivityId: 6bd35e5f-134b-433b-b48c-385e5c5537b5, Request URI: /apps/06083555-7b7a-4bf8-83bf-339684435fd8/services/3b15b24b-4e61-4334-9f3b-4a7262d573e7/partitions/18f75d11-6231-459b-9f20-f14979824f2e/replicas/133275438074978963s, RequestStats: \r\nRequestStartTime: 2023-06-10T09:22:34.3022862Z, RequestEndTime: 2023-06-10T09:22:34.3022862Z, Number of regions attempted:1\r\n{"systemHistory":[{"dateUtc":"2023-06-10T09:21:34.9711206Z","cpu":1.660,"memory":430070036.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.0669,"availableThreads":32764,"minThreads":40,"maxThreads":32767},"numberOfOpenTcpConnection":3448},{"dateUtc":"2023-06-10T09:21:44.9813016Z","cpu":1.634,"memory":430059520.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.0569,"availableThreads":32764,"minThreads":40,"maxThreads":32767},"numberOfOpenTcpConnection":3448},{"dateUtc":"2023-06-10T09:21:54.9914917Z","cpu":2.792,"memory":430035292.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.1166,"availableThreads":32764,"minThreads":40,"maxThreads":32767},"numberOfOpenTcpConnection":3449},{"dateUtc":"2023-06-10T09:22:05.0016668Z","cpu":2.076,"memory":430030176.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.0445,"availableThreads":32764,"minThreads":40,"maxThreads":32767},"numberOfOpenTcpConnection":3447},{"dateUtc":"2023-06-10T09:22:15.0118980Z","cpu":1.167,"memory":430034688.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.0849,"availableThreads":32763,"minThreads":40,"maxThreads":32767},"numberOfOpenTcpConnection":3447},{"dateUtc":"2023-06-10T09:22:25.0221353Z","cpu":1.062,"memory":430048956.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.0474,"availableThreads":32764,"minThreads":40,"maxThreads":32767},"numberOfOpenTcpConnection":3447}]}\r\nRequestStart: 2023-06-10T09:22:34.3022862Z; ResponseTime: 2023-06-10T09:22:34.3022862Z; StoreResult: StorePhysicalAddress: rntbd://10.0.0.19:11300/apps/06083555-7b7a-4bf8-83bf-339684435fd8/services/3b15b24b-4e61-4334-9f3b-4a7262d573e7/partitions/18f75d11-6231-459b-9f20-f14979824f2e/replicas/133275438074978963s, LSN: 12, GlobalCommittedLsn: 12, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#12, UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.296, ActivityId: 6bd35e5f-134b-433b-b48c-385e5c5537b5, RetryAfterInMs: , TransportRequestTimeline: {"requestTimeline":[{"event": "Created", "startTimeUtc": "2023-06-10T09:22:34.3022862Z", "durationInMs": 0.018},{"event": "ChannelAcquisitionStarted", "startTimeUtc": "2023-06-10T09:22:34.3023042Z", "durationInMs": 0.0129},{"event": "Pipelined", "startTimeUtc": "2023-06-10T09:22:34.3023171Z", "durationInMs": 0.1023},{"event": "Transit Time", "startTimeUtc": "2023-06-10T09:22:34.3024194Z", "durationInMs": 0.949},{"event": "Received", "startTimeUtc": "2023-06-10T09:22:34.3033684Z", "durationInMs": 0.0761},{"event": "Completed", "startTimeUtc": "2023-06-10T09:22:34.3034445Z", "durationInMs": 0}],"serviceEndpointStats":{"inflightRequests":1,"openConnections":2},"connectionStats":{"waitforConnectionInit":"False","callsPendingReceive":0,"lastSendAttempt":"2023-06-10T09:22:33.0322686Z","lastSend":"2023-06-10T09:22:33.0322686Z","lastReceive":"2023-06-10T09:22:33.0322686Z"},"requestSizeInBytes":499,"responseMetadataSizeInBytes":135,"responseBodySizeInBytes":87};\r\n ResourceType: Collection, OperationType: Read\r\nRequestStart: 2023-06-10T09:22:34.3022862Z; ResponseTime: 2023-06-10T09:22:34.3022862Z; StoreResult: StorePhysicalAddress: rntbd://10.0.0.21:11300/apps/06083555-7b7a-4bf8-83bf-339684435fd8/services/3b15b24b-4e61-4334-9f3b-4a7262d573e7/partitions/18f75d11-6231-459b-9f20-f14979824f2e/replicas/133288265952632441s, LSN: 12, GlobalCommittedLsn: 12, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#12, UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.267, ActivityId: 6bd35e5f-134b-433b-b48c-385e5c5537b5, RetryAfterInMs: , TransportRequestTimeline: {"requestTimeline":[{"event": "Created", "startTimeUtc": "2023-06-10T09:22:34.3022862Z", "durationInMs": 0.0063},{"event": "ChannelAcquisitionStarted", "startTimeUtc": "2023-06-10T09:22:34.3022925Z", "durationInMs": 0.0039},{"event": "Pipelined", "startTimeUtc": "2023-06-10T09:22:34.3022964Z", "durationInMs": 0.1281},{"event": "Transit Time", "startTimeUtc": "2023-06-10T09:22:34.3024245Z", "durationInMs": 0.9069},{"event": "Received", "startTimeUtc": "2023-06-10T09:22:34.3033314Z", "durationInMs": 0.0894},{"event": "Completed", "startTimeUtc": "2023-06-10T09:22:34.3034208Z", "durationInMs": 0}],"serviceEndpointStats":{"inflightRequests":1,"openConnections":2},"connectionStats":{"waitforConnectionInit":"False","callsPendingReceive":0,"lastSendAttempt":"2023-06-10T09:22:33.3122535Z","lastSend":"2023-06-10T09:22:33.3122535Z","lastReceive":"2023-06-10T09:22:33.3622907Z"},"requestSizeInBytes":499,"responseMetadataSizeInBytes":135,"responseBodySizeInBytes":87};\r\n ResourceType: Collection, OperationType: Read\r\n, SDK: Microsoft.Azure.Documents.Common/2.14.0, Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum, Windows/10.0.14393 cosmos-netstandard-sdk/3.30.8"}}]}]}

@vman
Copy link

vman commented Jun 12, 2023

Getting the same error. Logs show /importdocument endpoint gives a 404 NotFound

@craigomatic
Copy link
Contributor

Can you please double check that you have a provisioned CosmosDB instance and that it is accessible by your web app?

From the logs above, the 404 seems to be coming from the CosmosDB client.

I would expect a similar error just chatting with the bot, independent of uploading documents also if your CosmosDB instance is not configured/accessible by the webapi

@XunLi-Nick
Copy link
Author

XunLi-Nick commented Jun 13, 2023

Can you please double check that you have a provisioned CosmosDB instance and that it is accessible by your web app?

From the logs above, the 404 seems to be coming from the CosmosDB client.

I would expect a similar error just chatting with the bot, independent of uploading documents also if your CosmosDB instance is not configured/accessible by the webapi

My cosmosDB was created through "webAPI\DeploymentTemplates\sk-existing-openai.json" and was not pre configured. It's normal for me to try chatting with the robot, and I can also see messages in Cosmosdb.

@vman
Copy link

vman commented Jun 16, 2023

Figured out the issue. It's that the creation of the chatmemorysources Cosmos db container is missing from the bicep template:

resource cosmosAccount 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' = if (deployCosmosDB) {
name: toLower('cosmos-${uniqueName}')
location: location
kind: 'GlobalDocumentDB'
properties: {
consistencyPolicy: { defaultConsistencyLevel: 'Session' }
locations: [ {
locationName: location
failoverPriority: 0
isZoneRedundant: false
}
]
databaseAccountOfferType: 'Standard'
}
}
resource cosmosDatabase 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases@2023-04-15' = if (deployCosmosDB) {
parent: cosmosAccount
name: 'CopilotChat'
properties: {
resource: {
id: 'CopilotChat'
}
}
}
resource messageContainer 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers@2023-04-15' = if (deployCosmosDB) {
parent: cosmosDatabase
name: 'chatmessages'
properties: {
resource: {
id: 'chatmessages'
indexingPolicy: {
indexingMode: 'consistent'
automatic: true
includedPaths: [
{
path: '/*'
}
]
excludedPaths: [
{
path: '/"_etag"/?'
}
]
}
partitionKey: {
paths: [
'/id'
]
kind: 'Hash'
version: 2
}
}
}
}
resource sessionContainer 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers@2023-04-15' = if (deployCosmosDB) {
parent: cosmosDatabase
name: 'chatsessions'
properties: {
resource: {
id: 'chatsessions'
indexingPolicy: {
indexingMode: 'consistent'
automatic: true
includedPaths: [
{
path: '/*'
}
]
excludedPaths: [
{
path: '/"_etag"/?'
}
]
}
partitionKey: {
paths: [
'/id'
]
kind: 'Hash'
version: 2
}
}
}
}
resource participantContainer 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers@2023-04-15' = if (deployCosmosDB) {
parent: cosmosDatabase
name: 'chatparticipants'
properties: {
resource: {
id: 'chatparticipants'
indexingPolicy: {
indexingMode: 'consistent'
automatic: true
includedPaths: [
{
path: '/*'
}
]
excludedPaths: [
{
path: '/"_etag"/?'
}
]
}
partitionKey: {
paths: [
'/id'
]
kind: 'Hash'
version: 2
}
}
}
}

As well as the web app config:

{
name: 'ChatStore:Cosmos:Database'
value: 'CopilotChat'
}
{
name: 'ChatStore:Cosmos:ChatSessionsContainer'
value: 'chatsessions'
}
{
name: 'ChatStore:Cosmos:ChatMessagesContainer'
value: 'chatmessages'
}
{
name: 'ChatStore:Cosmos:ConnectionString'
value: deployCosmosDB ? cosmosAccount.listConnectionStrings().connectionStrings[0].connectionString : ''
}

I manually created the chatmemorysources container (with partition key /id) in Cosmos Db:
image

And updated the web app config:
image

Now the document upload is working when the app is deployed to Azure.

@hario90 hario90 self-assigned this Jun 16, 2023
@hario90 hario90 linked a pull request Jun 17, 2023 that will close this issue
5 tasks
adrianwyatt added a commit that referenced this issue Jun 17, 2023
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

This fixes an
[issue](#1402) with
uploading documents from the copilot chat sample app when Azure Cosmos
DB resources are used.

### Description
The `chatmemorysources` Cosmos DB container referenced in the web API
appsettings.json was missing from the bicep template and this caused the
"resource not found" error.


### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [x] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

Co-authored-by: Craig Presti <146438+craigomatic@users.noreply.github.com>
Co-authored-by: Adrian Bonar <56417140+adrianwyatt@users.noreply.github.com>
markwallace-microsoft pushed a commit to markwallace-microsoft/semantic-kernel that referenced this issue Jun 23, 2023
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

This fixes an
[issue](microsoft#1402) with
uploading documents from the copilot chat sample app when Azure Cosmos
DB resources are used.

### Description
The `chatmemorysources` Cosmos DB container referenced in the web API
appsettings.json was missing from the bicep template and this caused the
"resource not found" error.


### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [x] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

Co-authored-by: Craig Presti <146438+craigomatic@users.noreply.github.com>
Co-authored-by: Adrian Bonar <56417140+adrianwyatt@users.noreply.github.com>
shawncal pushed a commit to shawncal/semantic-kernel that referenced this issue Jul 6, 2023
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

This fixes an
[issue](microsoft#1402) with
uploading documents from the copilot chat sample app when Azure Cosmos
DB resources are used.

### Description
The `chatmemorysources` Cosmos DB container referenced in the web API
appsettings.json was missing from the bicep template and this caused the
"resource not found" error.


### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [x] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

Co-authored-by: Craig Presti <146438+craigomatic@users.noreply.github.com>
Co-authored-by: Adrian Bonar <56417140+adrianwyatt@users.noreply.github.com>
alliscode pushed a commit to microsoft/chat-copilot that referenced this issue Jul 19, 2023
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

This fixes an
[issue](microsoft/semantic-kernel#1402) with
uploading documents from the copilot chat sample app when Azure Cosmos
DB resources are used.

### Description
The `chatmemorysources` Cosmos DB container referenced in the web API
appsettings.json was missing from the bicep template and this caused the
"resource not found" error.


### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [x] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

Co-authored-by: Craig Presti <146438+craigomatic@users.noreply.github.com>
Co-authored-by: Adrian Bonar <56417140+adrianwyatt@users.noreply.github.com>
@lemillermicrosoft lemillermicrosoft added this to the R3: Cycle 1 milestone Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants