[GH-ISSUE #71] Error when running with weave #32

Closed
opened 2026-02-26 04:33:50 +03:00 by kerem · 1 comment
Owner

Originally created by @gooftroop on GitHub (May 24, 2018).
Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/71

I am trying to run dns-proxy-server to provide hostname access to services running locally on a weave network via nginx. On startup, I get the following error:

2018/05/24 12:19:12 ERROR f=docker.go:147 pkg=github.com/mageddo/dns-proxy-server/events/docker m=putHostnames no network found to /weave

My docker-compose file looks like:

version: '3'
services:
  nginx:
    image: nginx:latest
    container_name: reverse-proxy
    environment:
      - APP_DOMAIN
      - APP_PORT
      - AUTH_PORT
      - WEAVE_DOMAIN
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx/startup.sh:/startup.sh
      - ./nginx/sites-available:/etc/nginx/conf.d/sites-available
    command: ./startup.sh
    depends_on:
      - app.harmonize

  dns-reverse-proxy:
    image: defreitas/dns-proxy-server:latest
    container_name: dns-proxy-server
    hostname: .${APP_DOMAIN}
    ports:
      - "5380:5380"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    networks:
      - public

  app.harmonize:
    build:
      context: ../../harmonize/
      args:
        - NODE_ENV=development
    image: harmonize/harmonize:latest
    container_name: app.${WEAVE_DOMAIN}
    hostname: app.${WEAVE_DOMAIN}
    dns: ${WEAVE_DNS}
    dns_search: ${WEAVE_DOMAIN}
    restart: always
    environment:
      - reschedule=on-node-failure
    ports:
      - "${APP_PORT}:3000"
      - "9615:9615"
      - "9229:9229"
    volumes:
      - ${HARMONIZLY_ROOT}/harmonize:/usr/local/src/app

  # auth.harmonize:
  #   build:
  #     context: ../../auth/
  #     args:
  #       - NODE_ENV=development
  #   image: harmonize/auth:latest
  #   container_name: "auth.${WEAVE_DOMAIN}"
  #   hostname: "auth.${WEAVE_DOMAIN}"
  #   dns: ${WEAVE_DNS}
  #   dns_search: ${WEAVE_DOMAIN}
  #   restart: always
  #   environment:
  #     - reschedule=on-node-failure
  #   ports:
  #     - "${AUTH_PORT}:3000"
  #     - "9616:9615"
  #     - "9230:9229"
  #   volumes:
  #     - "${HARMONIZLY_ROOT}/auth:/usr/local/src/app"
networks:
  public:
    driver: bridge
  default:
    external:
      name: weave

To Reproduce
Steps to reproduce the behavior:

  1. Install weave
  2. Start weave (weave launch, eval $(weave env)
  3. Start dns-proxy-server

Expected behavior
I would expect that dns_proxy_server starts without error and allows resolution to the running services

Specs:

  • OS: macOS 10.13.3
  • Docker Version: 18.05.0-ce-mac66 (24545)
  • DPS Version: latest
  • Please attach DPS Log file
    dns.txt
Originally created by @gooftroop on GitHub (May 24, 2018). Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/71 I am trying to run `dns-proxy-server` to provide hostname access to services running locally on a weave network via nginx. On startup, I get the following error: ```2018/05/24 12:19:12 ERROR f=docker.go:147 pkg=github.com/mageddo/dns-proxy-server/events/docker m=putHostnames no network found to /weave``` My `docker-compose` file looks like: ``` version: '3' services: nginx: image: nginx:latest container_name: reverse-proxy environment: - APP_DOMAIN - APP_PORT - AUTH_PORT - WEAVE_DOMAIN ports: - "80:80" - "443:443" volumes: - ./nginx/startup.sh:/startup.sh - ./nginx/sites-available:/etc/nginx/conf.d/sites-available command: ./startup.sh depends_on: - app.harmonize dns-reverse-proxy: image: defreitas/dns-proxy-server:latest container_name: dns-proxy-server hostname: .${APP_DOMAIN} ports: - "5380:5380" volumes: - /var/run/docker.sock:/var/run/docker.sock networks: - public app.harmonize: build: context: ../../harmonize/ args: - NODE_ENV=development image: harmonize/harmonize:latest container_name: app.${WEAVE_DOMAIN} hostname: app.${WEAVE_DOMAIN} dns: ${WEAVE_DNS} dns_search: ${WEAVE_DOMAIN} restart: always environment: - reschedule=on-node-failure ports: - "${APP_PORT}:3000" - "9615:9615" - "9229:9229" volumes: - ${HARMONIZLY_ROOT}/harmonize:/usr/local/src/app # auth.harmonize: # build: # context: ../../auth/ # args: # - NODE_ENV=development # image: harmonize/auth:latest # container_name: "auth.${WEAVE_DOMAIN}" # hostname: "auth.${WEAVE_DOMAIN}" # dns: ${WEAVE_DNS} # dns_search: ${WEAVE_DOMAIN} # restart: always # environment: # - reschedule=on-node-failure # ports: # - "${AUTH_PORT}:3000" # - "9616:9615" # - "9230:9229" # volumes: # - "${HARMONIZLY_ROOT}/auth:/usr/local/src/app" networks: public: driver: bridge default: external: name: weave ``` **To Reproduce** Steps to reproduce the behavior: 1. Install weave 2. Start weave (`weave launch`, `eval $(weave env)` 3. Start `dns-proxy-server` **Expected behavior** I would expect that `dns_proxy_server` starts without error and allows resolution to the running services **Specs:** - OS: macOS 10.13.3 - Docker Version: 18.05.0-ce-mac66 (24545) - DPS Version: latest - Please attach DPS Log file [dns.txt](https://github.com/mageddo/dns-proxy-server/files/2035258/dns.txt)
kerem closed this issue 2026-02-26 04:33:50 +03:00
Author
Owner

@mageddo commented on GitHub (May 28, 2018):

Thanks for the information, I can simulate your issue, the reason for the error log is that weave container it's in host network then it didn't have an IP. Besides the error log what issue are you getting?

version: '3'
services:
  nginx:
    image: nginx:latest
    container_name: reverse-proxy
    hostname: mynginx.docker
    networks:
      - default
    environment:
      - APP_DOMAIN
      - APP_PORT
      - AUTH_PORT
      - WEAVE_DOMAIN
    ports:
      - "80:80"
      - "443:443"

networks:
  public:
    driver: bridge
  default:
    external:
      name: weave
<!-- gh-comment-id:392428056 --> @mageddo commented on GitHub (May 28, 2018): Thanks for the information, I can simulate your issue, the reason for the error log is that weave container it's in host network then it didn't have an IP. Besides the error log what issue are you getting? ```yaml version: '3' services: nginx: image: nginx:latest container_name: reverse-proxy hostname: mynginx.docker networks: - default environment: - APP_DOMAIN - APP_PORT - AUTH_PORT - WEAVE_DOMAIN ports: - "80:80" - "443:443" networks: public: driver: bridge default: external: name: weave ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dns-proxy-server-mageddo#32
No description provided.