我試圖在docker上運行Elasticsearch-Logstash-Kibana堆棧,並配置了here。它在Windows上工作正常,但看起來像在我的半生產Ubuntu VM上,docker-compose有問題。當我跑docker-compose up
,我收到以下錯誤:Docker-compose''NoneType'不可迭代'
/opt/elk-stack# docker-compose up
Recreating f5a2cff82dbf_f5a2cff82dbf_f5a2cff82dbf_f5a2cff82dbf_f5a2cff82dbf_f5a2cff82dbf_elkstack_elasticsearch_1 ...
Recreating f5a2cff82dbf_f5a2cff82dbf_f5a2cff82dbf_f5a2cff82dbf_f5a2cff82dbf_f5a2cff82dbf_elkstack_elasticsearch_1
ERROR: for f5a2cff82dbf_f5a2cff82dbf_f5a2cff82dbf_f5a2cff82dbf_f5a2cff82dbf_f5a2cff82dbf_elkstack_elasticsearch_1 argument of type 'NoneType' is not iterable
ERROR: for elasticsearch argument of type 'NoneType' is not iterable
Traceback (most recent call last):
File "bin/docker-compose", line 3, in <module>
File "compose/cli/main.py", line 68, in main
File "compose/cli/main.py", line 118, in perform_command
File "compose/cli/main.py", line 928, in up
File "compose/project.py", line 450, in up
File "compose/parallel.py", line 70, in parallel_execute
TypeError: argument of type 'NoneType' is not iterable
Failed to execute script docker-compose
我試圖刪除幾乎所有的碼頭工人從-compose.yml文件。下面是它現在的樣子:
version: '2'
services:
elasticsearch:
build: elasticsearch/
logstash:
build: logstash/
depends_on:
- elasticsearch
kibana:
build: kibana/
depends_on:
- elasticsearch
不幸的是,錯誤仍然存在。當我運行docker-compose -f docker-compose.yml config
它看起來像一切都被解析精細,並且在陽明沒有錯誤文件本身:
/opt/elk-stack# docker-compose -f docker-compose.yml config
services:
elasticsearch:
build:
context: /opt/elk-stack/elasticsearch
kibana:
build:
context: /opt/elk-stack/kibana
depends_on:
- elasticsearch
logstash:
build:
context: /opt/elk-stack/logstash
depends_on:
- elasticsearch
version: '2.0'
我試過不同版本的碼頭工人,撰寫的,從1.11.2
到1.15.0
。
我的碼頭版本是Docker version 1.9.1, build a34a1d5
。
OS是Ubuntu 14.04.5 LTS
。
默認的Python解釋器是Python 2.7.6
。
我放棄 - 任何建議如何使這項工作?
沒有空格和製表符混合在一起? –