Comments (10)
for supabase/studio
, I think it is because of the starting period
I went inside the docker container and command
$ node -e "require('http').get('http://localhost:3000/api/profile', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})"
it gave me no error so i increased timeout in health check condition as below to fix unhealthy
supabase-studio:
image: 'supabase/studio:20240422-5cf8f30'
healthcheck:
test:
- CMD
- node
- '-e'
- "require('http').get('http://localhost:3000/api/profile', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})"
timeout: 15s
interval: 5s
retries: 5
depends_on:
supabase-analytics:
condition: service_healthy
However it doesn't work with storage-api. I tried to debug the same way but got below result
/app # wget --no-verbose --tries=1 --spider http://localhost:5000/status
Connecting to localhost:5000 ([::1]:5000)
wget: can't connect to remote host: Connection refused
from supabase.
@encima I use the healthcheck command in the docker compose file for
studio
container and get this error:
@RoadToDev101 that is expected yes. the studio is accessible through "studio" but not localhost.
from supabase.
Thanks for opening @RoadToDev101
This is a bug in the self-hosted docker-compose as the storage api seems not to listen on localhost
, so it reports as unhealthy when it is fine.
This can be confirmed with docker logs $STORAGE_CONTAINER_ID
We will make a PR to address this. That said, the issue of not being able to create folders cannot be reproduced, can you provide logs from the storage container, please?
from supabase.
Hi @encima,
This is the log I get from the storage container when render the storage page on dashboard and create a new bucket name 'design_views'
{"level":30,"time":"2024-06-18T01:26:18.129Z","pid":1,"hostname":"a122cace4088","msg":"Server listening at http://0.0.0.0:5000"} {"level":30,"time":"2024-06-18T01:28:10.474Z","pid":1,"hostname":"a122cace4088","reqId":"req-1","tenantId":"stub","project":"stub","reqId":"req-1","type":"request","req":{"traceId":"req-1","method":"GET","url":"/bucket","headers":{"host":"storage:5000","x_forwarded_proto":"http","x_forwarded_host":"kong","x_forwarded_port":"8000","x_real_ip":"192.168.48.11","x_client_info":"supabase-js-node/2.41.1","accept":"*/*","user_agent":"node"},"hostname":"storage:5000","remoteAddress":"192.168.48.12","remotePort":43888},"res":{"statusCode":200,"headers":{"content_type":"application/json; charset=utf-8","content_length":"2"}},"responseTime":40.07513475418091,"msg":"stub | GET | 200 | 192.168.48.12 | req-1 | /bucket | node"} {"level":30,"time":"2024-06-18T01:28:26.236Z","pid":1,"hostname":"a122cace4088","reqId":"req-2","tenantId":"stub","project":"stub","reqId":"req-2","type":"request","req":{"traceId":"req-2","method":"POST","url":"/bucket","headers":{"host":"storage:5000","x_forwarded_proto":"http","x_forwarded_host":"kong","x_forwarded_port":"8000","x_real_ip":"192.168.48.11","content_length":"107","content_type":"application/json","x_client_info":"supabase-js-node/2.41.1","accept":"*/*","user_agent":"node"},"hostname":"storage:5000","remoteAddress":"192.168.48.12","remotePort":53754},"res":{"statusCode":200,"headers":{"content_type":"application/json; charset=utf-8","content_length":"23"}},"responseTime":131.50732326507568,"msg":"stub | POST | 200 | 192.168.48.12 | req-2 | /bucket | node"} {"level":30,"time":"2024-06-18T01:28:26.252Z","pid":1,"hostname":"a122cace4088","reqId":"req-3","tenantId":"stub","project":"stub","reqId":"req-3","type":"request","req":{"traceId":"req-3","method":"GET","url":"/bucket","headers":{"host":"storage:5000","x_forwarded_proto":"http","x_forwarded_host":"kong","x_forwarded_port":"8000","x_real_ip":"192.168.48.11","x_client_info":"supabase-js-node/2.41.1","accept":"*/*","user_agent":"node"},"hostname":"storage:5000","remoteAddress":"192.168.48.12","remotePort":53754},"res":{"statusCode":200,"headers":{"content_type":"application/json; charset=utf-8","content_length":"200"}},"responseTime":5.60968017578125,"msg":"stub | GET | 200 | 192.168.48.12 | req-3 | /bucket | node"} {"level":30,"time":"2024-06-18T01:28:26.349Z","pid":1,"hostname":"a122cace4088","reqId":"req-4","tenantId":"stub","project":"stub","reqId":"req-4","type":"request","req":{"traceId":"req-4","method":"POST","url":"/object/list/design_views","headers":{"host":"storage:5000","x_forwarded_proto":"http","x_forwarded_host":"kong","x_forwarded_port":"8000","x_real_ip":"192.168.48.11","content_length":"89","content_type":"application/json","x_client_info":"supabase-js-node/2.41.1","accept":"*/*","user_agent":"node"},"hostname":"storage:5000","remoteAddress":"192.168.48.12","remotePort":53754},"res":{"statusCode":200,"headers":{"content_type":"application/json; charset=utf-8","content_length":"2"}},"responseTime":7.82005500793457,"msg":"stub | POST | 200 | 192.168.48.12 | req-4 | /object/list/design_views | node"}
After that, I try to create a new folder in this bucket, the frontend shows that it created but when I reload, the folder is not there (I think it is not actually create the folder). And when I try uploading the file, it just spinning forever. And in these 2 actions, there is no log in the storage
container.
Plus the studio container also unhealthy, but when check the log, it seems there is no problem. I hope this help.
from supabase.
thanks @RoadToDev101 , those logs show success for the storage requests so that certainly is weird!
Is there some issue with the volume mounting? Are you able to create a folder when you call the storage API directly?
from supabase.
Hi @encima,
I try to fetch the bucket api on Postman but I cant due to "Invalid authentication credentials". I try both Anon and Service Key for authorization. See the image below
The jwt in .env :
JWT_SECRET=girSzUKW1c937xjnJhKhuqLLM4WPIjNXrV8Odvra ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICJyb2xlIjogImFub24iLAogICJpc3MiOiAic3VwYWJhc2UiLAogICJpYXQiOiAxNzE4NjQzNjAwLAogICJleHAiOiAxODc2NDEwMDAwCn0.STjbgWo03Cn8SRaRAn2bqw0M1io-k6g8GJkHAeUwXY4 SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICJyb2xlIjogInNlcnZpY2Vfcm9sZSIsCiAgImlzcyI6ICJzdXBhYmFzZSIsCiAgImlhdCI6IDE3MTg2NDM2MDAsCiAgImV4cCI6IDE4NzY0MTAwMDAKfQ.aq4Nv_JAsUJAJxwvr5Ro6GDyXVbyoGb9ij2UN40kJ_Y
Am I do it wrong?
from supabase.
@encima, so strange... I can upload the image through my NodeJS app.
from supabase.
@RoadToDev101 thanks for the update. so it works using the supabase client is that right? does it still fail with the dashboard?
from Postman, it looks like the credentials are probably failing due to them being incorrectly encoded or not picked up properly.
from supabase.
for
supabase/studio
, I think it is because of the starting periodI went inside the docker container and command
$ node -e "require('http').get('http://localhost:3000/api/profile', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})"
it gave me no error so i increased timeout in health check condition as below to fix unhealthy
supabase-studio: image: 'supabase/studio:20240422-5cf8f30' healthcheck: test: - CMD - node - '-e' - "require('http').get('http://localhost:3000/api/profile', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})" timeout: 15s interval: 5s retries: 5 depends_on: supabase-analytics: condition: service_healthy
However it doesn't work with storage-api. I tried to debug the same way but got below result
/app # wget --no-verbose --tries=1 --spider http://localhost:5000/status Connecting to localhost:5000 ([::1]:5000) wget: can't connect to remote host: Connection refused
Are you connecting to storage from within the studio container? Either way, localhost
will not work as it is not exposed there (unless on the storage container). You can use the same command but use studio
instead of localhost
from supabase.
@encima I use the healthcheck command in the docker compose file for studio
container and get this error:
from supabase.
Related Issues (20)
- Checkbox in Light theme HOT 2
- Select rows is incorrect when switch pages in Table editor
- Docs don't say what the default database user ID & password are. HOT 5
- Deno secrets example has typo
- Issue logging into supabase website with github creds HOT 1
- Chore: Replace go-gomail/gomail with wneessen/go-mail HOT 2
- Unable to Upload large zip file of zip files over 5gb on production HOT 10
- 413 Payload Too Large HOT 4
- Supabase logo overlap with menu HOT 1
- Unable to create user due to CSP in docke3r env HOT 2
- Supabase vercel integration doesn't detect vite project
- Logs are not working properly | Getting 502 errors HOT 2
- [Self Hosting] supabase-analytics is unhealthy, Monotonic time stepped backwards. HOT 2
- Verify Custom Claims on Server Side in Nextjs Middleware.ts HOT 3
- There should be an api for deleting folders HOT 3
- CORS Error for Auth Request from React app to local Supabase HOT 3
- Unable to do large Deletes Supabase Storage Hosted supabase.com HOT 7
- Pagination fails for storage beyond first page at root resource - Supabase.com Hosted HOT 1
- Could not create new items HOT 1
- SvelteKit: VerifyOTP not saving session HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supabase.