广场/大厅码头图像中缺少资源类型?

时间:2018-02-27 03:23:19

标签: docker concourse

当我使用下面的compose运行大厅/大厅docker镜像,并将pgadmin附加到DB时,BaseResourceTypesResourceTypes表中没有行。

我在某处读到它们未包含在docker镜像中(或至少是嵌入式迁移脚本)。这对我来说似乎很奇怪。

日志不断重复相同的错误消息: concourse base resource type not found

我的git资源类型以及将其更改为简单的time资源类型时,会收到相同的错误消息。据我所知,因为数据库中没有BaseResourceTypes。是这种情况吗?

或者数据库迁移(我假设在启动时在DB docker容器上运行)失败了吗?

这是我的docker-compose

version: '3'

services:
  concourse-db:
    image: postgres:9.6
    ports:
      - "5432:5432"
    environment:
      POSTGRES_DB: concourse
      POSTGRES_USER: concourse
      POSTGRES_PASSWORD: changeme
      PGDATA: /database

  concourse-web:
    image: concourse/concourse  
    links: [concourse-db]
    command: web
    depends_on: [concourse-db]
    ports: ["8080:8080"]
    volumes: ["./keys/web:/concourse-keys"]
    restart: unless-stopped # required so that it retries until conocurse-db comes up
    environment:
      CONCOURSE_BASIC_AUTH_USERNAME: concourse
      CONCOURSE_BASIC_AUTH_PASSWORD: changeme
      CONCOURSE_EXTERNAL_URL: http://127.0.0.1:8080
      CONCOURSE_POSTGRES_HOST: concourse-db
      CONCOURSE_POSTGRES_USER: concourse
      CONCOURSE_POSTGRES_PASSWORD: changeme
      CONCOURSE_POSTGRES_DATABASE: concourse

  concourse-worker:
    image: concourse/concourse
    privileged: true
    links: [concourse-web]
    depends_on: [concourse-web]
    command: worker
    volumes: ["./keys/web:/concourse-keys"]
    environment:
      CONCOURSE_TSA_HOST: concourse-web

日志:

Attaching to concourse2_concourse-db_1, concourse2_concourse-web_1, concourse2_concourse-worker_1
[36mconcourse-db_1      |[0m The files belonging to this database system will be owned by user "postgres".
[36mconcourse-db_1      |[0m This user must also own the server process.
[36mconcourse-db_1      |[0m 
[36mconcourse-db_1      |[0m The database cluster will be initialized with locale "en_US.utf8".
[36mconcourse-db_1      |[0m The default database encoding has accordingly been set to "UTF8".
[36mconcourse-db_1      |[0m The default text search configuration will be set to "english".
[36mconcourse-db_1      |[0m 
[36mconcourse-db_1      |[0m Data page checksums are disabled.
[36mconcourse-db_1      |[0m 
[36mconcourse-db_1      |[0m fixing permissions on existing directory /database ... ok
[36mconcourse-db_1      |[0m creating subdirectories ... ok
[36mconcourse-db_1      |[0m selecting default max_connections ... 100
[36mconcourse-db_1      |[0m selecting default shared_buffers ... 128MB
[36mconcourse-db_1      |[0m selecting dynamic shared memory implementation ... posix
[36mconcourse-db_1      |[0m creating configuration files ... ok
[36mconcourse-db_1      |[0m running bootstrap script ... ok
[36mconcourse-db_1      |[0m performing post-bootstrap initialization ... ok
[32mconcourse-worker_1  |[0m {"timestamp":"1519700724.114998102","source":"worker","message":"worker.setup.unpacking","log_level":1,"data":{"session":"1"}}
[36mconcourse-db_1      |[0m syncing data to disk ... ok
[36mconcourse-db_1      |[0m 
[36mconcourse-db_1      |[0m Success. You can now start the database server using:
[36mconcourse-db_1      |[0m 
[36mconcourse-db_1      |[0m     pg_ctl -D /database -l logfile start
[36mconcourse-db_1      |[0m 
[36mconcourse-db_1      |[0m 
[36mconcourse-db_1      |[0m WARNING: enabling "trust" authentication for local connections
[36mconcourse-db_1      |[0m You can change this by editing pg_hba.conf or using the option -A, or
[36mconcourse-db_1      |[0m --auth-local and --auth-host, the next time you run initdb.
[36mconcourse-db_1      |[0m waiting for server to start....LOG:  could not bind IPv6 socket: Cannot assign requested address
[36mconcourse-db_1      |[0m HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
[33mconcourse-web_1     |[0m {"timestamp":"1519700724.339243412","source":"atc","message":"atc.db.failed-to-open-db-retrying","log_level":2,"data":{"error":"dial tcp 172.23.0.2:5432: getsockopt: connection refused","session":"3"}}
[36mconcourse-db_1      |[0m LOG:  database system was shut down at 2018-02-27 03:05:22 UTC
[36mconcourse-db_1      |[0m LOG:  MultiXact member wraparound protections are now enabled
[36mconcourse-db_1      |[0m LOG:  database system is ready to accept connections
[36mconcourse-db_1      |[0m LOG:  autovacuum launcher started
[36mconcourse-db_1      |[0m  done
[36mconcourse-db_1      |[0m server started
[32mconcourse-worker_1  |[0m {"timestamp":"1519700729.189012527","source":"worker","message":"worker.setup.done","log_level":1,"data":{"session":"1"}}
[32mconcourse-worker_1  |[0m {"timestamp":"1519700729.189412594","source":"worker","message":"worker.garden.extract-resources.extract.extracting","log_level":1,"data":{"resource-type":"archive","session":"2.1.1"}}
[33mconcourse-web_1     |[0m {"timestamp":"1519700729.340031385","source":"atc","message":"atc.db.failed-to-open-db-retrying","log_level":2,"data":{"error":"dial tcp 172.23.0.2:5432: getsockopt: connection refused","session":"3"}}
[36mconcourse-db_1      |[0m CREATE DATABASE
[36mconcourse-db_1      |[0m 
[36mconcourse-db_1      |[0m CREATE ROLE
[36mconcourse-db_1      |[0m 
[36mconcourse-db_1      |[0m 
[36mconcourse-db_1      |[0m /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
[36mconcourse-db_1      |[0m 
[36mconcourse-db_1      |[0m LOG:  received fast shutdown request
[36mconcourse-db_1      |[0m LOG:  aborting any active transactions
[36mconcourse-db_1      |[0m LOG:  autovacuum launcher shutting down
[36mconcourse-db_1      |[0m LOG:  shutting down
[36mconcourse-db_1      |[0m waiting for server to shut down....LOG:  database system is shut down
[32mconcourse-worker_1  |[0m {"timestamp":"1519700731.520266294","source":"worker","message":"worker.garden.extract-resources.extract.extracting","log_level":1,"data":{"resource-type":"bosh-deployment","session":"2.1.2"}}
[32mconcourse-worker_1  |[0m {"timestamp":"1519700732.135704041","source":"worker","message":"worker.garden.extract-resources.extract.extracting","log_level":1,"data":{"resource-type":"bosh-io-release","session":"2.1.3"}}
[32mconcourse-worker_1  |[0m {"timestamp":"1519700732.371017694","source":"worker","message":"worker.garden.extract-resources.extract.extracting","log_level":1,"data":{"resource-type":"bosh-io-stemcell","session":"2.1.4"}}
[36mconcourse-db_1      |[0m  done
[36mconcourse-db_1      |[0m server stopped
[36mconcourse-db_1      |[0m 
[36mconcourse-db_1      |[0m PostgreSQL init process complete; ready for start up.
[36mconcourse-db_1      |[0m 
[36mconcourse-db_1      |[0m LOG:  database system was shut down at 2018-02-27 03:05:31 UTC
[36mconcourse-db_1      |[0m LOG:  MultiXact member wraparound protections are now enabled
[36mconcourse-db_1      |[0m LOG:  database system is ready to accept connections
[36mconcourse-db_1      |[0m LOG:  autovacuum launcher started
[32mconcourse-worker_1  |[0m {"timestamp":"1519700732.771516323","source":"worker","message":"worker.garden.extract-resources.extract.extracting","log_level":1,"data":{"resource-type":"cf","session":"2.1.5"}}
[32mconcourse-worker_1  |[0m {"timestamp":"1519700733.595455408","source":"worker","message":"worker.garden.extract-resources.extract.extracting","log_level":1,"data":{"resource-type":"docker-image","session":"2.1.6"}}
[36mconcourse-db_1      |[0m ERROR:  relation "migration_version" does not exist at character 21
[36mconcourse-db_1      |[0m STATEMENT:  SELECT version FROM migration_version
[32mconcourse-worker_1  |[0m {"timestamp":"1519700737.670574188","source":"worker","message":"worker.garden.extract-resources.extract.extracting","log_level":1,"data":{"resource-type":"git","session":"2.1.7"}}
[32mconcourse-worker_1  |[0m {"timestamp":"1519700738.554021597","source":"worker","message":"worker.garden.extract-resources.extract.extracting","log_level":1,"data":{"resource-type":"github-release","session":"2.1.8"}}
[36mconcourse-db_1      |[0m ERROR:  relation "migration_version" does not exist at character 21
[36mconcourse-db_1      |[0m STATEMENT:  SELECT version FROM migration_version
[33mconcourse-web_1     |[0m {"timestamp":"1519700738.871385574","source":"tsa","message":"tsa.listening","log_level":1,"data":{}}
[33mconcourse-web_1     |[0m {"timestamp":"1519700738.872081757","source":"atc","message":"atc.listening","log_level":1,"data":{"debug":"127.0.0.1:8079","http":"0.0.0.0:8080"}}

第一个记录的错误是0m ERROR: relation "migration_version" does not exist at character 21

这是迁移失败的症状吗?

哦,我的pipe.yml

resources:
- name: sourcecode
  type: git
  source:
    uri: https://github.com/petegee/CheekyMonkey.git

jobs:
- name: BuildDockerImage
  plan:
  - get: sourcecode
    trigger: true
  - task: build
    config:
      platform: linux
      image_resource:
        type: docker-image
        source: {repository: microsoft/dotnet}
      run:
        path: sh
        args: ["sourcecode/ci/build.sh"]

0 个答案:

没有答案