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

AZURE_COSMOSDB_ACCOUNT must be set when USE_CHAT_HISTORY_COSMOS is true #2200

Open
Cloudinfo-Github opened this issue Nov 29, 2024 · 4 comments

Comments

@Cloudinfo-Github
Copy link

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

I want to enable the chat record function of cosmos db. I have set the environment variables in the terminal. However, after the app is deployed, the message AZURE_COSMOSDB_ACCOUNT must be set when USE_CHAT_HISTORY_COSMOS is true will still appear, causing the app to fail to start normally.

Any log messages given by the failure

Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/quart/app.py", line 1700, in startup
await self.ensure_async(func)()
File "/app/chat_history/cosmosdb.py", line 173, in setup_clients
raise ValueError("AZURE_COSMOSDB_ACCOUNT must be set when USE_CHAT_HISTORY_COSMOS is true")
ValueError: AZURE_COSMOSDB_ACCOUNT must be set when USE_CHAT_HISTORY_COSMOS is true
2024-11-29 07:03:45,086 - ERROR - AZURE_COSMOSDB_ACCOUNT must be set when USE_CHAT_HISTORY_COSMOS is true
2024-11-29 07:03:45,087 - ERROR - Application startup failed. Exiting.
2024-11-29 07:03:45,087 - INFO - Worker exiting (pid: 9)
2024-11-29 07:03:45,401 - ERROR - Worker (pid:18) exited with code 3
2024-11-29 07:03:45,498 - ERROR - Worker (pid:9) was sent SIGTERM!
2024-11-29 07:03:45,510 - ERROR - Worker (pid:12) was sent SIGTERM!
2024-11-29 07:03:45,591 - ERROR - Worker (pid:8) was sent SIGTERM!
2024-11-29 07:03:45,599 - ERROR - Worker (pid:11) was sent SIGTERM!
2024-11-29 07:03:45,599 - ERROR - Worker (pid:15) was sent SIGTERM!
2024-11-29 07:03:45,602 - ERROR - Worker (pid:7) was sent SIGTERM!
2024-11-29 07:03:45,604 - ERROR - Worker (pid:13) was sent SIGTERM!
2024-11-29 07:03:45,605 - ERROR - Worker (pid:16) was sent SIGTERM!
2024-11-29 07:03:45,705 - ERROR - Shutting down: Master
2024-11-29 07:03:45,705 - ERROR - Reason: Worker failed to boot.

Expected/desired behavior

Able to use the chat history function normally

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

azd version?

run azd version and copy paste here.

Versions

azd version 1.11.0 (commit 5b92e0687e1fa96dfc8292f4b900c0c58610b6a5)

Mention any other details that might be useful


Thanks! We'll be in touch soon.

@pamelafox
Copy link
Collaborator

Hm, AZURE_COSMOSDB_ACCOUNT should have been set once you ran azd up. Did you definitely run azd up after enabling chat history?

@Cloudinfo-Github
Copy link
Author

Hm, should have been set once you ran . Did you definitely run after enabling chat history?AZURE_COSMOSDB_ACCOUNT``azd up``azd up

The settings have been completed, but I encountered another problem later. Deployment cannot be done in the eastern United States because the usage in this region is too high. How can I solve this problem? @pamelafox

@Bennzn
Copy link

Bennzn commented Dec 17, 2024

I can confirm that. Fresh new deployment. (With some existing resources). ContainerApp won't spin up and on the console Log i found:
raise ValueError("AZURE_COSMOSDB_ACCOUNT must be set when USE_CHAT_HISTORY_COSMOS is true")
ValueError: AZURE_COSMOSDB_ACCOUNT must be set when USE_CHAT_HISTORY_COSMOS is true
2024-12-17 21:15:56,877 - ERROR - AZURE_COSMOSDB_ACCOUNT must be set when USE_CHAT_HISTORY_COSMOS is true
2024-12-17 21:15:56,877 - ERROR - Application startup failed. Exiting.
2024-12-17 21:15:56,878 - INFO - Worker exiting (pid: 12)
2024-12-17 21:15:58,476 - ERROR - Worker (pid:8) exited with code 3
2024-12-17 21:15:58,581 - ERROR - Worker (pid:11) was sent SIGTERM!
2024-12-17 21:15:58,673 - ERROR - Worker (pid:15) was sent SIGTERM!
2024-12-17 21:15:58,673 - ERROR - Worker (pid:16) was sent SIGTERM!
2024-12-17 21:15:58,673 - ERROR - Worker (pid:14) was sent SIGTERM!
2024-12-17 21:15:58,675 - ERROR - Worker (pid:12) was sent SIGTERM!
2024-12-17 21:15:58,676 - ERROR - Worker (pid:13) was sent SIGTERM!
2024-12-17 21:15:58,677 - ERROR - Worker (pid:9) was sent SIGTERM!
2024-12-17 21:15:58,685 - ERROR - Worker (pid:10) was sent SIGTERM!
2024-12-17 21:15:58,778 - ERROR - Shutting down: Master
2024-12-17 21:15:58,778 - ERROR - Reason: Worker failed to boot.

Within the ENV file an empty variable was created:

AZURE_COSMOSDB_ACCOUNT=""

@Bennzn
Copy link

Bennzn commented Dec 18, 2024

I can confirm that. Fresh new deployment. (With some existing resources). ContainerApp won't spin up and on the console Log i found: raise ValueError("AZURE_COSMOSDB_ACCOUNT must be set when USE_CHAT_HISTORY_COSMOS is true") ValueError: AZURE_COSMOSDB_ACCOUNT must be set when USE_CHAT_HISTORY_COSMOS is true 2024-12-17 21:15:56,877 - ERROR - AZURE_COSMOSDB_ACCOUNT must be set when USE_CHAT_HISTORY_COSMOS is true 2024-12-17 21:15:56,877 - ERROR - Application startup failed. Exiting. 2024-12-17 21:15:56,878 - INFO - Worker exiting (pid: 12) 2024-12-17 21:15:58,476 - ERROR - Worker (pid:8) exited with code 3 2024-12-17 21:15:58,581 - ERROR - Worker (pid:11) was sent SIGTERM! 2024-12-17 21:15:58,673 - ERROR - Worker (pid:15) was sent SIGTERM! 2024-12-17 21:15:58,673 - ERROR - Worker (pid:16) was sent SIGTERM! 2024-12-17 21:15:58,673 - ERROR - Worker (pid:14) was sent SIGTERM! 2024-12-17 21:15:58,675 - ERROR - Worker (pid:12) was sent SIGTERM! 2024-12-17 21:15:58,676 - ERROR - Worker (pid:13) was sent SIGTERM! 2024-12-17 21:15:58,677 - ERROR - Worker (pid:9) was sent SIGTERM! 2024-12-17 21:15:58,685 - ERROR - Worker (pid:10) was sent SIGTERM! 2024-12-17 21:15:58,778 - ERROR - Shutting down: Master 2024-12-17 21:15:58,778 - ERROR - Reason: Worker failed to boot.

Within the ENV file an empty variable was created:

AZURE_COSMOSDB_ACCOUNT=""

Sorry my Bad. I just understood that Authentication must be enabled and deployed to get CosmosDB working. Trying to do that now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants