threefoldtech / tfchain_graphql

Graphql for TFchain
Apache License 2.0
2 stars 3 forks source link

Error running processor in docker #128

Closed DylanVerstraete closed 1 year ago

DylanVerstraete commented 1 year ago

got this error after deploying new version

node db/init.js && node scripts/init-countries.js && node -r dotenv/config lib/processor.js 2023-08-09T12:14:54.306464177Z query: SELECT FROM current_schema() query: SHOW server_version; query: SELECT FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC No migrations are pending node:internal/modules/cjs/loader:1024 throw err; ^

Error: Cannot find module '/squid/scripts/init-countries.js' at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1021:15) at Function.Module._load (node:internal/modules/cjs/loader:866:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:22:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }

sameh-farouk commented 1 year ago

I tried to reproduce the issue, but it seems to work fine on my end.

@DylanVerstraete Could you please delete lib and node_modules, revert any changes, then install from scratch and recreate the containers using --force-recreate? Let me know if this resolves the issue for you.

Here is my logs.

02:16:24 sameh@sameh-inspiron-3576 ~/projects/tfchain_graphql
❯ docker compose up
[+] Running 3/0
 ⠿ Container tfchain_graphql-processor-1   Running                                                                                                                                                                                                                                0.0s
 ⠿ Container tfchain_graphql-db-1          Running                                                                                                                                                                                                                                0.0s
 ⠿ Container tfchain_graphql-query-node-1  Running                                                                                                                                                                                                                                0.0s
Attaching to tfchain_graphql-db-1, tfchain_graphql-processor-1, tfchain_graphql-query-node-1
tfchain_graphql-db-1         | CREATE DATABASE
tfchain_graphql-db-1         | 
tfchain_graphql-db-1         | 
tfchain_graphql-db-1         | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
tfchain_graphql-db-1         | 
tfchain_graphql-db-1         | 2023-08-13 11:16:30.415 UTC [48] LOG:  received fast shutdown request
tfchain_graphql-db-1         | waiting for server to shut down....2023-08-13 11:16:30.436 UTC [48] LOG:  aborting any active transactions
tfchain_graphql-db-1         | 2023-08-13 11:16:30.440 UTC [48] LOG:  background worker "logical replication launcher" (PID 55) exited with exit code 1
tfchain_graphql-db-1         | 2023-08-13 11:16:30.443 UTC [50] LOG:  shutting down
tfchain_graphql-db-1         | 2023-08-13 11:16:30.663 UTC [48] LOG:  database system is shut down
tfchain_graphql-db-1         |  done
tfchain_graphql-db-1         | server stopped
tfchain_graphql-db-1         | 
tfchain_graphql-db-1         | PostgreSQL init process complete; ready for start up.
tfchain_graphql-db-1         | 
tfchain_graphql-db-1          | 2023-08-13 11:16:30.885 UTC [1] LOG:  starting PostgreSQL 14.8 (Debian 14.8-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
tfchain_graphql-db-1          | 2023-08-13 11:16:30.885 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
tfchain_graphql-db-1          | 2023-08-13 11:16:30.885 UTC [1] LOG:  listening on IPv6 address "::", port 5432
tfchain_graphql-processor-1   | yarn run v1.22.19
tfchain_graphql-db-1          | 2023-08-13 11:16:30.938 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
tfchain_graphql-processor-1   | $ node db/init.js && node scripts/init-countries.js && node -r dotenv/config lib/processor.js
tfchain_graphql-db-1          | 2023-08-13 11:16:30.983 UTC [63] LOG:  database system was shut down at 2023-08-13 11:16:30 UTC
tfchain_graphql-db-1          | 2023-08-13 11:16:31.013 UTC [1] LOG:  database system is ready to accept connections
tfchain_graphql-processor-1   | query: SELECT * FROM current_schema()
tfchain_graphql-processor-1   | query: SELECT version();
tfchain_graphql-processor-1   | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations'
tfchain_graphql-processor-1   | query: CREATE TABLE "migrations" ("id" SERIAL NOT NULL, "timestamp" bigint NOT NULL, "name" character varying NOT NULL, CONSTRAINT "PK_8c82d7f526340ab734260ea46be" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC
tfchain_graphql-processor-1   | 0 migrations are already loaded in the database.
tfchain_graphql-processor-1   | 11 migrations were found in the source code.
tfchain_graphql-processor-1   | 11 migrations are new migrations must be executed.
tfchain_graphql-processor-1   | query: START TRANSACTION
tfchain_graphql-processor-1   | query: CREATE TABLE "historical_balance" ("id" character varying NOT NULL, "balance" numeric NOT NULL, "timestamp" numeric NOT NULL, "account_id" character varying NOT NULL, CONSTRAINT "PK_74ac29ad0bdffb6d1281a1e17e8" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE INDEX "IDX_383ff006e4b59db91d32cb891e" ON "historical_balance" ("account_id") 
tfchain_graphql-processor-1   | query: CREATE TABLE "account" ("id" character varying NOT NULL, "wallet" text NOT NULL, "balance" numeric NOT NULL, CONSTRAINT "PK_54115ee388cdb6d86bb4bf5b2ea" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "transfer" ("id" character varying NOT NULL, "from" text NOT NULL, "to" text NOT NULL, "amount" numeric NOT NULL, "timestamp" numeric NOT NULL, CONSTRAINT "PK_fd9ddbdd49a17afcbe014401295" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "entity" ("id" character varying NOT NULL, "grid_version" integer NOT NULL, "entity_id" integer NOT NULL, "name" text NOT NULL, "country" text, "city" text, "account_id" text NOT NULL, CONSTRAINT "PK_50a7741b415bc585fcf9c984332" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "twin" ("id" character varying NOT NULL, "grid_version" integer NOT NULL, "twin_id" integer NOT NULL, "account_id" text NOT NULL, "ip" text NOT NULL, CONSTRAINT "PK_18457170fa91d0a787d9f635d7c" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "entity_proof" ("id" character varying NOT NULL, "entity_id" integer NOT NULL, "signature" text NOT NULL, "twin_rel_id" character varying NOT NULL, CONSTRAINT "PK_b55dee5f461106682013d0beef8" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE INDEX "IDX_3d9cbf30c68b79a801e1d5c9b4" ON "entity_proof" ("twin_rel_id") 
tfchain_graphql-processor-1   | query: CREATE TABLE "public_ip" ("id" character varying NOT NULL, "gateway" text NOT NULL, "ip" text NOT NULL, "contract_id" numeric NOT NULL, "farm_id" character varying NOT NULL, CONSTRAINT "PK_f170b0b519632730f41d2ef78f4" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE INDEX "IDX_5cc2d1af1d8132b614abd340b0" ON "public_ip" ("farm_id") 
tfchain_graphql-processor-1   | query: CREATE TABLE "farm" ("id" character varying NOT NULL, "grid_version" integer NOT NULL, "farm_id" integer NOT NULL, "name" text NOT NULL, "twin_id" integer NOT NULL, "pricing_policy_id" integer NOT NULL, "certification_type" character varying(9) NOT NULL, "stellar_address" text, "dedicated_farm" boolean, CONSTRAINT "PK_3bf246b27a3b6678dfc0b7a3f64" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "location" ("id" character varying NOT NULL, "longitude" text NOT NULL, "latitude" text NOT NULL, CONSTRAINT "PK_876d7bdba03c72251ec4c2dc827" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "public_config" ("id" character varying NOT NULL, "ipv4" text, "ipv6" text, "gw4" text, "gw6" text, "domain" text, "node_id" character varying NOT NULL, CONSTRAINT "REL_d394b8b9afbb1b1a2346f9743c" UNIQUE ("node_id"), CONSTRAINT "PK_7839f7dd8f45e37933fb3e35cbb" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE UNIQUE INDEX "IDX_d394b8b9afbb1b1a2346f9743c" ON "public_config" ("node_id") 
tfchain_graphql-processor-1   | query: CREATE TABLE "node_resources_total" ("id" character varying NOT NULL, "hru" numeric NOT NULL, "sru" numeric NOT NULL, "cru" numeric NOT NULL, "mru" numeric NOT NULL, "node_id" character varying NOT NULL, CONSTRAINT "REL_fd430c3a2645c8f409f859c2aa" UNIQUE ("node_id"), CONSTRAINT "PK_964127f256a8ffeba2aa31c098d" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE UNIQUE INDEX "IDX_fd430c3a2645c8f409f859c2aa" ON "node_resources_total" ("node_id") 
tfchain_graphql-processor-1   | query: CREATE TABLE "node_resources_used" ("id" character varying NOT NULL, "hru" numeric NOT NULL, "sru" numeric NOT NULL, "cru" numeric NOT NULL, "mru" numeric NOT NULL, "node_id" character varying NOT NULL, CONSTRAINT "REL_75870a8ed1c14efd1dd4ef4792" UNIQUE ("node_id"), CONSTRAINT "PK_05bf9bc81d419c0f34c8bf08d5f" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE UNIQUE INDEX "IDX_75870a8ed1c14efd1dd4ef4792" ON "node_resources_used" ("node_id") 
tfchain_graphql-processor-1   | query: CREATE TABLE "node_resources_free" ("id" character varying NOT NULL, "hru" numeric NOT NULL, "sru" numeric NOT NULL, "cru" numeric NOT NULL, "mru" numeric NOT NULL, "node_id" character varying NOT NULL, CONSTRAINT "REL_923c4dff43306d0a0f5a98a1ab" UNIQUE ("node_id"), CONSTRAINT "PK_0a15fb3f274365eef34123c2dea" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE UNIQUE INDEX "IDX_923c4dff43306d0a0f5a98a1ab" ON "node_resources_free" ("node_id") 
tfchain_graphql-processor-1   | query: CREATE TABLE "interfaces" ("id" character varying NOT NULL, "name" text NOT NULL, "mac" text NOT NULL, "ips" text NOT NULL, "node_id" character varying NOT NULL, CONSTRAINT "PK_811ec6e568e3c1a89ac5e744731" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE INDEX "IDX_23937641f28c607f061dab4694" ON "interfaces" ("node_id") 
tfchain_graphql-processor-1   | query: CREATE TABLE "node" ("id" character varying NOT NULL, "grid_version" integer NOT NULL, "node_id" integer NOT NULL, "farm_id" integer NOT NULL, "twin_id" integer NOT NULL, "country" text, "city" text, "uptime" numeric, "created" integer NOT NULL, "farming_policy_id" integer NOT NULL, "certification_type" character varying(9), "secure" boolean, "virtualized" boolean, "serial_number" text, "created_at" numeric NOT NULL, "updated_at" numeric NOT NULL, "location_id" character varying NOT NULL, CONSTRAINT "PK_8c8caf5f29d25264abe9eaf94dd" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE INDEX "IDX_d224b7b862841f24dd85b55605" ON "node" ("location_id") 
tfchain_graphql-processor-1   | query: CREATE TABLE "pricing_policy" ("id" character varying NOT NULL, "grid_version" integer NOT NULL, "pricing_policy_id" integer NOT NULL, "name" text NOT NULL, "su" jsonb NOT NULL, "cu" jsonb NOT NULL, "nu" jsonb NOT NULL, "ipu" jsonb NOT NULL, "foundation_account" text NOT NULL, "certified_sales_account" text NOT NULL, "dedicated_node_discount" integer NOT NULL, CONSTRAINT "PK_78105eb11bd75fd76a23bbc9bb1" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "country" ("id" character varying NOT NULL, "country_id" integer NOT NULL, "code" text NOT NULL, "name" text NOT NULL, "region" text NOT NULL, "subregion" text NOT NULL, "lat" text, "long" text, CONSTRAINT "PK_bf6e37c231c4f4ea56dcd887269" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "city" ("id" character varying NOT NULL, "city_id" integer NOT NULL, "country_id" integer NOT NULL, "name" text NOT NULL, CONSTRAINT "PK_b222f51ce26f7e5ca86944a6739" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "contract_resources" ("id" character varying NOT NULL, "hru" numeric NOT NULL, "sru" numeric NOT NULL, "cru" numeric NOT NULL, "mru" numeric NOT NULL, "contract_id" character varying NOT NULL, CONSTRAINT "PK_557de19994fcca90916e8c6582f" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE INDEX "IDX_621238dffde9099b2233650235" ON "contract_resources" ("contract_id") 
tfchain_graphql-processor-1   | query: CREATE TABLE "node_contract" ("id" character varying NOT NULL, "grid_version" integer NOT NULL, "contract_id" numeric NOT NULL, "twin_id" integer NOT NULL, "node_id" integer NOT NULL, "deployment_data" text NOT NULL, "deployment_hash" text NOT NULL, "number_of_public_i_ps" integer NOT NULL, "state" character varying(10) NOT NULL, "created_at" numeric NOT NULL, "resources_used_id" character varying, CONSTRAINT "PK_a5f90b17f504ffcd79d1f66574a" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE INDEX "IDX_f294cfb50bb7c7b976d86c08fd" ON "node_contract" ("resources_used_id") 
tfchain_graphql-processor-1   | query: CREATE TABLE "name_contract" ("id" character varying NOT NULL, "grid_version" integer NOT NULL, "contract_id" numeric NOT NULL, "twin_id" integer NOT NULL, "name" text NOT NULL, "state" character varying(10) NOT NULL, "created_at" numeric NOT NULL, CONSTRAINT "PK_7b4cd056bbb83602d211996360f" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "rent_contract" ("id" character varying NOT NULL, "grid_version" integer NOT NULL, "contract_id" numeric NOT NULL, "twin_id" integer NOT NULL, "node_id" integer NOT NULL, "state" character varying(10) NOT NULL, "created_at" numeric NOT NULL, CONSTRAINT "PK_3c99766b627604d5950d704e33a" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "nru_consumption" ("id" character varying NOT NULL, "contract_id" numeric NOT NULL, "timestamp" numeric NOT NULL, "window" numeric, "nru" numeric, CONSTRAINT "PK_ca7956fb8fcdb7198737387d9a8" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "contract_bill_report" ("id" character varying NOT NULL, "contract_id" numeric NOT NULL, "discount_received" character varying(7) NOT NULL, "amount_billed" numeric NOT NULL, "timestamp" numeric NOT NULL, CONSTRAINT "PK_5b21fd81e47bddc5f1fdbc8d7ee" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "farming_policy" ("id" character varying NOT NULL, "grid_version" integer NOT NULL, "farming_policy_id" integer NOT NULL, "name" text NOT NULL, "cu" integer NOT NULL, "su" integer NOT NULL, "nu" integer NOT NULL, "ipv4" integer NOT NULL, "timestamp" numeric NOT NULL, "certification_type" character varying(9) NOT NULL, CONSTRAINT "PK_5d2ec9534104f44e4d989c4e82f" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "uptime_event" ("id" character varying NOT NULL, "node_id" integer NOT NULL, "uptime" numeric NOT NULL, "timestamp" numeric NOT NULL, CONSTRAINT "PK_90783463b0d0b660367ebd7f5ff" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "mint_transaction" ("id" character varying NOT NULL, "amount" numeric NOT NULL, "target" text NOT NULL, "block" integer NOT NULL, CONSTRAINT "PK_19f4328320501dfd14e2bae0855" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "burn_transaction" ("id" character varying NOT NULL, "block" integer NOT NULL, "amount" numeric NOT NULL, "target" text NOT NULL, CONSTRAINT "PK_20ec76c5c56dd6b47dec5f0aaa8" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "refund_transaction" ("id" character varying NOT NULL, "block" integer NOT NULL, "amount" numeric NOT NULL, "target" text NOT NULL, "tx_hash" text NOT NULL, CONSTRAINT "PK_74ffc5427c595968dd777f71bf4" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: ALTER TABLE "historical_balance" ADD CONSTRAINT "FK_383ff006e4b59db91d32cb891e9" FOREIGN KEY ("account_id") REFERENCES "account"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: ALTER TABLE "entity_proof" ADD CONSTRAINT "FK_3d9cbf30c68b79a801e1d5c9b41" FOREIGN KEY ("twin_rel_id") REFERENCES "twin"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: ALTER TABLE "public_ip" ADD CONSTRAINT "FK_5cc2d1af1d8132b614abd340b06" FOREIGN KEY ("farm_id") REFERENCES "farm"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: ALTER TABLE "public_config" ADD CONSTRAINT "FK_d394b8b9afbb1b1a2346f9743cd" FOREIGN KEY ("node_id") REFERENCES "node"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: ALTER TABLE "node_resources_total" ADD CONSTRAINT "FK_fd430c3a2645c8f409f859c2aae" FOREIGN KEY ("node_id") REFERENCES "node"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: ALTER TABLE "node_resources_used" ADD CONSTRAINT "FK_75870a8ed1c14efd1dd4ef47921" FOREIGN KEY ("node_id") REFERENCES "node"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: ALTER TABLE "node_resources_free" ADD CONSTRAINT "FK_923c4dff43306d0a0f5a98a1aba" FOREIGN KEY ("node_id") REFERENCES "node"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: ALTER TABLE "interfaces" ADD CONSTRAINT "FK_23937641f28c607f061dab4694b" FOREIGN KEY ("node_id") REFERENCES "node"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: ALTER TABLE "node" ADD CONSTRAINT "FK_d224b7b862841f24dd85b556059" FOREIGN KEY ("location_id") REFERENCES "location"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: ALTER TABLE "contract_resources" ADD CONSTRAINT "FK_621238dffde9099b2233650235d" FOREIGN KEY ("contract_id") REFERENCES "node_contract"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: ALTER TABLE "node_contract" ADD CONSTRAINT "FK_f294cfb50bb7c7b976d86c08fda" FOREIGN KEY ("resources_used_id") REFERENCES "contract_resources"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1649337032476,"Init1649337032476"]
tfchain_graphql-processor-1   | Migration Init1649337032476 has been  executed successfully.
tfchain_graphql-processor-1   | query: ALTER TABLE "node_contract" DROP COLUMN "state" cascade
tfchain_graphql-processor-1   | query: ALTER TABLE "node_contract" ADD "state" character varying(11) NOT NULL
tfchain_graphql-processor-1   | query: ALTER TABLE "name_contract" DROP COLUMN "state" cascade
tfchain_graphql-processor-1   | query: ALTER TABLE "name_contract" ADD "state" character varying(11) NOT NULL
tfchain_graphql-processor-1   | query: ALTER TABLE "rent_contract" DROP COLUMN "state" cascade
tfchain_graphql-processor-1   | query: ALTER TABLE "rent_contract" ADD "state" character varying(11) NOT NULL
tfchain_graphql-processor-1   | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1653490002499,"graceperiod1653490002499"]
tfchain_graphql-processor-1   | Migration graceperiod1653490002499 has been  executed successfully.
tfchain_graphql-processor-1   | query: ALTER TABLE "farm" RENAME COLUMN "certification_type" TO "certification"
tfchain_graphql-processor-1   | query: ALTER TABLE "node" DROP COLUMN "certification_type"
tfchain_graphql-processor-1   | query: ALTER TABLE "farming_policy" DROP COLUMN "timestamp"
tfchain_graphql-processor-1   | query: ALTER TABLE "farming_policy" DROP COLUMN "certification_type"
tfchain_graphql-processor-1   | query: ALTER TABLE "node" ADD "certification" character varying(9)
tfchain_graphql-processor-1   | query: ALTER TABLE "node" ADD "connection_price" integer
tfchain_graphql-processor-1   | query: ALTER TABLE "farming_policy" ADD "minimal_uptime" integer
tfchain_graphql-processor-1   | query: ALTER TABLE "farming_policy" ADD "policy_created" integer
tfchain_graphql-processor-1   | query: ALTER TABLE "farming_policy" ADD "policy_end" integer
tfchain_graphql-processor-1   | query: ALTER TABLE "farming_policy" ADD "immutable" boolean
tfchain_graphql-processor-1   | query: ALTER TABLE "farming_policy" ADD "default" boolean
tfchain_graphql-processor-1   | query: ALTER TABLE "farming_policy" ADD "node_certification" character varying(9)
tfchain_graphql-processor-1   | query: ALTER TABLE "farming_policy" ADD "farm_certification" character varying(12)
tfchain_graphql-processor-1   | query: ALTER TABLE "farm" DROP COLUMN "certification"
tfchain_graphql-processor-1   | query: ALTER TABLE "farm" ADD "certification" character varying(12)
tfchain_graphql-processor-1   | query: ALTER TABLE "farming_policy" ALTER COLUMN "name" DROP NOT NULL
tfchain_graphql-processor-1   | query: ALTER TABLE "farming_policy" ALTER COLUMN "cu" DROP NOT NULL
tfchain_graphql-processor-1   | query: ALTER TABLE "farming_policy" ALTER COLUMN "su" DROP NOT NULL
tfchain_graphql-processor-1   | query: ALTER TABLE "farming_policy" ALTER COLUMN "nu" DROP NOT NULL
tfchain_graphql-processor-1   | query: ALTER TABLE "farming_policy" ALTER COLUMN "ipv4" DROP NOT NULL
tfchain_graphql-processor-1   | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1655130809835,"dao1655130809835"]
tfchain_graphql-processor-1   | Migration dao1655130809835 has been  executed successfully.
tfchain_graphql-processor-1   | query: CREATE TABLE "solution_provider" ("id" character varying NOT NULL, "solution_provider_id" numeric NOT NULL, "description" text NOT NULL, "link" text NOT NULL, "approved" boolean NOT NULL, "providers" jsonb, CONSTRAINT "PK_dbb1dd40ae8f70dc9bbe2ce6347" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: ALTER TABLE "node_contract" ADD "solution_provider_id" integer
tfchain_graphql-processor-1   | query: ALTER TABLE "name_contract" ADD "solution_provider_id" integer
tfchain_graphql-processor-1   | query: ALTER TABLE "rent_contract" ADD "solution_provider_id" integer
tfchain_graphql-processor-1   | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1660037421023,"solution_provider1660037421023"]
tfchain_graphql-processor-1   | Migration solution_provider1660037421023 has been  executed successfully.
tfchain_graphql-processor-1   | query: CREATE TABLE "service_contract" ("id" character varying NOT NULL, "service_contract_id" numeric NOT NULL, "service_twin_id" integer NOT NULL, "consumer_twin_id" integer NOT NULL, "base_fee" numeric NOT NULL, "variable_fee" numeric NOT NULL, "metadata" text NOT NULL, "accepted_by_service" boolean NOT NULL, "accepted_by_consumer" boolean NOT NULL, "last_bill" numeric NOT NULL, "state" character varying(14) NOT NULL, CONSTRAINT "PK_ff58318f8230b8053067edd0343" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: CREATE TABLE "service_contract_bill" ("id" character varying NOT NULL, "service_contract_id" numeric NOT NULL, "variable_amount" numeric NOT NULL, "window" numeric NOT NULL, "metadata" text, "amount" numeric NOT NULL, CONSTRAINT "PK_1fd26292c0913e974b774342fa7" PRIMARY KEY ("id"))
tfchain_graphql-processor-1   | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1672322090839,"service_contract1672322090839"]
tfchain_graphql-processor-1   | Migration service_contract1672322090839 has been  executed successfully.
tfchain_graphql-processor-1   | query: ALTER TABLE "twin" DROP COLUMN "ip"
tfchain_graphql-processor-1   | query: ALTER TABLE "twin" ADD "relay" text
tfchain_graphql-processor-1   | query: ALTER TABLE "twin" ADD "public_key" text
tfchain_graphql-processor-1   | query: ALTER TABLE "historical_balance" DROP CONSTRAINT "FK_383ff006e4b59db91d32cb891e9"
tfchain_graphql-processor-1   | query: ALTER TABLE "historical_balance" ALTER COLUMN "account_id" DROP NOT NULL
tfchain_graphql-processor-1   | query: ALTER TABLE "entity_proof" DROP CONSTRAINT "FK_3d9cbf30c68b79a801e1d5c9b41"
tfchain_graphql-processor-1   | query: ALTER TABLE "entity_proof" ALTER COLUMN "twin_rel_id" DROP NOT NULL
tfchain_graphql-processor-1   | query: ALTER TABLE "public_ip" DROP CONSTRAINT "FK_5cc2d1af1d8132b614abd340b06"
tfchain_graphql-processor-1   | query: ALTER TABLE "public_ip" ALTER COLUMN "farm_id" DROP NOT NULL
tfchain_graphql-processor-1   | query: ALTER TABLE "interfaces" DROP CONSTRAINT "FK_23937641f28c607f061dab4694b"
tfchain_graphql-processor-1   | query: ALTER TABLE "interfaces" ALTER COLUMN "node_id" DROP NOT NULL
tfchain_graphql-processor-1   | query: ALTER TABLE "node" DROP CONSTRAINT "FK_d224b7b862841f24dd85b556059"
tfchain_graphql-processor-1   | query: ALTER TABLE "node" ALTER COLUMN "location_id" DROP NOT NULL
tfchain_graphql-processor-1   | query: ALTER TABLE "contract_resources" DROP CONSTRAINT "FK_621238dffde9099b2233650235d"
tfchain_graphql-processor-1   | query: ALTER TABLE "contract_resources" ALTER COLUMN "contract_id" DROP NOT NULL
tfchain_graphql-processor-1   | query: ALTER TABLE "historical_balance" ADD CONSTRAINT "FK_383ff006e4b59db91d32cb891e9" FOREIGN KEY ("account_id") REFERENCES "account"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: ALTER TABLE "entity_proof" ADD CONSTRAINT "FK_3d9cbf30c68b79a801e1d5c9b41" FOREIGN KEY ("twin_rel_id") REFERENCES "twin"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: ALTER TABLE "public_ip" ADD CONSTRAINT "FK_5cc2d1af1d8132b614abd340b06" FOREIGN KEY ("farm_id") REFERENCES "farm"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: ALTER TABLE "interfaces" ADD CONSTRAINT "FK_23937641f28c607f061dab4694b" FOREIGN KEY ("node_id") REFERENCES "node"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: ALTER TABLE "node" ADD CONSTRAINT "FK_d224b7b862841f24dd85b556059" FOREIGN KEY ("location_id") REFERENCES "location"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: ALTER TABLE "contract_resources" ADD CONSTRAINT "FK_621238dffde9099b2233650235d" FOREIGN KEY ("contract_id") REFERENCES "node_contract"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
tfchain_graphql-processor-1   | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1673510995256,"Data1673510995256"]
tfchain_graphql-processor-1   | Migration Data1673510995256 has been  executed successfully.
tfchain_graphql-processor-1   | query: ALTER TABLE "node" ADD "power" jsonb
tfchain_graphql-processor-1   | query: ALTER TABLE "node" ALTER COLUMN "power" SET DEFAULT '{"state": "Up", "target": "Up"}'::jsonb
tfchain_graphql-processor-1   | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1675278567129,"node_power1675278567129"]
tfchain_graphql-processor-1   | Migration node_power1675278567129 has been  executed successfully.
tfchain_graphql-processor-1   | query: DROP TABLE "historical_balance"
tfchain_graphql-processor-1   | query: DROP TABLE "account"
tfchain_graphql-processor-1   | query: DROP TABLE "transfer"
tfchain_graphql-processor-1   | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1680092893466,"remove_balances1680092893466"]
tfchain_graphql-processor-1   | Migration remove_balances1680092893466 has been  executed successfully.
tfchain_graphql-processor-1   | query: ALTER TABLE "node" ADD "has_gpu" boolean NOT NULL DEFAULT false
tfchain_graphql-processor-1   | query: ALTER TABLE "node" ALTER COLUMN "power" DROP DEFAULT
tfchain_graphql-processor-1   | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1686656735316,"Data1686656735316"]
tfchain_graphql-processor-1   | Migration Data1686656735316 has been  executed successfully.
tfchain_graphql-processor-1   | query: ALTER TABLE "node" ADD "dedicated" boolean NOT NULL DEFAULT false
tfchain_graphql-processor-1   | query: ALTER TABLE "node" ADD "extra_fee" numeric
tfchain_graphql-processor-1   | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1686728671632,"node_price1686728671632"]
tfchain_graphql-processor-1   | Migration node_price1686728671632 has been  executed successfully.
tfchain_graphql-processor-1   | query: ALTER TABLE "node" DROP COLUMN "has_gpu"
tfchain_graphql-processor-1   | query: ALTER TABLE "node" ALTER COLUMN "dedicated" DROP DEFAULT
tfchain_graphql-processor-1   | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1690448468759,"remove_node_gpu1690448468759"]
tfchain_graphql-processor-1   | Migration remove_node_gpu1690448468759 has been  executed successfully.
tfchain_graphql-processor-1   | query: COMMIT
tfchain_graphql-db-1          | 2023-08-13 11:16:40.089 UTC [71] LOG:  incomplete message from client
tfchain_graphql-processor-1   | {"level":2,"time":1691925402000,"ns":"sqd:processor","msg":"processing blocks from 0"}
tfchain_graphql-processor-1   | {"level":3,"time":1691925462011,"ns":"sqd:processor:archive-request","msg":"retry","archiveUrl":"http://192.168.64.5:8000/graphql","archiveRequestId":0,"archiveQuery":"query { status { head } }","backoff":100,"reason":"network timeout at: http://192.168.64.5:8000/graphql"}
tfchain_graphql-processor-1   | {"level":3,"time":1691925522112,"ns":"sqd:processor:archive-request","msg":"retry","archiveUrl":"http://192.168.64.5:8000/graphql","archiveRequestId":0,"archiveQuery":"query { status { head } }","backoff":500,"reason":"network timeout at: http://192.168.64.5:8000/graphql"}
^CGracefully stopping... (press Ctrl+C again to force)
sameh-farouk commented 1 year ago

I’m closing this issue because I can’t reproduce it.