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

kai rpc server failed to initialize. Error: Cannot call write after a stream was destroyed #445

Open
hanaahh21 opened this issue Mar 21, 2025 · 2 comments
Labels
kind/documentation Categorizes issue or PR as related to documentation. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@hanaahh21
Copy link

hanaahh21 commented Mar 21, 2025

I tried installing the newest version which was released a week back and it returns me the following error when I start running the server

kai rpc server has been spawned! [46586]
[PYI-46593:ERROR] Failed to load Python shared library '/tmp/_MEINi7uZx/libpython3.12.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by /tmp/_MEINi7uZx/libpython3.12.so.1.0)
waited 30000ms for the kai rpc server to be ready, continuing anyway
kai rpc server successfully started [pid: 46586]
serverState change from [starting] to [readyToInitialize]
serverState change from [readyToInitialize] to [initializing]
Sending 'initialize' request: {"rootPath":"/home/[username]/themeal","modelProvider":{"provider":"ChatOpenAI","args":{"model":"gpt-4o"}},"logConfig":{"logLevel":"DEBUG","fileLogLevel":"DEBUG","logDirPath":"/home/[username]/themeal/.vscode/konveyor-logs"},"demoMode":false,"cacheDir":null,"traceEnabled":false,"analyzerLspRpcPath":"/home/[username]/.vscode/extensions/konveyor.konveyor-ai-0.1.0/assets/kai/linux-x64/kai-analyzer-rpc","analyzerLspLspPath":"/home/[username].vscode/extensions/konveyor.konveyor-ai-0.1.0/assets/jdtls/bin/jdtls","analyzerLspRulesPaths":["/home/[username]/.vscode/extensions/konveyor.konveyor-ai-0.1.0/assets/rulesets"],"analyzerLspJavaBundlePaths":["/home/[username]/.vscode/extensions/konveyor.konveyor-ai-0.1.0/assets/jdtls-bundles/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core-1.0.0-SNAPSHOT.jar"],"analyzerLspDepLabelsPath":"/home/[username]/.vscode/extensions/konveyor.konveyor-ai-0.1.0/assets/opensource-labels-file/maven.default.index","analyzerLspExcludedPaths":[]}
kai rpc server failed to initialize [err: Error: Cannot call write after a stream was destroyed]
serverState change from [initializing] to [startFailed]

As mentioned in the error, GLIBC_2.38 was installed and the library path was set correctly, yet the same error remains.
This error was not thrown, when previous version(v0.0.13) was used. I'm running the server on Ubuntu 22.04 lite x86_64 architecture. To verify that my laptop doesn't have any issues, I ran the same version of the server on another laptop with the same operating system and architecture.

Also the logs aren't updating after the first server-start for the new version. With the use of previous version, logs are being updated real-time.

@djzager
Copy link
Member

djzager commented Mar 24, 2025

@hanaahh21, Could you please run ldd --version? Do I understand correctly from:

I'm running the server on Ubuntu 22.04 lite x86_64 architecture. To verify that my laptop doesn't have any issues, I ran the same version of the server on another laptop with the same operating system and architecture.

that you are running the extension on the exact same OS + architecture combination and seeing the exact same issue?

It appears that, by default, Ubuntu 22.04 ships with glibc version 2.35 which is consistent with this error message. I found this stack overflow that may be of some use to us. https://stackoverflow.com/a/78174173

@hanaahh21
Copy link
Author

Hi @djzager ,

Could you please run ldd --version? Do I understand correctly from:
I'm running the server on Ubuntu 22.04 lite x86_64 architecture. To verify that my laptop doesn't have any issues, I ran the same version of the server on another laptop with the same operating system and architecture.

that you are running the extension on the exact same OS + architecture combination and seeing the exact same issue?

Yes, I ran on the exact same OS+architecture earlier.

Thanks for sharing the stackoverflow, I referred to it before creating this issue and I wasn't able to upgrade my GLIBC version as my system was crsahing down whenever I try to install GLIBC 2.38. The only way to resolve this is upgrading Ubuntu OS from 22.04 to the latest version 24.10. As the newer version of Ubuntu comes up with GLIBC 2.39 default, KAI works fine without any error.

However, we have to note that if we are using Ubuntu OS, KAI v 0.1.0 will work only on Ubuntu 23.10 or newer versions according to https://gist.github.com/zchrissirhcz/ee13f604996bbbe312ba1d105954d2ed#table , otherwise it won't work. Users might have to upgrade their OS(easiest option) or try to install GLIBC 2.38 manually (quite risky) to make KAI work perefectly.

@djzager djzager added triage/accepted Indicates an issue or PR is ready to be actively worked on. kind/documentation Categorizes issue or PR as related to documentation. priority/backlog Higher priority than priority/awaiting-more-evidence. labels Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Categorizes issue or PR as related to documentation. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: No status
Development

No branches or pull requests

2 participants