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

Docker phpmyadmin after login: 504 Gateway Time-out #141

Closed
lohe opened this Issue Dec 12, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@lohe

lohe commented Dec 12, 2017

Not sure, if that an issue or not, but cannot find any place to ask the question. I inserted here https://stackoverflow.com/questions/47750788/docker-phpmyadmin-after-login-504-gateway-time-out , but no responses.

Trying to use docker phpmyadmin to connect several different mysql's both local (containers) and remote servers. All works fine till I start to log in - connecting to remote server works like a charm, problem is to connect local server's containers. My conf for compose looks like this:

version: '3'

services:
  phpmyadmin:
    image: phpmyadmin_4.7.6
    container_name: phpmyadmin
    restart: always
    ports:
      - "8081:80"
    volumes:
      - "./conf_phpmyadmin/:/root/confs/"
      - "/sessions"
    networks:
      proxy:
        ipv4_address: "172.18.0.4"
    environment:
      - PMA_ABSOLUTE_URI=https://<access-url>/phpmyadmin/
      - PMA_HOSTS=172.21.0.3,192.168.1.65
      - PMA_VERBOSES=LocalMysqlContainer,RemoteMySql
    links:
      - mysql-5.7:mysql

  php7:
    restart: always
    image: php7-phalcon
    hostname: <hostname>
    container_name: <container name>
    expose:
      - 82
    # add static IP in case of restart
    networks:
      network1:
        ipv4_address: "172.21.0.2"
      proxy:
    environment:
      - VIRTUAL_HOST=${VIRTUAL_HOST}
      - LETSENCRYPT_HOST=${VIRTUAL_HOST}
      - LETSENCRYPT_EMAIL=${EMAIL}

  mysql-5.7:
    restart: always
    image: prod-mysql
    container_name: mysql
    # add static IP in case of restart
    networks:
      network1:
        ipv4_address: "172.21.0.3"
    volumes:
      - "/var/lib/mysql"
    environment:
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASS}

networks:
  proxy:
    external:
      name: webproxy_proxy
  network1:
    driver: bridge
    ipam:
      config:
        - subnet: "172.21.0.0/24"
  • Tried to add mysql container to same network as nginx proxy is (same subnet as phpmyadmin is).
  • Tried different ports and IP-s and variations.

Using:

docker-compose version 1.17.1, build 6d101fb
docker-py version: 2.5.1
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.1t  3 May 2016

Docker itself:

Client:
 Version:      17.09.0-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:42:18 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.09.0-ce
 API version:  1.32 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:40:56 2017
 OS/Arch:      linux/amd64
 Experimental: false
@lohe

This comment has been minimized.

Show comment
Hide comment
@lohe

lohe Dec 12, 2017

Okei, figured it out myself. Not sure what exactly fixed it, but this link
https://www.dgendill.com/posts/programming/2016-07-03-docker-mysql-notes.html
was big help.

lohe commented Dec 12, 2017

Okei, figured it out myself. Not sure what exactly fixed it, but this link
https://www.dgendill.com/posts/programming/2016-07-03-docker-mysql-notes.html
was big help.

@nijel nijel added the question label Dec 18, 2017

@nijel nijel self-assigned this Dec 18, 2017

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Dec 18, 2017

Member

Good you've fixed it yourself. Anyway to debug such problems, it's best to look at server logs, this can be achieved by following (replace phpmyadmin by name of your phpmyadmin container):

docker exec phpmyadmin cat /var/log/php-fpm.log
docker exec phpmyadmin cat /var/log/nginx-error.log
docker exec phpmyadmin cat /var/log/supervisord.log
Member

nijel commented Dec 18, 2017

Good you've fixed it yourself. Anyway to debug such problems, it's best to look at server logs, this can be achieved by following (replace phpmyadmin by name of your phpmyadmin container):

docker exec phpmyadmin cat /var/log/php-fpm.log
docker exec phpmyadmin cat /var/log/nginx-error.log
docker exec phpmyadmin cat /var/log/supervisord.log

@nijel nijel closed this Dec 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment