Что означает эта ошибка в исправном контейнере? - PullRequest
0 голосов
/ 29 марта 2019

Я попытался настроить следующее изображение, используя ansible, следуя инструкциям:
https://hub.docker.com/r/mattermost/mattermost-prod-db
Это мой файл:

- name: setup mattermost volumes or directories
  file:
    path: [
           /srv/mattermost,
           /srv/mattermost/postgresql, 
           /srv/mattermost/postgresql/data,
           /srv/mattermost/app, 
           /srv/mattermost/app/config, 
           /srv/mattermost/app/data, 
           /srv/mattermost/app/logs, 
           /srv/mattermost/app/plugins
          ]
    state: directory
    owner: root
    group: root
    mode: 0755

- name: run mattermost postgresql image
  docker_container:
    name: mattermost-postgresql
    image: postgres:9.4-alpine
    restart_policy: always # always restart the container if it stops automatically
    volumes:
      - /srv/mattermost/postgresql/data:/var/lib/postgresql/data
    state: started # make sure container runs
    restart: no # do not restart if already running
    env:
      POSTGRES_USER="{{ vault_mattermost_postgresql_user_name }}"
      POSTGRES_PASSWORD="{{ vault_mattermost_postgresql_user_password }}"
      POSTGRES_DB="{{ vault_mattermost_postgresql_db_name }}"

- name: run mattermost app image
  docker_container:
    name: mattermost-app
    image: mattermost/mattermost-prod-db:latest
    # image: mattermost/mattermost-team-edition:daily-build
    restart_policy: always # always restart the container if it stops automatically
    ports:
      - "5080:80"
    links:
      - mattermost-postgresql:mattermost-postgresql-alias
    volumes:
      - /srv/mattermost/app/config:/mattermost/config:rw
      - /srv/mattermost/app/data:/mattermost/data:rw
      - /srv/mattermost/app/logs:/mattermost/logs:rw
      - /srv/mattermost/app/plugins:/mattermost/plugins:rw
      - /etc/localtime:/etc/localtime:ro
    state: started # make sure container runs
    restart: no # do not restart if already running
    env:
      MM_USERNAME: "{{ vault_mattermost_postgresql_user_name }}"
      MM_PASSWORD: "{{ vault_mattermost_postgresql_user_password }}"
      MM_DBNAME: "{{ vault_mattermost_postgresql_db_name }}"
      # database doesn't use custom host and port (runs on same server)
      DB_HOST: "mattermost-postgresql-alias"
      DB_PORT_NUMBER: "5432"

Учтите, что в конце я пропустил не относящуюся к делу часть, где я устанавливаю параметры для обратного прокси-сервера (важно для вас, потому что использование обратного прокси-сервера освобождает меня от настройки контейнера веб-службы образа докера) и раскрыл некоторую личную информацию.

Когда я запускаю ansible-playbook в фоновом режиме, контейнер запускается нормально, но самая важная служба не работает. Когда я запускаю команду docker logs mattermost-app (материальное-приложение - это определенное имя контейнера), я получаю следующий журнал ошибок:

AWS_ACCESS_KEY_ID is required for Wal-E but not set. Skipping Wal-E setup.
AWS_SECRET_ACCESS_KEY is required for Wal-E but not set. Skipping Wal-E setup.
WALE_S3_PREFIX is required for Wal-E but not set. Skipping Wal-E setup.
AWS_REGION is required for Wal-E but not set. Skipping Wal-E setup.
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
creating template1 database in /var/lib/postgresql/data/base/1 ... ok
initializing pg_authid ... ok
setting password ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
sh: locale: not found
creating collations ... ok
No usable system locales were found.
Use the option "--debug" to see details.
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
****************************************************
WARNING: No password has been set for the database.
         This will allow anyone with access to the
         Postgres port to access your database. In
         Docker's default configuration, this is
         effectively any other container on the same
         system.

         Use "-e POSTGRES_PASSWORD=password" to set
syncing data to disk ... ok
         it in "docker run".
****************************************************

Success. You can now start the database server using:

    postgres -D /var/lib/postgresql/data
or
    pg_ctl -D /var/lib/postgresql/data -l logfile start

waiting for server to start....LOG:  database system was shut down at 2019-03-29 14:23:10 CET
LOG:  MultiXact member wraparound protections are now enabled
LOG:  autovacuum launcher started
LOG:  database system is ready to accept connections
 done
server started

/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/setup-wale.sh

waiting for server to shut down....LOG:  received fast shutdown request
LOG:  aborting any active transactions
LOG:  autovacuum launcher shutting down
LOG:  shutting down
LOG:  database system is shut down
 done
server stopped

PostgreSQL init process complete; ready for start up.

LOG:  database system was shut down at 2019-03-29 14:23:11 CET
LOG:  MultiXact member wraparound protections are now enabled
LOG:  autovacuum launcher started
LOG:  database system is ready to accept connections
FATAL:  role "-d" does not exist
FATAL:  role "-d" does not exist
FATAL:  role "-d" does not exist
FATAL:  role "-d" does not exist
FATAL:  role "-d" does not exist
FATAL:  role "-d" does not exist
FATAL:  role "-d" does not exist
FATAL:  role "-d" does not exist
FATAL:  role "-d" does not exist
FATAL:  role "-d" does not exist
FATAL:  role "-d" does not exist

и здесь я не знаю, что делать. Что означает FATAL: role "-d" does not exist здесь?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...