Skip to content

Foreign key constraints issue #1935

Closed
Closed

Description

@EugenMayer

Bug Report

Bug reports are pretty free-form; just replace this with whatever. You can also help us triage the issue by including steps to reproduce, expected results, and the actual result. Help us help you!

The following can also be handy:

  • Concourse version: 3.8.0
  • Deployment type (BOSH/Docker/binary): docker
  • Infrastructure/IaaS: mixed
  • Browser (if applicable):

i am seeing this constrain issues

07/01/2018 10:44:122018-01-07 09:44:12.073 UTC [6820] DETAIL:  Key (image_get_container_id)=(877) is not present in table "containers".
07/01/2018 10:44:122018-01-07 09:44:12.073 UTC [6820] STATEMENT:  INSERT INTO containers (meta_type,worker_name,handle,team_id,image_get_container_id) VALUES ($1,$2,$3,$4,$5) RETURNING id, meta_type, meta_step_name, meta_attempt, meta_working_directory, meta_process_user, meta_pipeline_id, meta_job_id, meta_build_id, meta_pipeline_name, meta_job_name, meta_build_name
07/01/2018 10:44:122018-01-07 09:44:12.079 UTC [6841] ERROR:  insert or update on table "containers" violates foreign key constraint "containers_image_get_container_id_fkey"
07/01/2018 10:44:122018-01-07 09:44:12.079 UTC [6841] DETAIL:  Key (image_get_container_id)=(881) is not present in table "containers".
07/01/2018 10:44:122018-01-07 09:44:12.079 UTC [6841] STATEMENT:  INSERT INTO containers (worker_name,handle,team_id,image_get_container_id,meta_type) VALUES ($1,$2,$3,$4,$5) RETURNING id, meta_type, meta_step_name, meta_attempt, meta_working_directory, meta_process_user, meta_pipeline_id, meta_job_id, meta_build_id, meta_pipeline_name, meta_job_name, meta_build_name
07/01/2018 10:44:122018-01-07 09:44:12.087 UTC [6820] ERROR:  insert or update on table "containers" violates foreign key constraint "containers_image_get_container_id_fkey"
07/01/2018 10:44:122018-01-07 09:44:12.087 UTC [6820] DETAIL:  Key (image_get_container_id)=(875) is not present in table "containers".
07/01/2018 10:44:122018-01-07 09:44:12.087 UTC [6820] STATEMENT:  INSERT INTO containers (worker_name,handle,team_id,image_get_container_id,meta_type) VALUES ($1,$2,$3,$4,$5) RETURNING id, meta_type, meta_step_name, meta_attempt, meta_working_directory, meta_process_user, meta_pipeline_id, meta_job_id, meta_build_id, meta_pipeline_name, meta_job_name, meta_build_name
07/01/2018 10:44:122018-01-07 09:44:12.102 UTC [6841] ERROR:  insert or update on table "containers" violates foreign key constraint "containers_image_get_container_id_fkey"
07/01/2018 10:44:122018-01-07 09:44:12.102 UTC [6841] DETAIL:  Key (image_get_container_id)=(880) is not present in table "containers".
07/01/2018 10:44:122018-01-07 09:44:12.102 UTC [6841] STATEMENT:  INSERT INTO containers (meta_type,worker_name,handle,team_id,image_get_container_id) VALUES ($1,$2,$3,$4,$5) RETURNING id, meta_type, meta_step_name, meta_attempt, meta_working_directory, meta_process_user, meta_pipeline_id, meta_job_id, meta_build_id, meta_pipeline_name, meta_job_name, meta_build_name
07/01/2018 10:44:172018-01-07 09:44:17.089 UTC [6820] ERROR:  insert or update on table "containers" violates foreign key constraint "containers_image_get_container_id_fkey"
07/01/2018 10:44:172018-01-07 09:44:17.089 UTC [6820] DETAIL:  Key (image_get_container_id)=(876) is not present in table "containers".
07/01/2018 10:44:172018-01-07 09:44:17.089 UTC [6820] STATEMENT:  INSERT INTO containers (image_get_container_id,meta_type,worker_name,handle,team_id) VALUES ($1,$2,$3,$4,$5) RETURNING id, meta_type, meta_step_name, meta_attempt, meta_working_directory, meta_process_user, meta_pipeline_id, meta_job_id, meta_build_id, meta_pipeline_name, meta_job_name, meta_build_name
07/01/2018 10:44:172018-01-07 09:44:17.104 UTC [6843] ERROR:  insert or update on table "containers" violates foreign key constraint "containers_image_get_container_id_fkey"
07/01/2018 10:44:172018-01-07 09:44:17.104 UTC [6843] DETAIL:  Key (image_get_container_id)=(883) is not present in table "containers".
07/01/2018 10:44:172018-01-07 09:44:17.104 UTC [6843] STATEMENT:  INSERT INTO containers (handle,team_id,image_get_container_id,meta_type,worker_name) VALUES ($1,$2,$3,$4,$5) RETURNING id, meta_type, meta_step_name, meta_attempt, meta_working_directory, meta_process_user, meta_pipeline_id, meta_job_id, meta_build_id, meta_pipeline_name, meta_job_name, meta_build_name

beside that, concourse seem to be not working at all

image

image

fly -t kw workers
name          containers  platform  tags  team  state    version
6130fc87ce04  37          linux     none  none  running  1.2
fd73bf666f01  48          linux     none  none  running  1.2

tsa does not show any errors in the logs, neither the workers do

Activity

  1. EugenMayer commented on Jan 7, 2018

    @EugenMayer
    Author

    during a worker start i see this once

    07/01/2018 11:25:552018/01/07 10:25:55 failed to forward remote connection: dial tcp 127.0.0.1:7777: getsockopt: connection refused
    07/01/2018 11:25:55{"timestamp":"1515320755.149465084","source":"tsa","message":"tsa.connection.channel.forward-worker.register.failed-to-fetch-containers","log_level":2,"data":{"error":"Get http://api/containers: EOF","remote":"10.42.9.219:51772","session":"10.1.1.5"}}
    

    followed by

    07/01/2018 11:25:55{"timestamp":"1515320755.149465084","source":"tsa","message":"tsa.connection.channel.forward-worker.register.failed-to-fetch-containers","log_level":2,"data":{"error":"Get http://api/containers: EOF","remote":"10.42.9.219:51772","session":"10.1.1.5"}}
    07/01/2018 11:25:55{"timestamp":"1515320755.167318344","source":"tsa","message":"tsa.connection.channel.forward-worker.register.failed-to-reach-worker","log_level":1,"data":{"baggageclaim-took":"17.721423ms","garden-took":"12.375368ms","remote":"10.42.9.219:51772","session":"10.1.1.5"}}
    07/01/2018 11:25:55{"timestamp":"1515320755.167605877","source":"tsa","message":"tsa.connection.channel.forward-worker.register.done","log_level":1,"data":{"remote":"10.42.9.219:51772","session":"10.1.1.5","worker-address":"127.0.0.1:40625","worker-platform":"linux","worker-tags":""}}
    07/01/2018 11:25:56{"timestamp":"1515320756.167963505","source":"tsa","message":"tsa.connection.channel.forward-worker.register.start","log_level":1,"data":{"remote":"10.42.9.219:51772","session":"10.1.1.6","worker-address":"127.0.0.1:40625","worker-platform":"linux","worker-tags":""}}
    07/01/2018 11:25:56{"timestamp":"1515320756.197741508","source":"tsa","message":"tsa.connection.channel.forward-worker.register.reached-worker","log_level":0,"data":{"baggageclaim-took":"14.494423ms","garden-took":"15.078109ms","remote":"10.42.9.219:51772","session":"10.1.1.6"}}11:25:55{"timestamp":"1515320755.167318344","source":"tsa","message":"tsa.connection.channel.forward-worker.register.failed-to-reach-worker","log_level":1,"data":{"baggageclaim-took":"17.721423ms","garden-took":"12.375368ms","remote":"10.42.9.219:51772","session":"10.1.1.5"}}
    07/01/2018 11:25:55{"timestamp":"1515320755.167605877","source":"tsa","message":"tsa.connection.channel.forward-worker.register.done","log_level":1,"data":{"remote":"10.42.9.219:51772","session":"10.1.1.5","worker-address":"127.0.0.1:40625","worker-platform":"linux","worker-tags":""}}
    07/01/2018 11:25:56{"timestamp":"1515320756.167963505","source":"tsa","message":"tsa.connection.channel.forward-worker.register.start","log_level":1,"data":{"remote":"10.42.9.219:51772","session":"10.1.1.6","worker-address":"127.0.0.1:40625","worker-platform":"linux","worker-tags":""}}
    07/01/2018 11:25:56{"timestamp":"1515320756.197741508","source":"tsa","message":"tsa.connection.channel.forward-worker.register.reached-worker","log_level":0,"data":{"baggageclaim-took":"14.494423ms","garden-took":"15.078109ms","remote":"10.42.9.219:51772","session":"10.1.1.6"}}
    

    it seems to register just fine, so maybe that recovers?

    AFAICS this is related to garden being inaccessible

              --bind-ip=                                         IP address on which to listen for the Garden server. (default: 127.0.0.1) [$CONCOURSE_BIND_IP]
              --bind-port=                                       Port on which to listen for the Garden server. (default: 7777) [$CONCOURSE_BIND_PORT]
    

    so thats most probably an unrelated and uncritical issue that garden did not yet start up? its started on the worker itself?

  2. xtremerui commented on May 4, 2018

    @xtremerui
    Contributor

    this is because garden is not running up when worker registering with TSA and TSA healthcheck back on garden server on worker. It's expected behaviour. I think we could close this issue @jama-pivotal .

  3. jama22 commented on May 4, 2018

    @jama22

    Closing

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions