2

环境:

  • 平台是 Ubuntu 16.10。

  • 涌入数据库 v1.2.0

  • influxdb-python v4.0.0

我可以毫无问题地连接到服务器并使用 influx 客户端执行查询。

我可以使用 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',))

有任何想法吗?

4

0 回答 0