ich777 / docker-steamcmd-server

Simple Dockerfile that installs steamcmd and a selected game server
127 stars 101 forks source link

New Craftopia dedicated server requires sqlite3 #46

Closed SirTremain closed 11 months ago

SirTremain commented 11 months ago

Problem

Running the server on my unraid I noticed an error in the server logs that would silently fail and cause the server to not be able to save world progress:

DllNotFoundException: libsqlite3.so.0 assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) SQLite.SQLite3.LibVersionNumber()
  at SQLite.SQLiteConnection..ctor (SQLite.SQLiteConnectionString connectionString) [0x00049] in <b5990484ea5f493e861994256cbb8a27>:0 
  at SQLite.SQLiteConnection..ctor (System.String databasePath, System.Boolean storeDateTimeAsTicks) [0x00013] in <b5990484ea5f493e861994256cbb8a27>:0 
  at PocketpairSave.SaveDataConnection..ctor (System.String databasePath) [0x00000] in <ef98872239494c94b75c256eae2608d9>:0 
  at PocketpairSave.PocketpairSaveManager.Save (System.String[] id, System.String[] value, System.String path) [0x00027] in <ef98872239494c94b75c256eae2608d9>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
OcLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
PocketpairSave.PocketpairSaveManager:Save(String[], String[], String)
Oc.OcSaveManager:SaveCache(FileCache)
Oc.OcSaveManager:SaveTask(Boolean, Boolean)
Oc.OcSaveManager:SaveGameData(Boolean, Boolean)
Oc.OcSaveManager:move()
Oc.OcGameMng:Update()

The server World and backups folders were empty despite the autosave creating the folder for each save timestamp. Similar behavior has been reported in this recent reddit thread.

Temporary Solution

To solve the issue I installed sqlite and libsqlite3-0 using the following script:

apt-get update
apt-get install -y sqlite3 libsqlite3-0

This solved the issue and the world was correctly saved (as raw .db files) into the serverfiles volume.

image

It also correctly reloaded the world after restarting the container as sqlite3 was already installed.

Solution

I have created a pull request with the added package dependencies. Can you please accept this PR or add sqllite3 and libsqlite3-0 as package dependencies in the Dockerfile so they will be installed into the image?

ich777 commented 11 months ago

Thank you for the PR, I'll merge it shortly internally and let you know when the container is rebuilt.

ich777 commented 11 months ago

Container is updated. Please force an update from the container itself and it should work again.

Thank you! Please close the issue if the issue is solved.

ich777 commented 11 months ago

Happy New Year! :four_leaf_clover:

SirTremain commented 11 months ago

Thanks, the new image has resolved the issue. Happy New Year!