We are running a FiveM server that is bare bones at the moment trying to run EssentialMode but have yet to get it working. We have tried coucheDB, mySQL and both external SQL servers as well as local provided SQL servers. Nothing seems to work.
Our problem seems to be that nothing is being written to the database. The plugin is providing no useful errors and in couchDB it will actually create the database but no documents. In SQL we imported the table and database but again the plugin won’t write to it. We’ve followed the tutorials and still nothing. We are hosting it on a dedicated windows server if I need to provide the host I can but they seem to be very reputable within the community.
Here are the install directions we are following (for SQL because that would be mos ideal to get working)
- download and place essentialmode, es_admin2, esplugin_mysql, mysql-async all into the /resource folder
- import sql.sql from esplugin_mysql to our SQL database
- open server.cfg
- add the following in this order: mysql-async, essentialmode, esplugin)mysql, es_admin2
- above those add
set es_enableCustomData 1 and the mysql-async connection string (note, we have tried putting these in the convar sections and above the start lines and neither have changed anything) (secondary note, we have tried 127.0.0.1 and the direct IP and that hasn’t changed anything as well as disabling SSL mode)
- Start the server
One of the questions we are unsure of is if we need to add the
server_script '@mysql-async/lib/MySQL.lua line to any resource files. It is by default in the esplugin_mysql but we are not sure if we need to add it into essentialmode or es_admin. Any help?
The only “error” I can give you is:
Error running call reference function for resource es_admin2: server.lua:261: attempt to index a nil value (local 'user')
[ 98360] stack traceback:
[ 98360] server.lua:261: in local 'ref'
[ 98375] citizen:/scripting/lua/scheduler.lua:278: in function <citizen:/scripting/lua/scheduler.lua:269>
[ 98375] Error running system event handling function for resource essentialmode: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
[ 98391] stack traceback:
[ 98391] [C]: in function 'error'
[ 98407] citizen:/scripting/lua/MessagePack.lua:830: in method 'underflow'
[ 98407] citizen:/scripting/lua/MessagePack.lua:465: in field 'any'
[ 98422] citizen:/scripting/lua/MessagePack.lua:860: in field 'unpack'
[ 98422] citizen:/scripting/lua/scheduler.lua:339: in field 'cmd'
[ 98438] server/main.lua:123: in upvalue 'handler'
[ 98438] citizen:/scripting/lua/scheduler.lua:124: in function <citizen:/scripting/lua/scheduler.lua:123>
[ 98438] stack traceback:
[ 98453] [C]: in function 'error'
[ 98453] citizen:/scripting/lua/scheduler.lua:39: in field 'CreateThreadNow'
[ 98469] citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>
[ 143813] Sending heartbeat to live-internal.fivem.net:30110
[ 323860] Sending heartbeat to live-internal.fivem.net:30110
[ 503922] Sending heartbeat to live-internal.fivem.net:30110
KennyL and myself cannot get it working at all and we are just not quite sure why. Any help would be greatly appricated.