Open shc261392 opened 2 years ago
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:
Finally, remember to use https://discuss.ipfs.io if you just need general support.
api/v0/add
also will return 500 internal error sometimes.
Is there a body to the response? If so it might have an error message in it. Also the error is logged if you turn on debug logging for the "cmds" system ipfs log level cmds debug
.
There is only Internal Server Error
message, no additional info.
After setting the cmds subsystem log to debug level, here's what I've found that could be relevant:
2022-03-18T04:24:18.494Z DEBUG cmds go-ipfs-cmds@v0.6.0/command.go:145 error occured in call, closing with error: failed to get block for bafybeiaz5zrdvjtoqmibprkk6g7oxbdo2zmdxuu3j5agbaaczph7ylckjq: RequestError: send request failed
caused by: Get "https://ipfs-s3-datastore.s3-accelerate.amazonaws.com/ipfs-s3-datastore/blocks/AFYBEIAZ5ZRDVJTOQMIBPRKK6G7OXBDO2ZMDXUU3J5AGBAACZPH7YLCKJQ": dial tcp 13.32.196.208:443: connect: cannot assign requested address
IAWYXOAXCSAW5P2MA": dial tcp 13.32.196.208:443: connect: cannot assign requested address
Awesome thanks. This smells like ephemeral port exhaustion, could you check the number of TCP conns in TIME-WAIT state? ss -at | tail -n +2 | awk '{print $1}' | sort | uniq -c | sort -n
Although the fact that this error is also happening on both TCP and UDP swarm sockets suggests there may be something deeper wrong with your host, like misconfigured networking.
Here's what I get for running the above command:
$ ss -at | tail -n +2 | awk '{print $1}' | sort | uniq -c | sort -n
16 LISTEN
454 ESTAB
503 TIME-WAIT
The node is running on an EC2 instance in the same region as the S3 bucket, the only network-related config I've added is allowing HTTP and HTTPS inbound traffic in security group which is probably not related to the issue. I'm not sure what should I check next.
Hi, I've met an issue using IPFS node built with the go-ds-s3 plugin. For now I can't be very sure about what the root cause is, but I'll provided as many information as possible, would be very appreciated if anyone could help.
Problem
When using the built IPFS node's HTTP API
api/v0/cat
andapi/v0/stat
, sometimes a 500 error (Internal Server Error) will be returned. So far we have tried but can't find a stable way to reproduce this issue. From what we've observed, calling the exactly same API endpoint will same headers and query parameters does not always meet this problem.The same problem never happens on another IPFS node using the default datastore without this plugin, so we think the might be an issue related to the plugin.
Making API calls likeapi/v0/add
orapi/v0/get
seems always works however.EDIT: the problem also happens for
api/v0/add
Logs that might be related to the problem
We have turned the IPFS daemon's debug flag
--debug
on, but it produces very verbose logs. Since I'm not so familiar with how to debug IPFS daemon, I can only list some error messages that I think might be related the problem. I can provide more detailed logs or look for some certain debugging messages if I know where to look at, please let me know if there's something else that might help.Logs that we think might be related to the problem:
Environment
The IPFS daemon is built from source with the plugin and run in a Docker container, Dockerfile link here.
Only one IPFS daemon is running, and the S3-bucket only serves the daemon, not being used by anything else.