Jump to content

[A18] Setting USERPROFILE to directory Server files installed to solves many issues


rentechd

Recommended Posts

[A18] Issues with Server initialization, Missing Dirs, Logs not Written, Configs Update but not being applied to Server, Missing Saved Games

 

 

If running a dedicated server and you are getting errors where the server will not initialize because of missing Data folder and/or files even though it's installed in the game server directory where the .exe is that you are running and/or having issues with the log file apparently not being written even if you have set a full path to it or you are finding it written to other locations and the handling of the Saves directory seems to be like that of the client behavior where its expecting it in the Appdata, and/or you are having issues with making changes to configurations but the server is not reading from your edited config but apparently looking elsewhere for it, cannot find it and is then just loading the server with default settings, using this batch file should solve it

 

[b][color=#FFFFFF]set USERPROFILE=%cd%
start /wait 7DaysToDieServer.exe %* [/color][/b][color=#686868][font=Verdana]
[/font][/color]

 

Simply, of course, this just changes the environment variable USERPROFILE to the current directory which solves the problem of where the Data file is located, where the Saves file should go and in relationship to that where the server config and the admin config are and solves the issue around the log file. This also resolves the conflicts that have been occurring if running more than one game server on the windows server.

 

If already using the startdedicated.bat you can just add

[color=#ffffff]set USERPROFILE=%cd%[/color][color=#686868]
[/color]

to the very first part of the startdedicated.bat or however you want to run it as a command in your startup but it needs to proceed anything else in the server setting the environment/loading/initializing sequence and it pretty much solves all of the issues. I know the issue with the log file is apparently a Unity issue but even if you set a full path to point to the log file location it still has issues where it would write the log or not randomly, but then there were so many issues coming up where the server was failing to initialize because it could not find the data directory there really seemed to be some confusion going on. Then with servers saving a game to the User/Appdata instead of to the server files directory or whatever was specified in the config file. This seem more like client world behavior of using the Appdata for saving but it was not what the dedi usually does and so there were issues with missing admin configs and in some cases with a user having more than one game server the Saves would be overwriting each other. The other problem is that the config files are where they have alway been but the server does not seem to be able to find them sometimes. the server will load but when you attempt to us it you find yourself stuck with the default, and no matter how many times you change and save the file th servers insists on using the defaults. I assume its looking somewhere that the file i not and not in the server root directory and then when its not finding the file when it looks just loads up with the defaults. for some its an issue that they cannot fine tune things they want but if they were using the default ports they will till be online but it's a bit of a mess for those that use other ports or are running multiple game servers and each one uses a different set of ports and suddenly all their servers want to use the same ports.

 

I do not know if this is happening due to something Unity changed; a bug in A18 where there is a pathing issue or the client code somehow got confused with the dedi code; the log file (which does get written more often than not) is not where expected in 7DaysToDieServer_Data folder but in any number of place from the top level of the drive that server files are installed on to a directory above the location of the server files, to the Windows log folder or to Appdata; and for where ist looking for configs, I though maybe Appdata but I am not sure that that is actually what its doing but at that point I was more interested in getting it to look in the right plce then finding out actually where it suddenly though it should look.

 

Anyway setting the USERPROFILE for dedi server on start up seems to have fixed all these problems until whatever the issue is can be resolved. Its worked well with hardware running multiple servers whether manually or through a game panel or manager and a;sp solved some telnet issues that have been caused by issues where files appear to be missing but are right where they should be.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...