codota / tabnine-jupyterlab

JupyterLab client for Tabnine. https://pypi.org/project/jupyterlab-tabnine/
https://www.tabnine.com/install/jupyterlab
37 stars 8 forks source link

Connection refused error for Tabnine Hub #22

Open emhl opened 2 years ago

emhl commented 2 years ago

i'm running jupyterlab inside a docker continer and tabnine is already giving me recommendations but if i wanna acess the tabnine hub i just get a connection refused error (i already opened port 5555 but this doesn't seem to help)

bilucodota commented 2 years ago

@emhl Type tabnine::config in open notebook to get Tabnine hub open in a new window. The url should look something like this http://localhost:port/secret-string. use docker -p to forward the port from your host to your docker container.

Let us know if it works for you.

emhl commented 2 years ago

i get the following error Couldn't start web browser at http://127.0.0.1:5555/secret-string. See https://tabnine.com/faq#browser_failed

executing docker port shows i already have port 5555 forwarded.

$ docker port jupyter

5555/tcp -> 0.0.0.0:5555
5555/tcp -> :::5555
8888/tcp -> 0.0.0.0:8888
8888/tcp -> :::8888
emhl commented 2 years ago

the faq tells me to run ssh -L, but i'm running the docker container on the same machiene

bilucodota commented 2 years ago

try to ssh into the container and run curl http://127.0.0.1:5555/secret-string (replace secret-string with the actual string). Do you get a valid http response?

alonaddy commented 2 years ago

I have the same issue, and I do get a valid http response when I curl. BTW, how do I get the "secret-string" for my case?

alonaddy commented 2 years ago

In my case I am running Open VSCode in a container (tabnine gives me suggestions without issues, but I cannot get to the settings of tabnine, it give me 127.0.0.1 didn’t send any data).