Я использую Phoenix, Jupyter Notebook в кластере EMR. Я пытаюсь получить доступ к Фениксу через python и Jupyter. Когда я попытался с python на моем терминале, он работает нормально. Но с Jupyter у меня есть эта проблема:
import phoenixdb
import phoenixdb.cursor
database_url = 'http://localhost:8765/'
conn = phoenixdb.connect(database_url, autocommit=True)
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
/opt/conda/lib/python3.6/site-packages/phoenixdb/avatica.py in connect(self)
155 self.connection = httplib.HTTPConnection(self.url.hostname, self.url.port)
--> 156 self.connection.connect()
157 except (httplib.HTTPException, socket.error) as e:
/opt/conda/lib/python3.6/http/client.py in connect(self)
935 self.sock = self._create_connection(
--> 936 (self.host,self.port), self.timeout, self.source_address)
937 self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
/opt/conda/lib/python3.6/socket.py in create_connection(address, timeout, source_address)
723 if err is not None:
--> 724 raise err
725 else:
/opt/conda/lib/python3.6/socket.py in create_connection(address, timeout, source_address)
712 sock.bind(source_address)
--> 713 sock.connect(sa)
714 # Break explicitly a reference cycle
OSError: [Errno 99] Cannot assign requested address
During handling of the above exception, another exception occurred:
InterfaceError Traceback (most recent call last)
<ipython-input-27-f26aa5b99d92> in <module>()
2 import phoenixdb.cursor
3 database_url = 'http://localhost:8765/'
----> 4 conn = phoenixdb.connect(database_url, autocommit=True,max_retries=5)
/opt/conda/lib/python3.6/site-packages/phoenixdb/__init__.py in connect(url, max_retries, **kwargs)
64 """
65 client = AvaticaClient(url, max_retries=max_retries)
---> 66 client.connect()
67 return Connection(client, **kwargs)
/opt/conda/lib/python3.6/site-packages/phoenixdb/avatica.py in connect(self)
156 self.connection.connect()
157 except (httplib.HTTPException, socket.error) as e:
--> 158 raise errors.InterfaceError('Unable to connect to the specified service', e)
159
160 def close(self):
InterfaceError: ('Unable to connect to the specified service', OSError(99, 'Cannot assign requested address'), None, None)
Знаете ли вы, как подключить Jupyter Notebook к Phoenix?
Спасибо