arcadedb icon indicating copy to clipboard operation
arcadedb copied to clipboard

Creating root after databases already exists makes whole REST API insane

Open ExtReMLapin opened this issue 8 months ago • 5 comments

As suggested here : https://github.com/ArcadeData/arcadedb/issues/2058#issuecomment-2718427974

To be able to change the root password on the fly, i use this pr : https://github.com/ArcadeData/arcadedb/pull/2149 And on each boot i remove the root line in the users jsonl file.

Now when i do this there is something REALLY WEIRD going on :

'list databases' returns []

'create database test1' returns ok

re run 'list databases' still returns [] but

run again 'create database test1' and it returns Database 'test1' already exists

https://github.com/user-attachments/assets/cddeb858-ef9c-4a4d-9309-67bc4d39b92e

ExtReMLapin avatar Apr 11 '25 16:04 ExtReMLapin

console.sh corretly lists it


> list databases

Databases:
- yoloooo1
- TITI
- test1
- titi
- AAAAAAAAAAAAA
- YOLO
- TOTO

ExtReMLapin avatar Apr 11 '25 16:04 ExtReMLapin

May be the server script is run from the wrong folder. Can you post the contents of the entrypoint.sh?

BTW: you could consider using the ready endpoint /api/V1/ready for the healthcheck

gramian avatar Apr 11 '25 16:04 gramian

I found the issue cause, will rename the issue, it's when creating root session when databases already exists it completly makes it unworking.

As suggested here https://github.com/ArcadeData/arcadedb/issues/2058#issuecomment-2718427974

The idea was to kill the root line in the jsonl file but it makes the whole arcadedb server unusable (see first message)

ExtReMLapin avatar Apr 11 '25 16:04 ExtReMLapin

This could be due to file permissions. You can temporarily give all the files in the mounted folders all permissions like 777 and see if it works. I ran into this in another context where mounted files where made by a root but another UID then the container root.

gramian avatar Apr 11 '25 16:04 gramian

Pushed a fix to the PR

ExtReMLapin avatar Apr 11 '25 17:04 ExtReMLapin