refact icon indicating copy to clipboard operation
refact copied to clipboard

VSCode plugin broken by "Cannot reach the server:..."

Open st01cs opened this issue 11 months ago • 10 comments

I installed refact by Docker in Server and VSCode plugin in client.

Everythin works well, except when VSCode plugin try to complete. It is broken by "Cannot reach the server: POST http://127.0.0.1:9094/...". While my refact server is behide a Reverse-Proxy, and refact.Infurl is set to domain name of the server, and Chat works well.

How to fix that issue? And why client try to connect 127.0.0.1:9094, I search the whole code and find nothing about this port?

st01cs avatar Mar 22 '24 09:03 st01cs

Hi @st01cs ! It's strange that chat works, and code completion doesn't. Both go via the same connection. Port is chosen randomly over there: https://github.com/smallcloudai/refact-vscode/blob/shared-chat-lib/src/launchRust.ts#L78

One thing you can try to fish for more error messages:

tail -f -n 1000 ~/.cache/refact/logs/rustbinary.2024-03-22

olegklimov avatar Mar 22 '24 10:03 olegklimov

  • same problem without the domain, just IP. Web interface of selfhost refact ai is working... in docker refact showing logs /tab-host-have-gpus 200 and tab-finetune-config-and-runs 200. I don't use chat just code completion and in plugin vscodium on the right bottom refact is red.

ukrolelo avatar Jun 27 '24 16:06 ukrolelo

Hey @ukrolelo thanks for reporting, can you pls check if you can find anything suspicious in the lsp logs, for example a panic:

cat ~/.cache/refact/logs/rustbinary.2024-06-28 | grep Panic

olegklimov avatar Jun 28 '24 07:06 olegklimov

Hey @olegklimov i would love to give all info but the folder is not there.

NGC-DL-CONTAINER-LICENSE    database-start.sh     home   libx32  perm_storage           run   tmp
bin                         dev                   lib    media   proc                   sbin  usr
boot                        docker-entrypoint.sh  lib32  mnt     refact-build-info.txt  srv   var
cuda-keyring_1.0-1_all.deb  etc                   lib64  opt     root                   sys
# cd root
# ls
# ls -la
total 52
drwx------ 1 root root 4096 Jun 27 09:00 .
drwxr-xr-x 1 root root 4096 Jun 27 09:00 ..
-rw-r--r-- 1 root root 3127 Jun 20 16:52 .bashrc
drwxr-xr-x 3 root root 4096 May  8 03:04 .bundle
drwxr-xr-x 1 root root 4096 Jun 20 17:02 .cache
drwxr-xr-x 1 root root 4096 Jun 20 16:52 .cargo
drwxr-xr-x 3 root root 4096 May  8 03:07 .config
drwx------ 3 root root 4096 Jun 27 09:00 .nv
-rw-r--r-- 1 root root  182 Jun 20 16:52 .profile
drwxr-xr-x 6 root root 4096 Jun 20 16:52 .rustup
drwxr-xr-x 3 root root 4096 Jun 20 17:02 .triton
# cd .cache
# ls -la
total 28
drwxr-xr-x 1 root root 4096 Jun 20 17:02 .
drwx------ 1 root root 4096 Jun 27 09:00 ..
drwxr-xr-x 1 root root 4096 Jun 27 09:01 huggingface
drwxr-xr-x 1 root root 4096 May  8 03:40 pip

But i found a log file in perm storage of refact watchdog_20240628.log watchdog_20240627.log

ukrolelo avatar Jun 28 '24 12:06 ukrolelo

and cassandra debug/system, debug.log.2024-06-27.0.log system.log.2024-06-27.0.log

ukrolelo avatar Jun 28 '24 12:06 ukrolelo

I looked at the logs, it appears the GPU is super slow,

20240627 09:11:32 WEBUI comp-533320dc437d 20240627 09:12:02 WEBUI TIMEOUT comp-533320dc437d 20240627 09:12:33 WEBUI 60954.0ms comp-533320dc437d result arrived too late

So it sent the timeout after 30 seconds to the IDE, and the result is completed after 60 seconds.

But there's no indication why that could be in the logs.

olegklimov avatar Jun 28 '24 13:06 olegklimov

it was working few month ago without problem with older docker image and older plugin. I have a backup of older plugin so i will try some other docker images and see if it will work :)

ukrolelo avatar Jun 28 '24 15:06 ukrolelo

Okay so i can confirm that older versions is working correctly. No other changes had been made.

[email protected]
smallcloud/refact_self_hosting:v1.2.0

watchdog_20240628.log

I am happy to test out newer version if there will be some fixes, for now i stay on old versions. Using WSL2+docker desktop for windows.

ukrolelo avatar Jun 28 '24 16:06 ukrolelo

Okay we need to reproduce this :/ @hazratisulton

olegklimov avatar Jun 29 '24 06:06 olegklimov

Idk why everything is working now. All updatef to latest. Wsl2,docker desktop for windows, vscodium,refact plugin

ukrolelo avatar Jul 29 '24 18:07 ukrolelo