Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 2.7 Splunk+Python操作超时_Python 2.7_Splunk - Fatal编程技术网

Python 2.7 Splunk+Python操作超时

Python 2.7 Splunk+Python操作超时,python-2.7,splunk,Python 2.7,Splunk,我已经安装了Splunk Python SDK 我正在尝试连接到splunk cloud 告诉我这个错误 socket.error:[Errno 60]操作超时 这是我的密码 import splunklib.client as client class SplunkSearch(): def __init__(self): self.service = client.connect( host=Config.DEVELOPM

我已经安装了Splunk Python SDK 我正在尝试连接到splunk cloud 告诉我这个错误

socket.error:[Errno 60]操作超时

这是我的密码

import splunklib.client as client


class SplunkSearch():
    def __init__(self):

        self.service = client.connect(
                    host=Config.DEVELOPMENT_CONF['splunk']['host'],
                    port=Config.DEVELOPMENT_CONF['splunk']['port'],
                    username=Config.DEVELOPMENT_CONF['splunk']['username'],
                    password=Config.DEVELOPMENT_CONF['splunk']['password'],timeout=None)

请检查配置文件中的主机名。我想你一定要用。这将解决您的问题。

您的端口是什么?443? •对于Splunk cloud用户,主机名类似于http-inputs-xx.splunkcloud.com或http-inputs-xx.cloud.Splunk.com,端口为443