-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Which version of Nextcloud are you using?
Nextcloud Hub 25 Autumn (32.0.4)
Which version of PHP context_chat are you using?
Version 5.2.0, AGPL-licensed
Which version of backend context_chat are you using?
Version 5.2.0, AGPL-licensed
Nextcloud deployment method?
AIO
Describe the Bug
I have been trying to install context_chat for a few days now. In the most recent challenge, I have the Backend running, and the frontend context_chat. A few hours ago I checked on it by way of occ context_chat:stats and it said that the indexing wasn't finished yet. Just now I check on it, and it gives me this error in red highlighted text:
In LangRopeService.php line 168:
Error received from Context Chat Backend (ExApp) with status code 503: Context Chat is disabled, enable it from AppAPI to use it.
So my next step is to run occ app_api:enable context_chat, but then it tells me: ExApp context_chat not found. Failed to enable.
So then I go to the App page from the Dashboard, to see if the claim is vaild. What I find is that the Disable button is visible for the NACC, and it appears in my "Active Apps" listing.
So the web interface is saying that it is active, but the occ is saying that it isn't to be found. What's going on?
To Reproduce
- Running Local AI server on LAN machine separate from the Nextcloud machine.
- Deploy the HARP container (by making a docker container in the nextcloud machine but through the host).
- Chose the cc_backend from the exapps list, and make some guesses about the deploy options; i.e., we use http://the.localai.machine for the OpenAI endpoint, and we take the API key from the LocalAI settings page, and fix up some arbitrary mount point on the host, just for whatever, since it asks. I left the database field blank, since I don't know much about setting that up.
- Watch the logs after enabling the cc_backend. Wait for it to say it is successful in starting up, and see that some http messages are received.
- Now enable the context_chat and watch some more, looking at the logs. for php What we see is a long mess of probably indexing code, with a bunch of errors occasionally. On the other hand the general nextcloud error log isn't complaining.
- run an occ:context_chat:stats, and it says that the indexing isn't finished yet.
- wait a few hours, and when you come back, do the stats command again, and you get this complaint telling you that the context_chat app is nowhere to be found.
- Go look at your Active Apps page from the web client, and you'll see that context_chat is still there.
PHP logs (Warning these might contain sensitive information)
Okay, so I took the last two hundred lines or so, and then I cut out about 150 from the middle because it all looked pretty much the same. The first line is the last one in the whole log that actually mentioned any files, some old syllabus from the college.
{"reqId":"UU51Ygy5qpepW3etPiiY","level":3,"time":"2026-01-30T18:47:45+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"[IndexerJob] Indexed 0 files","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":{"storageId":"3","rootId":"191","loadedSources":"[]","sourcesToRetry":"{"0":"files__default: 63867","1":"files__default: 63872","2":"files__default: 63917","3":"files__default: 63929","4":"files__default: 63930","5":"files__default: 63936","6":"files__default: 63980","7":"files__default: 64002","8":"files__default: 64020","9":"files__default: 64021","10":"files__default: 64024","11":"files__default: 64048","12":"files__default: 64059","13":"files__default: 64061","14":"files__default: 64067","15":"files__default: 64116","16":"files__default: 64118","17":"files__default: 64122","18":"files__default: 64127","...":"Over 20 items, aborting normalization"}","timeTaken":"427","totalSize":"42298339","sources":"{"0":"63867:/username/files/school/Spring 2025/2320.016/schedule/2024 draft 2.xlsx","1":"63872:/username/files/school/Spring 2025/2320.016/schedule/2025.1.xlsx","2":"63917:/username/files/school/Spring 2025/2320.016/schedule/2025.v1.docx","3":"63929:/username/files/school/Spring 2025/1342.130/schedule/scratch/2025.v1.xlsx","4":"63930:/username/files/school/Fall-2024/1314.075-2024/1342.130 v1 schedule.docx","5":"63936:/username/files/school/Spring 2025/2320.016/schedule/2025.v1.pdf","6":"63980:/username/files/school/Spring 2025/1342.130/schedule/scratch/2025.v1.docx","7":"64002:/username/files/school/Spring 2025/1342.130/schedule/scratch/2025.v2.docx","8":"64020:/username/files/school/Spring 2025/1342.130/MATH.docx","9":"64021:/username/files/school/Spring 2025/1342.130/schedule/2025.v3.docx","10":"64024:/username/files/school/Spring 2025/1342.130/schedule/scratch/2025.v3.pdf","11":"64048:/username/files/school/Spring 2025/1342.130/schedule/scratch/2025.v3.xlsx","12":"64059:/username/files/school/Spring 2025/1342.130/schedule/scratch/2025.v4.pdf","13":"64061:/username/files/school/Spring 2025/1342.130/schedule/scratch/2025.v3.1.pdf","14":"64067:/username/files/school/Spring 2025/1342.130/schedule/scratch/2025.v5.pdf","15":"64116:/username/files/school/Spring 2025/2320.016/schedule/2025.v2.docx","16":"64118:/username/files/school/Spring 2025/2320.016/schedule/2025.v2.pdf","17":"64122:/username/files/school/Spring 2025/1342.130/schedule/scratch/2025.v3 1-col.docx","18":"64127:/username/files/school/Spring 2025/MATH TEXTBOOK ISBNS 2024-2025.XLSX.pdf","...":"Over 20 items, aborting normalization"}"}}
{"reqId":"UU51Ygy5qpepW3etPiiY","level":3,"time":"2026-01-30T18:47:45+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Indexed 0 files","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"gTzWOcPGoZp1jRjqzf9q","level":3,"time":"2026-01-30T19:01:19+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\ActionJob 66565 started","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"gTzWOcPGoZp1jRjqzf9q","level":3,"time":"2026-01-30T19:01:19+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\ActionJob 66565 ended","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"gTzWOcPGoZp1jRjqzf9q","level":3,"time":"2026-01-30T19:01:19+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\FileSystemListenerJob 66564 started","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"gTzWOcPGoZp1jRjqzf9q","level":3,"time":"2026-01-30T19:01:19+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\FileSystemListenerJob 66564 ended","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"8iljR1qeAqud5NX1E7dK","level":3,"time":"2026-01-30T19:06:21+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\ActionJob 66565 started","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"8iljR1qeAqud5NX1E7dK","level":3,"time":"2026-01-30T19:06:21+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\ActionJob 66565 ended","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"u9L606mhro2SstaFmG0F","level":3,"time":"2026-01-30T19:11:20+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\FileSystemListenerJob 66564 started","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"u9L606mhro2SstaFmG0F","level":3,"time":"2026-01-30T19:11:20+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\FileSystemListenerJob 66564 ended","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"maBnq7E6xaZCYJUCG2Aw","level":3,"time":"2026-01-30T19:16:20+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\ActionJob 66565 started","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"maBnq7E6xaZCYJUCG2Aw","level":3,"time":"2026-01-30T19:16:20+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\ActionJob 66565 ended","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"H3zpjfMSw16zxmdRcFf6","level":3,"time":"2026-01-30T19:21:19+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\FileSystemListenerJob 66564 started","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"CV10PbNWUWVmJCgSUupg","level":3,"time":"2026-01-31T01:46:19+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\ActionJob 66565 started","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"CV10PbNWUWVmJCgSUupg","level":3,"time":"2026-01-31T01:46:19+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\ActionJob 66565 ended","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"CV10PbNWUWVmJCgSUupg","level":3,"time":"2026-01-31T01:46:19+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\FileSystemListenerJob 66564 started","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"CV10PbNWUWVmJCgSUupg","level":3,"time":"2026-01-31T01:46:19+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\FileSystemListenerJob 66564 ended","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"COFu4l1QPreXz8W1sDLJ","level":3,"time":"2026-01-31T01:47:40+00:00","remoteAddr":"192.168.254.14","user":"username","app":"no app in context","method":"POST","url":"/apps/occweb/cmd","scriptName":"/index.php","message":"Error received from Context Chat Backend (ExApp)","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36","version":"32.0.4.1","data":{"code":"503","response":"{"error":"Context Chat is disabled, enable it from AppAPI to use it."}","route":"/countIndexedDocuments","method":"POST","retry":""}}
{"reqId":"c8mBytBMVetWHZRHcKkp","level":3,"time":"2026-01-31T01:56:19+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\ActionJob 66565 started","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"c8mBytBMVetWHZRHcKkp","level":3,"time":"2026-01-31T01:56:19+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\ActionJob 66565 ended","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"c8mBytBMVetWHZRHcKkp","level":3,"time":"2026-01-31T01:56:19+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\FileSystemListenerJob 66564 started","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"c8mBytBMVetWHZRHcKkp","level":3,"time":"2026-01-31T01:56:19+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\FileSystemListenerJob 66564 ended","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"bzvFqpXcAmq4wBySm8c0","level":3,"time":"2026-01-31T02:01:21+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\ActionJob 66565 started","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"bzvFqpXcAmq4wBySm8c0","level":3,"time":"2026-01-31T02:01:21+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\ActionJob 66565 ended","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"bzvFqpXcAmq4wBySm8c0","level":3,"time":"2026-01-31T02:01:21+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\FileSystemListenerJob 66564 started","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"bzvFqpXcAmq4wBySm8c0","level":3,"time":"2026-01-31T02:01:21+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","scriptName":"/var/www/html/cron.php","message":"Background jobs: OCA\ContextChat\BackgroundJobs\FileSystemListenerJob 66564 ended","userAgent":"--","version":"32.0.4.1","occ_command":["/var/www/html/cron.php"],"data":[]}
{"reqId":"QvGtB1LeLDt5nABhFl27","level":3,"time":"2026-01-31T02:11:03+00:00","remoteAddr":"192.168.254.14","user":"username","app":"no app in context","method":"GET","url":"/settings/admin/ai","scriptName":"/index.php","message":"Error received from Context Chat Backend (ExApp)","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36","version":"32.0.4.1","data":{"code":"503","response":"{"error":"Context Chat is disabled, enable it from AppAPI to use it."}","route":"/countIndexedDocuments","method":"POST","retry":""}}
{"reqId":"QvGtB1LeLDt5nABhFl27","level":3,"time":"2026-01-31T02:11:03+00:00","remoteAddr":"192.168.254.14","user":"username","app":"no app in context","method":"GET","url":"/settings/admin/ai","scriptName":"/index.php","message":"Error received from Context Chat Backend (ExApp) with status code 503: Context Chat is disabled, enable it from AppAPI to use it.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36","version":"32.0.4.1","exception":{"Exception":"RuntimeException","Message":"Error received from Context Chat Backend (ExApp) with status code 503: Context Chat is disabled, enable it from AppAPI to use it.","Code":0,"Trace":[{"file":"/var/www/html/custom_apps/context_chat/lib/Service/LangRopeService.php","line":185,"function":"requestToExApp","class":"OCA\ContextChat\Service\LangRopeService","type":"->","args":["/countIndexedDocuments","POST"]},{"file":"/var/www/html/custom_apps/context_chat/lib/Settings/AdminSettings.php","line":74,"function":"getIndexedDocumentsCounts","class":"OCA\ContextChat\Service\LangRopeService","type":"->","args":[]},{"file":"/var/www/html/apps/settings/lib/Controller/CommonSettingsTrait.php","line":129,"function":"getForm","class":"OCA\ContextChat\Settings\AdminSettings","type":"->","args":[]},{"file":"/var/www/html/apps/settings/lib/Controller/CommonSettingsTrait.php","line":179,"function":"formatSettings","class":"OCA\Settings\Controller\AdminSettingsController","type":"->","args":[[{"class":"OCA\Settings\Settings\Admin\ArtificialIntelligence"},{"class":"OCA\Assistant\Settings\Admin"},{"class":"OCA\OpenAi\Settings\Admin"},{"class":"OCA\ContextChat\Settings\AdminSettings"}],[]]},{"file":"/var/www/html/apps/settings/lib/Controller/AdminSettingsController.php","line":56,"function":"getIndexResponse","class":"OCA\Settings\Controller\AdminSettingsController","type":"->","args":["admin","ai"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":204,"function":"index","class":"OCA\Settings\Controller\AdminSettingsController","type":"->","args":["ai"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":118,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Settings\Controller\AdminSettingsController"},"index"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":153,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Settings\Controller\AdminSettingsController"},"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":321,"function":"main","class":"OC\AppFramework\App","type":"::","args":["OCA\Settings\Controller\AdminSettingsController","index",{"class":"OC\AppFramework\DependencyInjection\DIContainer"},{"_route":"settings.adminsettings.index","section":"ai"}]},{"file":"/var/www/html/lib/base.php","line":1061,"function":"match","class":"OC\Route\Router","type":"->","args":["/settings/admin/ai"]},{"file":"/var/www/html/index.php","line":25,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/context_chat/lib/Service/LangRopeService.php","Line":168,"message":"Error received from Context Chat Backend (ExApp) with status code 503: Context Chat is disabled, enable it from AppAPI to use it.","exception":{},"CustomMessage":"Error received from Context Chat Backend (ExApp) with status code 503: Context Chat is disabled, enable it from AppAPI to use it."}}
Ex-App logs (Warning these might contain sensitive information)
Last 100 lines from portainer
HP_SHARED_KEY is set, creating /frpc.toml configuration file...
Directory /certs/frp not found. Creating configuration without TLS certificates.
Starting frpc in the background...
Starting application: poetry run python3 main.py
2026-01-30 16:20:23.952 [I] [sub/root.go:142] start frpc service for config file [/frpc.toml]
2026-01-30 16:20:23.952 [I] [client/service.go:295] try to connect to server...
2026-01-30 16:20:23.957 [W] [client/service.go:298] connect to server error: session shutdown
2026-01-30 16:20:26.042 [I] [client/service.go:295] try to connect to server...
2026-01-30 16:20:26.044 [W] [client/service.go:298] connect to server error: write tcp 172.31.0.17:39386->192.168.254.140:8782: write: connection reset by peer
2026-01-30 16:20:30.552 [I] [client/service.go:295] try to connect to server...
2026-01-30 16:20:30.556 [W] [client/service.go:298] connect to server error: EOF
2026-01-30 16:20:40.128 [I] [client/service.go:295] try to connect to server...
2026-01-30 16:20:40.130 [W] [client/service.go:298] connect to server error: EOF
�@HP_SHARED_KEY is set, creating /frpc.toml configuration file...
Found /certs/frp directory. Creating configuration with TLS certificates.
Starting frpc in the background...
Starting application: poetry run python3 main.py
2026-01-30 16:20:56.647 [I] [sub/root.go:142] start frpc service for config file [/frpc.toml]
2026-01-30 16:20:56.650 [I] [client/service.go:295] try to connect to server...
2026-01-30 16:20:56.694 [I] [client/service.go:287] [e1684c3b7b6e0fbb] login to server success, get run id [e1684c3b7b6e0fbb]
2026-01-30 16:20:56.695 [I] [proxy/proxy_manager.go:173] [e1684c3b7b6e0fbb] proxy added: [context_agent]
2026-01-30 16:20:56.697 [I] [client/control.go:168] [e1684c3b7b6e0fbb] [context_agent] start proxy success
/root/.cache/pypoetry/virtualenvs/context-agent-il7asoJj-py3.11/lib/python3.11/site-packages/websockets/legacy/init.py:6: DeprecationWarning: websockets.legacy is deprecated; see https://websockets.readthedocs.io/en/stable/howto/upgrade.html for upgrade instructions
warnings.warn( # deprecated in 14.0 - 2024-11-09
/root/.cache/pypoetry/virtualenvs/context-agent-il7asoJj-py3.11/lib/python3.11/site-packages/uvicorn/protocols/websockets/websockets_impl.py:17: DeprecationWarning: websockets.server.WebSocketServerProtocol is deprecated
from websockets.server import WebSocketServerProtocol
INFO: Started server process [1]
INFO: Waiting for application startup.
TRACE: ASGI [1] Started scope={'type': 'lifespan', 'asgi': {'version': '3.0', 'spec_version': '2.0'}, 'state': {}}
TRACE: ASGI [1] Receive {'type': 'lifespan.startup'}
2026-01-30 16:21:09,730 - mcp.server.streamable_http_manager - INFO - StreamableHTTP session manager started
TRACE: ASGI [1] Send {'type': 'lifespan.startup.complete'}
INFO: Application startup complete.
INFO: Uvicorn running on unix socket /tmp/exapp.sock (Press CTRL+C to quit)
HP_SHARED_KEY is set, creating /frpc.toml configuration file...
Found /certs/frp directory. Creating configuration with TLS certificates.
Starting frpc in the background...
Starting application: poetry run python3 main.py
2026-01-30 18:58:50.232 [I] [sub/root.go:142] start frpc service for config file [/frpc.toml]
2026-01-30 18:58:50.232 [I] [client/service.go:295] try to connect to server...
2026-01-30 18:58:50.434 [W] [client/service.go:298] connect to server error: dial tcp 192.168.254.140:8782: connect: connection refused
2026-01-30 18:58:52.436 [I] [client/service.go:295] try to connect to server...
2026-01-30 18:58:52.438 [W] [client/service.go:298] connect to server error: dial tcp 192.168.254.140:8782: connect: connection refused
2026-01-30 18:58:56.503 [I] [client/service.go:295] try to connect to server...
2026-01-30 18:58:56.504 [W] [client/service.go:298] connect to server error: dial tcp 192.168.254.140:8782: connect: connection refused
2026-01-30 18:59:05.280 [I] [client/service.go:295] try to connect to server...
2026-01-30 18:59:05.281 [W] [client/service.go:298] connect to server error: dial tcp 192.168.254.140:8782: connect: connection refused
2026-01-30 18:59:15.287 [I] [client/service.go:295] try to connect to server...
2026-01-30 18:59:15.433 [I] [client/service.go:287] [78b5201b56f1b594] login to server success, get run id [78b5201b56f1b594]
2026-01-30 18:59:15.433 [I] [proxy/proxy_manager.go:173] [78b5201b56f1b594] proxy added: [context_agent]
2026-01-30 18:59:15.438 [I] [client/control.go:168] [78b5201b56f1b594] [context_agent] start proxy success
/root/.cache/pypoetry/virtualenvs/context-agent-il7asoJj-py3.11/lib/python3.11/site-packages/websockets/legacy/init.py:6: DeprecationWarning: websockets.legacy is deprecated; see https://websockets.readthedocs.io/en/stable/howto/upgrade.html for upgrade instructions
warnings.warn( # deprecated in 14.0 - 2024-11-09
/root/.cache/pypoetry/virtualenvs/context-agent-il7asoJj-py3.11/lib/python3.11/site-packages/uvicorn/protocols/websockets/websockets_impl.py:17: DeprecationWarning: websockets.server.WebSocketServerProtocol is deprecated
from websockets.server import WebSocketServerProtocol
INFO: Started server process [1]
INFO: Waiting for application startup.
TRACE: ASGI [1] Started scope={'type': 'lifespan', 'asgi': {'version': '3.0', 'spec_version': '2.0'}, 'state': {}}
TRACE: ASGI [1] Receive {'type': 'lifespan.startup'}
2026-01-30 19:00:09,676 - mcp.server.streamable_http_manager - INFO - StreamableHTTP session manager started
TRACE: ASGI [1] Send {'type': 'lifespan.startup.complete'}
INFO: Application startup complete.
INFO: Uvicorn running on unix socket /tmp/exapp.sock (Press CTRL+C to quit)
Server logs (if applicable)
Waiting for PostgreSQL to start...
PostgreSQL is up and running.
CCB_DB_URL is already set. Skipping database setup.
Running repairs...
No repairs are required.
Config file already exists in the persistent storage ("/nc_app_context_chat_backend_data/config.yaml").
App config:
{
"debug": true,
"uvicorn_log_level": "info",
"disable_aaa": false,
"httpx_verify_ssl": true,
"use_colors": true,
"uvicorn_workers": 1,
"embedding_chunk_size": 2000,
"doc_parser_worker_limit": 10,
"vectordb": [
"pgvector",
{}
],
"embedding": {
"base_url": "http://192.168.254.14:8081",
"workers": 0,
"request_timeout": 1800,
"model_name": "mistral-nemo-instruct-2407",
"auth": {
"apikey": "***REDACTED***"
},
"remote_service": true,
"llama": {}
},
"llm": [
"nc_texttotext",
{}
]
}
INFO: Started server process [38]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on unix socket /tmp/exapp.sock (Press CTRL+C to quit)
Config file already exists in the persistent storage ("/nc_app_context_chat_backend_data/config.yaml").
Exiting embedding server as it is not configured to run locally.
Config file already exists in the persistent storage ("/nc_app_context_chat_backend_data/config.yaml").
Exiting embedding server as it is not configured to run locally.
Config file already exists in the persistent storage ("/nc_app_context_chat_backend_data/config.yaml").
Exiting embedding server as it is not configured to run locally.
Config file already exists in the persistent storage ("/nc_app_context_chat_backend_data/config.yaml").
Exiting embedding server as it is not configured to run locally.
INFO: - "POST /countIndexedDocuments HTTP/1.1" 503 Service Unavailable
2026-01-31T01:47:40+0000: [ERROR|utils]: Failed request (503): Context Chat is disabled, enable it from AppAPI to use it.
2026-01-31T02:11:03+0000: [ERROR|utils]: Failed request (503): Context Chat is disabled, enable it from AppAPI to use it.
INFO: - "POST /countIndexedDocuments HTTP/1.1" 503 Service Unavailable
Traceback (most recent call last):
File "/app/context_chat_backend/network_em.py", line 89, in _get_embedding
raise EmbeddingException(response.text)
context_chat_backend.types.EmbeddingException: {"error":{"code":500,"message":"rpc error: code = Internal desc = input (623 tokens) is too large to process. increase the physical batch size (current batch size: 512)","type":""}}
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/context_chat_backend/vectordb/pgvector.py", line 149, in add_indocuments
chunk_ids.extend(self.client.add_documents(indoc.documents[i:i+batch_size]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/langchain_core/vectorstores/base.py", line 279, in add_documents
return self.add_texts(texts, metadatas, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/langchain_postgres/vectorstores.py", line 885, in add_texts
embeddings = self.embedding_function.embed_documents(texts_)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/context_chat_backend/network_em.py", line 134, in embed_documents
return self._get_embedding(texts) # pyright: ignore[reportReturnType]
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/context_chat_backend/network_em.py", line 103, in get_embedding
return self.get_embedding(input, try - 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/context_chat_backend/network_em.py", line 103, in get_embedding
return self.get_embedding(input, try - 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/context_chat_backend/network_em.py", line 103, in get_embedding
return self.get_embedding(input, try - 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/context_chat_backend/network_em.py", line 104, in _get_embedding
raise RetryableEmbeddingException('Error: request to get embeddings failed') from e
context_chat_backend.types.RetryableEmbeddingException: Error: request to get embeddings failed
/usr/lib/python3/dist-packages/supervisor/options.py:13: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
HP_SHARED_KEY is set, creating /frpc.toml configuration file...
Found /certs/frp directory. Creating configuration with TLS certificates.
Starting frpc...
Starting PostgreSQL...
2026-01-30 18:59:13.483 [I] [sub/root.go:142] start frpc service for config file [/frpc.toml]
2026-01-30 18:59:13.484 [I] [client/service.go:295] try to connect to server...
2026-01-30 18:59:13.909 [I] [client/service.go:287] [cc186eaa0988dcb6] login to server success, get run id [cc186eaa0988dcb6]
2026-01-30 18:59:13.909 [I] [proxy/proxy_manager.go:173] [cc186eaa0988dcb6] proxy added: [context_chat_backend]
2026-01-30 18:59:13.911 [I] [client/control.go:168] [cc186eaa0988dcb6] [context_chat_backend] start proxy success
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start............... done
server started
Waiting for PostgreSQL to start...
PostgreSQL is up and running.
CCB_DB_URL is already set. Skipping database setup.
Running repairs...
No repairs are required.
Config file already exists in the persistent storage ("/nc_app_context_chat_backend_data/config.yaml").
App config:
{
"debug": true,
"uvicorn_log_level": "info",
"disable_aaa": false,
"httpx_verify_ssl": true,
"use_colors": true,
"uvicorn_workers": 1,
"embedding_chunk_size": 2000,
"doc_parser_worker_limit": 10,
"vectordb": [
"pgvector",
{}
],
"embedding": {
"base_url": "http:/*************1",
"workers": 0,
"request_timeout": 1800,
"model_name": "mistral-nemo-instruct-2407",
"auth": {
"apikey": "REDACTED"
},
"remote_service": true,
"llama": {}
},
"llm": [
"nc_texttotext",
{}
]
}
INFO: Started server process [38]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on unix socket /tmp/exapp.sock (Press CTRL+C to quit)
Config file already exists in the persistent storage ("/nc_app_context_chat_backend_data/config.yaml").
Exiting embedding server as it is not configured to run locally.
Config file already exists in the persistent storage ("/nc_app_context_chat_backend_data/config.yaml").
Exiting embedding server as it is not configured to run locally.
Config file already exists in the persistent storage ("/nc_app_context_chat_backend_data/config.yaml").
Exiting embedding server as it is not configured to run locally.
Config file already exists in the persistent storage ("/nc_app_context_chat_backend_data/config.yaml").
Exiting embedding server as it is not configured to run locally.
INFO: - "POST /countIndexedDocuments HTTP/1.1" 503 Service Unavailable
2026-01-31T01:47:40+0000: [ERROR|utils]: Failed request (503): Context Chat is disabled, enable it from AppAPI to use it.
2026-01-31T02:11:03+0000: [ERROR|utils]: Failed request (503): Context Chat is disabled, enable it from AppAPI to use it.
INFO: - "POST /countIndexedDocuments HTTP/1.1" 503 Service Unavailable