2

Hej,我正在尝试在数字海洋上建立与我的 orientdb 服务器的远程连接。

但是,我尝试通过以下方式连接:

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 python 3.5 发行版。

有什么提示吗?

4

1 回答 1

3

我发现了我的错误,它应该是端口值的一个愚蠢错误,port:2424而不是port:2480属于 OrientDB 工作室。

于 2017-02-10T12:57:47.527 回答