0

Yesterday everything worked fine.

But today minio dashbord still works, but I am not able to put files there. No changes made since yesterday.

Unable to write file at location: 8596cc71-2db5-4f32-b51b-acdbeee05b86.jpg. Error executing "PutObject" on "http://images.localhost:9000/8596cc71-2db5-4f32-b51b-acdbeee05b86.jpg"; AWS HTTP error: cURL error 7: Failed to connect to images.localhost port 9000 after 0 ms: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://images.localhost:9000/8596cc71-2db5-4f32-b51b-acdbeee05b86.jpg

My config:

AWS_ACCESS_KEY_ID=sail
AWS_SECRET_ACCESS_KEY=password
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=images
AWS_USE_PATH_STYLE_ENDPOINT=false
AWS_ENDPOINT=http://localhost:9000
AWS_URL=http://localhost:9000/images

Weird thing I found: if I set bucket name (in .env file) to be shorter than 3 characters, eg xx, it tries to call http://localhost:9000/xx/8596cc71-2db5-4f32-b51b-acdbeee05b86.jpg url. If longer than 3 characters like images it calls http://images.localhost:9000/8596cc71-2db5-4f32-b51b-acdbeee05b86.jpg.

In both cases it does not work.

I have absolutely no idea what happened.


Stack used:

  • laravel sail with php 8.1
  • laravel "^9.19"
  • league/flysystem-aws-s3-v3": "^3.0"
  • league/flysystem-ftp": "^3.0"
Tim Lewis
  • 27,813
  • 13
  • 73
  • 102
piotr
  • 1,282
  • 1
  • 8
  • 20
  • I had similar issues with .env file. I found out that it was not read correctly. I guess EOF and Linux/Windows issues. Quoting the value helped. In my case im talking about nodejs. Try it hardcoding your bucketname and look if this still happens. I had also other issues caused by the minio image. I switched from quay.io to bitnami/minio. Helped a lot. – Ralle Mc Black Dec 18 '22 at 13:20
  • Tried that. THe only thing that changed is an error message. Now it looks like that: ``` connection refused for http://localhost:9000/images/filename.jpg ``` I tried to remove volumes, recreate them still no success. Weird. – piotr Dec 20 '22 at 08:37

0 Answers0