Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot log in when using loopback address alias #236

Open
chatii opened this issue Sep 12, 2020 · 0 comments
Open

Cannot log in when using loopback address alias #236

chatii opened this issue Sep 12, 2020 · 0 comments
Labels
help wanted Need contributors

Comments

@chatii
Copy link

chatii commented Sep 12, 2020

  • OS: macOS Catalina 10.15.6
  • docker desktop: 2.3.0.4
  • docker Engine: 19.03.12
  • docker Compose: 1.26.2

I'm using Docker with a local loopback address. First, we run the following on the host machine.

DOCKER_HOST_ALIAS_IP="127.100.200.199"
sudo ifconfig lo0 alias ${DOCKER_HOST_ALIAS_IP} up

The docker-compose.yml was prepared as follows (excerpt)

version: '3.8'

x-logging:
  &default-logging
  driver: "fluentd"
  options:
    fluentd-address: fluentd:24224
    fluentd-async-connect: "true"
    tag: "log.{{.Name}}"

services:
  fluentd:
    image: fluent/fluentd:v1.11-1
    ports:
      - "127.20.9.14:24224:24224"

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.9.1
    environment:
      - "discovery.type=single-node"
    expose:
      - "9200"
    ports:
      - "127.20.9.14:9200:9200"
    depends_on:
      - fluentd

  kibana:
    image: docker.elastic.co/kibana/kibana-oss:7.9.1
    links:
      - "elasticsearch"
    ports:
      - "127.20.9.14:5601:5601"
    depends_on:
      - fluentd

  nginx:
    image: nginx:alpine
    volumes:
      - ./.Docker/php-fpm/php.ini:/usr/local/etc/php/php.ini
      - ./:/var/www:cached
    expose:
      - "9000"
    ports:
      - "127.20.9.14:80:80"
    logging: *default-logging
    depends_on:
      - fluentd

elasticsearch and kibana seem to be working correctly.
However, the log of php-fpm doesn't seem to be passed to fluentd.

I tried it without using an alias IP (no IP address in the ports) and everything worked fine.
So I am wondering if the problem is when using an alias IP. Can this be resolved?


Modified docker-compose.yml sample. Change to one that works as it is.
(and sample repo: https://github.com/chatii/fluentd_docker_test)

@repeatedly repeatedly added the help wanted Need contributors label Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Need contributors
Projects
None yet
Development

No branches or pull requests

2 participants