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

Connection refused error on Windows using Python 3.8 #36

Open
akshayagrawal927 opened this issue May 28, 2020 · 9 comments
Open

Connection refused error on Windows using Python 3.8 #36

akshayagrawal927 opened this issue May 28, 2020 · 9 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@akshayagrawal927
Copy link

ERROR:Uncaught exception GET /kernel/jubyTab-Demo-Notebook/schema?security_token= (192.168.1.101) HTTPServerRequest(protocol='http', host='m10-op-c26549:8081', method='GET', uri='/kernel/jubyTab-Demo-Notebook/schema?security_token=', version='HTTP/1.1', remote_ip='192.168.1.101') Traceback (most recent call last): File "C:\Users\Administrator\anaconda3\lib\site-packages\tornado\web.py", line 1699, in _execute result = await result File "C:\Users\Administrator\anaconda3\lib\site-packages\jupytab_server\jupytab_api.py", line 172, in get response = await AsyncHTTPClient().fetch(request) ConnectionRefusedError: [Errno 10061] Unknown error

@btribonde
Copy link
Collaborator

btribonde commented May 29, 2020

Hello,

Did you try the install of jupytab-server in a clean and dedicated virtual env following the pattern :

•	conda create –n jupytab-server
pip install jupytab-server

•	conda create –n mynotebook
pip install jupytab
+ … install all other libraries for my notebook
conda activate mynotebook
python -m ipykernel install --user --name my-notebook-kernel

Then you start jupytab –config=…ini from the jupytab-server environment

@btribonde btribonde self-assigned this May 29, 2020
@btribonde btribonde added bug Something isn't working documentation Improvements or additions to documentation labels May 29, 2020
@akshayagrawal927
Copy link
Author

I tried it. but facing the same issue.

@DaryaRudych
Copy link

Having the same issue after package update

@btribonde
Copy link
Collaborator

Hello,
I will add tests specific to windows version as it seems to encounter more problems than the linux one (mac seems ok as well).

Could you try to start the jupyter kernel gateway layer separately from the jupytab-server environment ?

Command should be something like :
jupyter kernelgateway --KernelGatewayApp.api='kernel_gateway.notebook_http' --KernelGatewayApp.seed_uri=notebook_to_start.ipynb --KernelGatewayApp.ip='127.0.0.1' --KernelGatewayApp.port=51414

@akshayagrawal927
Copy link
Author

now i am getting the following error.

File "c:\users\administrator\appdata\local\programs\python\python38-32\lib\asyncio\events.py", line 501, in add_reader
raise NotImplementedError
NotImplementedError

(jupytab-server) C:\Users\Administrator>[IPKernelApp] WARNING | Parent appears to have exited, shutting down.

@btribonde
Copy link
Collaborator

Ok, this is linked to the 3.8 version of python, on windows, because of Tornado ...
tornadoweb/tornado#2751

I will push a new version of jupytab soon to fix this issue (and I know there is sometime another issue for windows user, but workaround is documented in #8).

Currently, workaround is to downgrade python to 3.7 for windows users. (conda install python=3.7 should work fine)

@btribonde btribonde changed the title connection refused error Connection refused error on Windows using Python 3.8 Jun 3, 2020
@btribonde
Copy link
Collaborator

By the way I got in touch with maintainer of jupyter-kernel-gateway, this will ease to solve issues like this one.

@guybe87
Copy link

guybe87 commented Jun 22, 2020

I have a similar problem on a Linux docker (ML workspace) running jupytab server.
When I'm trying to connect to the WDC from my Tableau Desktop I get 500 error:

ERROR:Uncaught exception GET /kernel/my_table/schema?security_token=mytoken (172.17.0.1)
HTTPServerRequest(protocol='http', host='10.0.2.2:8765', method='GET', uri='/kernel/my_table/schema?security_token=mytoken', version='HTTP/1.1', remote_ip='172.17.0.1')
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/tornado/web.py", line 1699, in _execute
result = await result
File "/opt/conda/lib/python3.7/site-packages/jupytab_server/jupytab_api.py", line 172, in get
response = await AsyncHTTPClient().fetch(request)
ConnectionRefusedError: [Errno 111] Connection refused
ERROR:500 GET /kernel/my_table/schema?security_token=my_token (172.17.0.1) 4.63ms

Any idea how to resolve this?
I'm pretty puzzled because this used to work me a few months ago and I don't recall which updates I've done since then.

@btribonde
Copy link
Collaborator

This may have many different issues, but logs are really needed in the web console to easily diagnose as error could come from notebook, dependencies or os issues...

On linux environment, easiest way is probably to recreate a clean env, and always keep jupytab-server in a dedicated conda or virtualenv environment (not linked to notebook one as dependencies may change more often).

By the way, I wonder how tabpy work as they share a unique environment (server and dependencies).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants