def orientdb_http_server_status():
url = "http://{0}:{1}/server".format(settings.ORIENT_DB_CONFIG['url'], settings.ORIENT_DB_CONFIG['port'])
request = requests.get(url,
auth=basic_auth)
return request.json()
现在我调用上面的函数,以确保在启动服务之前orientdb已启动。但是,如果我没有在没有“sudo”的情况下启动orientDB服务器,则上述函数将通过。从那时起,我所有的API调用都失败了,因为我没有用sudo命令启动orientdb服务器。这是我得到的错误。你知道吗
$ANSI{green {db=dinbog}} Error during file initialization for storage 'dinbog'
java.io.FileNotFoundException: /home/cegprakash/workspace/orientdb-community-2.2.35/databases/dinbog/dinbog.18.wal (Permission denied)
如何在启动web服务之前检查orientDB是否具有sudo权限?你知道吗
您可以这样检查uid:
sudo为0。你知道吗
相关问题 更多 >
编程相关推荐