Apache nifi java.net.UnknownHostException:e2a2e8ab6b6b:名称或服务未知

时间:2019-11-21 20:18:00

标签: docker docker-compose apache-nifi

大家好,我在使用以下docker-compose文件创建nifi集群时遇到一个小问题

services:
  zookeeper:
    hostname: zookeeper
    container_name: zookeeper
    image: 'bitnami/zookeeper:latest'
    environment:
      - ALLOW_ANONYMOUS_LOGIN=yes
    networks:
      - efactory-network
  nifi:
    image: apache/nifi:1.9.2
    ports:
      - 8080:8080 # Unsecured HTTP Web Port
      - 8081:8081

    environment:
      - NIFI_WEB_HTTP_PORT=8080
      - NIFI_CLUSTER_IS_NODE=true
      - NIFI_CLUSTER_NODE_PROTOCOL_PORT=8082
      - NIFI_ZK_CONNECT_STRING=zookeeper:2181
      - NIFI_ELECTION_MAX_WAIT=1 min
      - nifi.security.needClientAuth=false
    networks:
      - efactory-network
    volumes:
      - state:/opt/nifi/nifi-1.9.2/state
      - conf:/opt/nifi/nifi-1.9.2/conf
      - content:/opt/nifi/nifi-1.9.2/content_repository
      - db:/opt/nifi/nifi-1.9.2/database_repository
      - flowfile:/opt/nifi/nifi-1.9.2/flowfile_repository
      - provenance:/opt/nifi/nifi-1.9.2/provenance_repository
      - logs:/opt/nifi/nifi-1.9.2/logs
      - data:/opt/nifi/nifi-1.9.2/data
    extra_hosts: 
      - nifi.at:159.69.214.42

networks:
  efactory-network:
    external:
      name: security-network                       

volumes:
  conf:
  content:
  db:
  flowfile:
  provenance:
  logs:
  state:
  data:

我使用Docker卷保留了数据。因此,群集状态应在docker-compose restart上保留。我认为它仍然存在,但给出以下错误

java.net.UnknownHostException: ffcca3db4879

如果有人可以帮助我,我将不胜感激

1 个答案:

答案 0 :(得分:0)

您可以添加您的nifi吗?

 depends_on:
      - zookeeper