nhost/hasura-storage

Service unable to restart after crashing

doooooooooots opened this issue · 2 comments

Hi. I hope you're doing fine.

After trying to retreive some files using nhost.storage.getPublicUrl function, my hasura storage crashed.

image

Since then, the server is unabled to restart :

  • In log/hasura :
{
  "detail": {
    "http_info": {
      "content_encoding": null,
      "http_version": "HTTP/1.1",
      "ip": "10.110.27.195",
      "method": "POST",
      "status": 400,
      "url": "/v1/metadata"
    },
    "operation": {
      "error": {
        "code": "already-exists",
        "error": "field with name \"bucket\" already exists in table \"storage.files\"",
        "path": "$.args"
      },
      "query": { "type": "pg_create_object_relationship" },
      "request_id": "2803cfb1-7794-4151-8d2a-fb5a8204bcfa",
      "request_mode": "error",
      "response_size": 120,
      "uncompressed_response_size": 120,
      "user_vars": { "x-hasura-role": "admin" }
    },
    "request_id": "2803cfb1-7794-4151-8d2a-fb5a8204bcfa"
  },
  "level": "error",
  "timestamp": "2024-03-21T12:27:48.717+0000",
  "type": "http-log"
}
  • in log/storage :
2024-03-21 13:27:48 | hasura-storage | time="2024-03-21T12:27:48Z" level=info msg="starting server"
2024-03-21 13:27:48 | hasura-storage | time="2024-03-21T12:27:48Z" level=info msg="enabling fastly middleware"
2024-03-21 13:27:48 | hasura-storage | time="2024-03-21T12:27:48Z" level=info msg="applying hasura metadata"
2024-03-21 13:27:48 | hasura-storage | time="2024-03-21T12:27:48Z" level=info msg="applying postgres migrations"
2024-03-21 13:27:48 | hasura-storage | time="2024-03-21T12:27:48Z" level=info msg="Using static aws credentials"
2024-03-21 13:27:48 | hasura-storage | time="2024-03-21T12:27:48Z" level=info msg="storage version 0.6.0"
2024-03-21 13:27:48 | hasura-storage | problem reading : Config File "hasura-storage" Not Found in "[/]"

I didn't change anything on the storage tables, neither in config files from nhost cli init.

Using storage 0.6.0

Hi,
based on the logs you shared the service started correctly. The error you are pointing out in hasura is benign, it is simply hasura-storage reapplying metadata in case something deviated and getting "not needed, already correct" back.

Regards.
David