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 use docker 'host' network in order to visit some resources on the network where the host is sitting , got the error "Failed to get port info", here is configuration:
I saw the source code says, if using 'host' network, need to override 'get_ip_and_port'. I have limited knowledge about python, anyone can show me how to configure it?
The text was updated successfully, but these errors were encountered:
I've also encountered this problem, I solved it in this way:
from tornado import gen
from dockerspawner import DockerSpawner
class DockerSpawner_host(DockerSpawner):
@gen.coroutine
def get_ip_and_port(self):
return self.host_ip, self.port
c.DockerSpawner_host.use_internal_ip = False
Put the above code in the jupyterhub_config.py, just before your DockerSpawner configs. In this way, the DockerSpawner_host becomes your new version of DockerSpawner. you should modify your other configurations and replace DockerSpawner with DockerSpawner_host. Hope that will help.
I use docker 'host' network in order to visit some resources on the network where the host is sitting , got the error "Failed to get port info", here is configuration:
I saw the source code says, if using 'host' network, need to override 'get_ip_and_port'. I have limited knowledge about python, anyone can show me how to configure it?
The text was updated successfully, but these errors were encountered: