Skip to content
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

Pin status stuck on queued #29

Open
jdannenberg opened this issue Sep 29, 2022 · 6 comments
Open

Pin status stuck on queued #29

jdannenberg opened this issue Sep 29, 2022 · 6 comments

Comments

@jdannenberg
Copy link

jdannenberg commented Sep 29, 2022

I am trying to use this service but ipfs pin remote add ... does not terminate, respectively pins are stuck on status queued.

My envs:

NODE_ENV=prod
MYSQL_HOST=ipfs-pinning-crust-mysql
DEFAULT_FILE_SIZE=100MB
**CRUST_SEED=<my 12 word crust wallet key>**
MYSQL_DATABASE=pinning_service
MYSQL_USER=pinning_service
MYSQL_ROOT_PASSWORD=<somepw>

My compose:

version: "2.4"
services:
  ipfs-pinning-crust:
    image: crustio/ipfs-w3auth-pinning-service
    container_name: ipfs-pinning-crust
    expose:
      - 3000
    working_dir: /app
    env_file:
      - crust.env
      - db.env
      - db-secret.env
    networks:
      - ipfs-internal
    mem_limit: 512mb
    memswap_limit: 1g


  ipfs-pinning-crust-mysql:
    image: mysql:8
    container_name: ipfs-pinning-crust-mysql
    restart: unless-stopped
    env_file:
      - db.env
      - db-secret.env
    volumes:
      - ./sql:/sql-init
      - ipfs-pinning-crust-mysql:/var/lib/mysql
    expose: 
      - 3306
    networks:
      - ipfs-internal
    mem_limit: 512mb
    memswap_limit: 1g

networks:
  ipfs-internal:
    external: true

volumes:
  ipfs-pinning-crust-mysql:
    name: ipfs-pinning-crust-mysql

Adding remote pinning service via ipfs is successful:

ipfs pin remote service add crustpinner http://ipfs-pinning-crust:3000/psa <base64(sub-PubKey:SignedMsg)>

However, ipfs pin remote add --service crustpinner --name test bafkreigppg5u55luhghpaumhjfvczr2c5pveuwp4t5nzhtww7vnuftls5e does not terminate.

The log shows:

[warn] [2022-09-29 13:19:59] check account balance failed: Unable to match provided value to a secret URI

and then:

ipfs-pinning-crust          | Executing (02c89fe7-7f3e-4054-9449-68a6491cfac7): COMMIT;
ipfs-pinning-crust          | Executing (default): select * from pin_object where deleted = 0 and user_id = 2 and request_id = '16f87500-86e4-4eb3-b120-7240de8ca0ac-1664456584230'
ipfs-pinning-crust          | Got public address 'substrate-cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF' and sigature '0x84...'
ipfs-pinning-crust          | Validate chainType: substrate address: cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF success
ipfs-pinning-crust          | [info] [2022-09-29 13:10:41] Validate chainType: substrate address: cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF success
ipfs-pinning-crust          | [info] [2022-09-29 13:10:41] txMsg: undefined tyMsg: undefined
ipfs-pinning-crust          | Executing (1aab7f3f-71e4-4014-b9ec-b1b2a978b858): START TRANSACTION;
ipfs-pinning-crust          | Executing (1aab7f3f-71e4-4014-b9ec-b1b2a978b858): SELECT `id`, `chain_type`, `address`, `create_time` FROM `user` AS `user` WHERE `user`.`chain_type` = 'substrate' AND `user`.`address` = 'cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF' LIMIT 1;
ipfs-pinning-crust          | Executing (1aab7f3f-71e4-4014-b9ec-b1b2a978b858): COMMIT;
ipfs-pinning-crust          | Executing (default): select * from pin_object where deleted = 0 and user_id = 2 and request_id = '16f87500-86e4-4eb3-b120-7240de8ca0ac-1664456584230'
ipfs-pinning-crust          | Got public address 'substrate-cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF' and sigature '0x84...'
ipfs-pinning-crust          | Validate chainType: substrate address: cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF success
ipfs-pinning-crust          | [info] [2022-09-29 13:10:42] Validate chainType: substrate address: cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF success
ipfs-pinning-crust          | [info] [2022-09-29 13:10:42] txMsg: undefined tyMsg: undefined
ipfs-pinning-crust          | Executing (0618692b-9717-420d-98a6-a075c247b2d1): START TRANSACTION;
ipfs-pinning-crust          | Executing (0618692b-9717-420d-98a6-a075c247b2d1): SELECT `id`, `chain_type`, `address`, `create_time` FROM `user` AS `user` WHERE `user`.`chain_type` = 'substrate' AND `user`.`address` = 'cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF' LIMIT 1;
ipfs-pinning-crust          | Executing (0618692b-9717-420d-98a6-a075c247b2d1): COMMIT;
ipfs-pinning-crust          | Executing (default): select * from pin_object where deleted = 0 and user_id = 2 and request_id = '16f87500-86e4-4eb3-b120-7240de8ca0ac-1664456584230'
ipfs-pinning-crust          | Executing (default): SELECT `id`, `name`, `request_id`, `user_id`, `cid`, `status`, `info`, `meta`, `delegates`, `origins`, `create_time`, `update_time`, `deleted`, `retry_times` FROM `pin_object` AS `pin_object` WHERE `pin_object`.`status` = 'pinned' AND `pin_object`.`deleted` 
= 0 ORDER BY `pin_object`.`id` ASC LIMIT 1000;
ipfs-pinning-crust          | Got public address 'substrate-cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF' and sigature '0x84...'
ipfs-pinning-crust          | Validate chainType: substrate address: cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF success
ipfs-pinning-crust          | [info] [2022-09-29 13:10:42] Validate chainType: substrate address: cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF success
ipfs-pinning-crust          | [info] [2022-09-29 13:10:42] txMsg: undefined tyMsg: undefined
ipfs-pinning-crust          | Executing (49b1abc9-a75b-42e0-88d5-f62ca3073aac): START TRANSACTION;
ipfs-pinning-crust          | Executing (49b1abc9-a75b-42e0-88d5-f62ca3073aac): SELECT `id`, `chain_type`, `address`, `create_time` FROM `user` AS `user` WHERE `user`.`chain_type` = 'substrate' AND `user`.`address` = 'cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF' LIMIT 1;
ipfs-pinning-crust          | Executing (49b1abc9-a75b-42e0-88d5-f62ca3073aac): COMMIT;
ipfs-pinning-crust          | Executing (default): select * from pin_object where deleted = 0 and user_id = 2 and request_id = '16f87500-86e4-4eb3-b120-7240de8ca0ac-1664456584230'
ipfs-pinning-crust          | Got public address 'substrate-cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF' and sigature '0x84...'
ipfs-pinning-crust          | Validate chainType: substrate address: cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF success
ipfs-pinning-crust          | [info] [2022-09-29 13:10:43] Validate chainType: substrate address: cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF success
ipfs-pinning-crust          | [info] [2022-09-29 13:10:43] txMsg: undefined tyMsg: undefined
ipfs-pinning-crust          | Executing (9d76e679-f235-4259-98c4-78a8dec74518): START TRANSACTION;
ipfs-pinning-crust          | Executing (9d76e679-f235-4259-98c4-78a8dec74518): SELECT `id`, `chain_type`, `address`, `create_time` FROM `user` AS `user` WHERE `user`.`chain_type` = 'substrate' AND `user`.`address` = 'cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF' LIMIT 1;
ipfs-pinning-crust          | Executing (9d76e679-f235-4259-98c4-78a8dec74518): COMMIT;
ipfs-pinning-crust          | Executing (default): select * from pin_object where deleted = 0 and user_id = 2 and request_id = '16f87500-86e4-4eb3-b120-7240de8ca0ac-1664456584230'
ipfs-pinning-crust          | Got public address 'substrate-cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF' and sigature '0x84...'
ipfs-pinning-crust          | Validate chainType: substrate address: cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF success
ipfs-pinning-crust          | [info] [2022-09-29 13:10:43] Validate chainType: substrate address: cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF success
ipfs-pinning-crust          | [info] [2022-09-29 13:10:43] txMsg: undefined tyMsg: undefined
ipfs-pinning-crust          | Executing (685adcd9-5f10-4e24-8ff2-25cebe2fe2aa): START TRANSACTION;
ipfs-pinning-crust          | Executing (685adcd9-5f10-4e24-8ff2-25cebe2fe2aa): SELECT `id`, `chain_type`, `address`, `create_time` FROM `user` AS `user` WHERE `user`.`chain_type` = 'substrate' AND `user`.`address` = 'cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF' LIMIT 1;
ipfs-pinning-crust          | Executing (685adcd9-5f10-4e24-8ff2-25cebe2fe2aa): COMMIT;
ipfs-pinning-crust          | Executing (default): select * from pin_object where deleted = 0 and user_id = 2 and request_id = '16f87500-86e4-4eb3-b120-7240de8ca0ac-1664456584230'
ipfs-pinning-crust          | Got public address 'substrate-cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF' and sigature '0x84...'
ipfs-pinning-crust          | Validate chainType: substrate address: cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF success
ipfs-pinning-crust          | [info] [2022-09-29 13:10:44] Validate chainType: substrate address: cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF success
ipfs-pinning-crust          | [info] [2022-09-29 13:10:44] txMsg: undefined tyMsg: undefined
ipfs-pinning-crust          | Executing (163a4555-d025-481c-9fe0-ac7005e98666): START TRANSACTION;
ipfs-pinning-crust          | Executing (163a4555-d025-481c-9fe0-ac7005e98666): SELECT `id`, `chain_type`, `address`, `create_time` FROM `user` AS `user` WHERE `user`.`chain_type` = 'substrate' AND `user`.`address` = 'cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF' LIMIT 1;
ipfs-pinning-crust          | Executing (163a4555-d025-481c-9fe0-ac7005e98666): COMMIT;
ipfs-pinning-crust          | Executing (default): select * from pin_object where deleted = 0 and user_id = 2 and request_id = '16f87500-86e4-4eb3-b120-7240de8ca0ac-1664456584230'
ipfs-pinning-crust          | Got public address 'substrate-cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF' and sigature '0x84...'
ipfs-pinning-crust          | Validate chainType: substrate address: cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF success
ipfs-pinning-crust          | [info] [2022-09-29 13:10:44] Validate chainType: substrate address: cTH9sHmhc75Znm9P3s78j3SJP3CGs2RcihQ3PmThBjNejLrmF success
ipfs-pinning-crust          | [info] [2022-09-29 13:10:44] txMsg: undefined tyMsg: undefined

My goal is to pin about 3 TB (3 million CIDs / pins), but the example used here is a very small text file.

Your help is very much appreciated!

@jdannenberg
Copy link
Author

@LowEntropyBody @ziboilihua @mmyyrroonn is there a better support channel for this?

@BOBOKaa
Copy link

BOBOKaa commented Oct 11, 2022

Looks like the network connection failed

@jdannenberg
Copy link
Author

Looks like the network connection failed

Can I debug that somehow? Container has internet readily available (and fast enough).

@gharriso
Copy link

gharriso commented Oct 24, 2022

I'm having a similar issue with the IPFS pinning interface against the public endpoint. Pins stay in status "queued" and sometime "pinning" but then requests for status fail with a HTTP 502 and file is not pinned:

> ipfs pin remote add Qmad5fXcex6QaKLT3WSE2eRWzUsDVrSsnqU48tDE1XusxL --service=crust2
Error: failed to check pin status for requestid="225dbc51-aa58-4d29-b63d-376b2b81be98-1666587645285" due to error: reason: "", details: "": 502 Bad Gateway

Same thing happens in code when I use the nodeJS ipfs-http client.

@ziboilihua
Copy link
Contributor

ziboilihua commented Nov 1, 2022

Looks like the network connection failed

Can I debug that somehow? Container has internet readily available (and fast enough).

Looks like "CRUST_SEED" you config in envs not match crust wallet key(Maybe contains space code at the end of seed string). you can command echo $CRUST_SEED in your ipfs-pinning-crust container.

@AwesomeKalin
Copy link

AwesomeKalin commented Sep 17, 2023

I'm also having the same issue, just a year later. My seed phrase wasn't incorrect as I just used the got library and used the key provided on crust files on the public one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants