无法让Influxdb-python客户端工作

时间:2017-02-06 22:09:59

标签: python influxdb influxdb-python

环境:

  • 平台是Ubuntu 16.10。

  • Influxdb v1.2.0

  • Influxdb-python v4.0.0

我可以连接到服务器并使用涌入客户端执行查询,没有问题。

我可以使用POSTman执行查询。

但是,当我尝试任何Influxdb-python示例时,我始终遇到以下错误:

$ python tutorial.py
Create database: example
Traceback (most recent call last):
  File "tutorial.py", line 68, in <module>
    main(host=args.host, port=args.port)
  File "tutorial.py", line 33, in main
    client.create_database(dbname)
  File "/usr/local/lib/python2.7/dist-packages/influxdb-4.0.0-py2.7.egg/influxdb/client.py", line 488, in create_database
    self.query("CREATE DATABASE {0}".format(quote_ident(dbname)))
  File "/usr/local/lib/python2.7/dist-packages/influxdb-4.0.0-py2.7.egg/influxdb/client.py", line 339, in query
    expected_response_code=expected_response_code
  File "/usr/local/lib/python2.7/dist-packages/influxdb-4.0.0-py2.7.egg/influxdb/client.py", line 246, in request
    raise e
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8086): Max retries exceeded with url: /query?q=CREATE+DATABASE+%22example%22&db=example (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f39e6909b10>: Failed to establish a new connection: [Errno 11] Resource temporarily unavailable',))

有什么想法吗?

0 个答案:

没有答案