You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running stackstac from a Jupyter instance running inside a docker container. When calling stackstac.show I get the following error:
/srv/conda/envs/notebook/lib/python3.8/site-packages/stackstac/show.py:484: UserWarning: Calculating 2nd and 98th percentile of the entire array, since no range was given. This could be expensive!
warnings.warn(
tornado.application - ERROR - Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <zmq.eventloop.ioloop.ZMQIOLoop object at 0x7f6c083fabe0>>, <Task finished name='Task-51' coro=<_launch_server.<locals>.run() done, defined at /srv/conda/envs/notebook/lib/python3.8/site-packages/stackstac/show.py:847> exception=OSError(99, "error while attempting to bind on address ('::1', 8000, 0, 0): cannot assign requested address")>)
Traceback (most recent call last):
File "/srv/conda/envs/notebook/lib/python3.8/site-packages/tornado/ioloop.py", line 741, in _run_callback
ret = callback()
File "/srv/conda/envs/notebook/lib/python3.8/site-packages/tornado/ioloop.py", line 765, in _discard_future_result
future.result()
File "/srv/conda/envs/notebook/lib/python3.8/site-packages/stackstac/show.py", line 858, in run
await site.start()
File "/srv/conda/envs/notebook/lib/python3.8/site-packages/aiohttp/web_runner.py", line 121, in start
self._server = await loop.create_server(
File "/srv/conda/envs/notebook/lib/python3.8/asyncio/base_events.py", line 1463, in create_server
raise OSError(err.errno, 'error while attempting '
OSError: [Errno 99] error while attempting to bind on address ('::1', 8000, 0, 0): cannot assign requested address
It looks like it is failing to bind to the address ::1 (which looks like it is the IPv6 version of 127.0.0.1). Following the stackstac code, I found https://github.com/gjoseph92/stackstac/blob/main/stackstac/show.py#L857 where the server is started on localhost, which is presumably converted to ::1 somewhere inside the server hosting code.
I found a few other issues on Github that seem to be very similar, for other applications - eg. here. This links to an aiohttp issue here which I can't quite work out if it has been fixed or not.
Anyway, the solution suggested on these issues seems to be forcing the binding address to be either 0.0.0.0 or 127.0.0.1. Changing localhost to either of these at https://github.com/gjoseph92/stackstac/blob/main/stackstac/show.py#L857 - though I must admit I can't really understand why localhost doesn't work.
Do you have any deeper understanding of this? If not, would you be happy with me submitting a PR to change to either 0.0.0.0 or 127.0.0.1?
The text was updated successfully, but these errors were encountered:
Yeah, I discovered this a few days ago. I was really hoping it wouldn't be related to your problem, but had a feeling it was. Sorry I didn't mention it and you had to go debugging too.
I already have a fix for it 2d2781e in a somewhat long-running branch. I should probably just merge this branch, but if it would help you to get the change in faster, please feel free to open a PR with just this change and I'll merge it right away.
Thanks @gjoseph92. I'll probably make a small PR on Monday just to make it easier to get the fix in place across the various places I use stackstac.
Unfortunately this doesn't fix #96, it seems to be entirely independent of it. Also, when running in my Docker container, I'm getting a bug that is similar to #96 but not quite the same - in this case the checkerboard pattern is appearing, but the data isn't appearing. I'll post more details either in #96 or a separate issue next week.
I'm running stackstac from a Jupyter instance running inside a docker container. When calling
stackstac.show
I get the following error:It looks like it is failing to bind to the address
::1
(which looks like it is the IPv6 version of 127.0.0.1). Following the stackstac code, I found https://github.com/gjoseph92/stackstac/blob/main/stackstac/show.py#L857 where the server is started onlocalhost
, which is presumably converted to::1
somewhere inside the server hosting code.I found a few other issues on Github that seem to be very similar, for other applications - eg. here. This links to an aiohttp issue here which I can't quite work out if it has been fixed or not.
Anyway, the solution suggested on these issues seems to be forcing the binding address to be either
0.0.0.0
or127.0.0.1
. Changinglocalhost
to either of these at https://github.com/gjoseph92/stackstac/blob/main/stackstac/show.py#L857 - though I must admit I can't really understand whylocalhost
doesn't work.Do you have any deeper understanding of this? If not, would you be happy with me submitting a PR to change to either
0.0.0.0
or127.0.0.1
?The text was updated successfully, but these errors were encountered: