OpenFusionProject/OpenFusion

Error database

Closed this issue · 7 comments

2024-09-29 23:09:21 [FATAL] Cannot open database: unable to open database file

2024-09-29 23:19:04 openfusion-1 | [INFO] OpenFusion v1.5.2-12-gd717c5d
2024-09-29 23:19:04 openfusion-1 | [INFO] Protocol version: 104
2024-09-29 23:19:04 openfusion-1 | [INFO] Built with libsqlite 3.40.1
2024-09-29 23:19:04 openfusion-1 | [INFO] Loading tabledata...
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded 294 Warps
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded 10 S.C.A.M.P.E.R. locations
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded 89 transportation routes
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded mission-related data
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded 4907 items
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded 157 vendor tables
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded 37 croc pot value sets
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded 48 nanos
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded 48 nano tunings
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded 198 nano skills
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded 138 instances
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded 66 skyway paths
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded 101 NPC paths
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded 10866 NPCs
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded rewards for 32 IZ races
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded 840 Crates containing 2011 unique items
2024-09-29 23:19:04 openfusion-1 | [INFO] Loaded 348 eggs
2024-09-29 23:19:04 openfusion-1 | [INFO] Intializing Packet Managers...
2024-09-29 23:19:04 openfusion-1 | [FATAL] Cannot open database: unable to open database file
2024-09-29 23:19:44 openfusion-1 | [INFO] OpenFusion v1.5.2-12-gd717c5d
2024-09-29 23:19:44 openfusion-1 | [INFO] Protocol version: 104
2024-09-29 23:19:44 openfusion-1 | [INFO] Built with libsqlite 3.40.1
2024-09-29 23:19:45 openfusion-1 | [INFO] Loading tabledata...
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded 294 Warps
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded 10 S.C.A.M.P.E.R. locations
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded 89 transportation routes
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded mission-related data
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded 4907 items
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded 157 vendor tables
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded 37 croc pot value sets
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded 48 nanos
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded 48 nano tunings
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded 198 nano skills
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded 138 instances
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded 66 skyway paths
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded 101 NPC paths
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded 10866 NPCs
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded rewards for 32 IZ races
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded 840 Crates containing 2011 unique items
2024-09-29 23:19:45 openfusion-1 | [INFO] Loaded 348 eggs
2024-09-29 23:19:45 openfusion-1 | [INFO] Intializing Packet Managers...
2024-09-29 23:19:45 openfusion-1 | [FATAL] Cannot open database: unable to open database file

does openfusion have proper file permissions to access database.db or whatever you've set dbpath to in your config.ini file?

Are you using Docker? What command are you running to start the container? If you use docker compose it will automatically mount the database file, but if you're not, you need to mount it yourself.

Yes I use docker compose.

Seems like commenting line #11 from docker-compose.yml the container starts correctly ...but doesn't feel like it's the correct approach.

#- ./database.db:/usr/src/app/database.db

Yeah, if you comment that line out, the container will use its own internal database.db file instead of the one on the host, so it's probably not what you want.

Is there a database.db file on the host at all? (in the same directory as the docker-compose.yml)

This is very likely a misconfiguration, so I'm going to close out the issue. Please reach out on Discord if you still need help and we can take a closer look there.