2017-02-10 4 views
1

Hej, Я пытаюсь установить удаленное соединение с моим сервером orientdb на цифровом океане.Как установить удаленное соединение с OrientDB, распределенным db, используя драйвер pyorient?

однако, я пытаюсь соединиться по:

client =pyorient.OrientDB(host='remote.host.ip', port=2480) 
cluster_info = client.db_open(db_name, db_username, db_password) 

Я получаю следующее сообщение об ошибке PyOrientConnectionPoolException: Server sent empty string

--------------------------------------------------------------------------- 
PyOrientConnectionPoolException   Traceback (most recent call last) 
<ipython-input-26-f9fe1d9a9205> in <module>() 
----> 1 cluster_info = client.db_open(db_name, db_username, db_password) 

/home/jb/anaconda3/envs/myenv/lib/python3.5/site-packages/pyorient/orient.py in db_open(self, db_name, user, password, db_type, client_id) 
    376   ''' 
    377 
--> 378   info, clusters, nodes = self.get_message("DbOpenMessage") \ 
    379    .prepare((db_name, user, password, db_type, client_id)).send().fetch_response() 
    380 

/home/jb/anaconda3/envs/myenv/lib/python3.5/site-packages/pyorient/orient.py in get_message(self, command) 
    487      token = self._auth_token 
    488 
--> 489     message_instance = _Message(self._connection)\ 
    490      .set_session_token(token) 
    491     message_instance._push_callback = self._push_received 

/home/jb/anaconda3/envs/myenv/lib/python3.5/site-packages/pyorient/messages/database.py in __init__(self, _orient_socket) 
    45 class DbOpenMessage(BaseMessage): 
    46  def __init__(self, _orient_socket): 
---> 47   super(DbOpenMessage, self).__init__(_orient_socket) 
    48 
    49   self._user = '' 

/home/jb/anaconda3/envs/myenv/lib/python3.5/site-packages/pyorient/messages/base.py in __init__(self, sock) 
    22   :type sock: OrientSocket 
    23   """ 
---> 24   sock.get_connection() 
    25   self._orientSocket = sock 
    26   self._protocol = self._orientSocket.protocol 

/home/jb/anaconda3/envs/myenv/lib/python3.5/site-packages/pyorient/orient.py in get_connection(self) 
    50  def get_connection(self): 
    51   if not self.connected: 
---> 52    self.connect() 
    53 
    54   return self._socket 

/home/jb/anaconda3/envs/myenv/lib/python3.5/site-packages/pyorient/orient.py in connect(self) 
    69 
    70     raise PyOrientConnectionPoolException(
---> 71      "Server sent empty string", [] 
    72    ) 
    73 

Я бегу pyorient V 1.5.4 и Anaconda3 питона 3.5 распределение.

Любые подсказки?

ответ

2

Я нашел свою ошибку, глупую ошибку в значении порта, она должна быть port:2424, а не port:2480 которая принадлежит к студии OrientDB.

Смежные вопросы