assetto-corsa-web / accweb

Assetto Corsa Competizione Server Management Tool via Web Interface.
MIT License
142 stars 54 forks source link

As soon as server stops, event settings get overwritten #124

Closed smaxx1337 closed 2 years ago

smaxx1337 commented 3 years ago

Hello,

we are using ACCWeb on Windows 10 - great tool.

However, we are running into a bug or configuration issue(?): As soon as we stop a server, it seems like a default config is getting written, but only event.json and eventRules.json.

Following settings are getting set: grafik

As example, I set the track to Spa 2020 (or Monza 2020) while it is running. Now I have to restart the server obviously, so I stop it and start it.

Now the funny thing: When you look in ACC, the correct track is chosen (Spa 2020 as example). But in the webinterface it tells me the track is Misano 2018 - so I always have to change ALL event settings, even though I just want to set a different track.

My first thought was that maybe my Firefox is playing with some settings due to privacy addons, so I went ahead and also tested in Chrome - which didn't change anything.

I set track to Spa while server is running:

time="2021-01-28T07:58:58+01:00" level=info msg="Server started" PID=7208
time="2021-01-28T08:04:10+01:00" level=debug msg="Decoded JSON request" req="&{1611814580 0 <nil> {0 9975 9976 50 1 0} {0 ACC Testserver 2 password123 password123admintest spectatorpw -1 30 -1 1 1 0 50  1 1 1 3 FreeForAll} {0 spa 15 120 26 0.3 0 1 [] 0 0 0 0} {0 1 -1 -1 0 -1 1 true false false false false 0} {0 [] 0} {0 []} {0 100 0 0 0 0 0 0 0 0}}"
time="2021-01-28T08:04:10+01:00" level=debug msg="Saving server configuration file" path="config\\1611814580\\configuration.json"
time="2021-01-28T08:04:10+01:00" level=debug msg="Saving server configuration file" path="config\\1611814580\\settings.json"
time="2021-01-28T08:04:10+01:00" level=debug msg="Saving server configuration file" path="config\\1611814580\\event.json"
time="2021-01-28T08:04:10+01:00" level=debug msg="Saving server configuration file" path="config\\1611814580\\eventRules.json"
time="2021-01-28T08:04:10+01:00" level=debug msg="Saving server configuration file" path="config\\1611814580\\entrylist.json"
time="2021-01-28T08:04:10+01:00" level=debug msg="Saving server configuration file" path="config\\1611814580\\bop.json"
time="2021-01-28T08:04:10+01:00" level=debug msg="Saving server configuration file" path="config\\1611814580\\assistRules.json"
time="2021-01-28T08:04:10+01:00" level=debug msg="Updating existing server" server="&{1611814580 7208 .\\accServer.exe {1 9975 9976 50 1 0} {1 ACC Testserver 2 password123 password123admintest spectatorpw -1 30 -1 1 1 0 50  1 1 1 3 FreeForAll} {1 spa 15 120 26 0.3 0 1 [] 0 0 0 0} {1 1 -1 -1 0 -1 1 true false false false false 0} {1 [] 0} {1 []} {1 100 0 0 0 0 0 0 0 0}}"

I stop the server in order to make the change appear:

time="2021-01-28T08:05:36+01:00" level=info msg="Stopping server instance..." id=1611814580
time="2021-01-28T08:05:36+01:00" level=error msg="Error stopping instance sending an interrupt, trying to kill it next" error="not supported by windows"
time="2021-01-28T08:05:36+01:00" level=error msg="Server stopped with an error" err="exit status 1"
time="2021-01-28T08:05:36+01:00" level=info msg="Server stopped" id=1611814580

UI set track back to Misano: grafik

I start the server again:

time="2021-01-28T08:06:39+01:00" level=debug msg="Decoded JSON request" req="&{1611814580}"
time="2021-01-28T08:06:39+01:00" level=info msg="Starting server instance..." id=1611814580
time="2021-01-28T08:06:39+01:00" level=debug msg="Copying file" source="C:\\Program Files (x86)\\Steam\\steamapps\\common\\Assetto Corsa Competizione Dedicated Server\\server\\accServer.exe" target="config\\1611814580\\accServer.exe"
time="2021-01-28T08:06:39+01:00" level=debug msg="Copying file" source="config\\1611814580\\configuration.json" target="config\\1611814580\\cfg\\configuration.json"
time="2021-01-28T08:06:39+01:00" level=debug msg="Copying file" source="config\\1611814580\\settings.json" target="config\\1611814580\\cfg\\settings.json"
time="2021-01-28T08:06:39+01:00" level=debug msg="Copying file" source="config\\1611814580\\event.json" target="config\\1611814580\\cfg\\event.json"
time="2021-01-28T08:06:39+01:00" level=debug msg="Copying file" source="config\\1611814580\\eventRules.json" target="config\\1611814580\\cfg\\eventRules.json"
time="2021-01-28T08:06:39+01:00" level=debug msg="Copying file" source="config\\1611814580\\entrylist.json" target="config\\1611814580\\cfg\\entrylist.json"
time="2021-01-28T08:06:39+01:00" level=debug msg="Copying file" source="config\\1611814580\\bop.json" target="config\\1611814580\\cfg\\bop.json"
time="2021-01-28T08:06:39+01:00" level=debug msg="Copying file" source="config\\1611814580\\assistRules.json" target="config\\1611814580\\cfg\\assistRules.json"
time="2021-01-28T08:06:39+01:00" level=warning msg="config\\1611814580"
time="2021-01-28T08:06:39+01:00" level=info msg="Server started" PID=5680

I get Spa: grafik

I stop the server again (without changing anything):

time="2021-01-28T08:07:59+01:00" level=info msg="Stopping server instance..." id=1611814580
time="2021-01-28T08:07:59+01:00" level=error msg="Error stopping instance sending an interrupt, trying to kill it next" error="not supported by windows"
time="2021-01-28T08:07:59+01:00" level=error msg="Server stopped with an error" err="exit status 1"
time="2021-01-28T08:07:59+01:00" level=info msg="Server stopped" id=1611814580

I start the server again (without changing anything)

time="2021-01-28T08:08:22+01:00" level=info msg="Starting server instance..." id=1611814580
time="2021-01-28T08:08:22+01:00" level=debug msg="Copying file" source="C:\\Program Files (x86)\\Steam\\steamapps\\common\\Assetto Corsa Competizione Dedicated Server\\server\\accServer.exe" target="config\\1611814580\\accServer.exe"
time="2021-01-28T08:08:22+01:00" level=debug msg="Copying file" source="config\\1611814580\\configuration.json" target="config\\1611814580\\cfg\\configuration.json"
time="2021-01-28T08:08:22+01:00" level=debug msg="Copying file" source="config\\1611814580\\settings.json" target="config\\1611814580\\cfg\\settings.json"
time="2021-01-28T08:08:22+01:00" level=debug msg="Copying file" source="config\\1611814580\\event.json" target="config\\1611814580\\cfg\\event.json"
time="2021-01-28T08:08:22+01:00" level=debug msg="Copying file" source="config\\1611814580\\eventRules.json" target="config\\1611814580\\cfg\\eventRules.json"
time="2021-01-28T08:08:22+01:00" level=debug msg="Copying file" source="config\\1611814580\\entrylist.json" target="config\\1611814580\\cfg\\entrylist.json"
time="2021-01-28T08:08:22+01:00" level=debug msg="Copying file" source="config\\1611814580\\bop.json" target="config\\1611814580\\cfg\\bop.json"
time="2021-01-28T08:08:22+01:00" level=debug msg="Copying file" source="config\\1611814580\\assistRules.json" target="config\\1611814580\\cfg\\assistRules.json"
time="2021-01-28T08:08:22+01:00" level=warning msg="config\\1611814580"
time="2021-01-28T08:08:22+01:00" level=info msg="Server started" PID=8440

I get Spa again. However, if I want to change event settings I have to change them all? Is that wanted or a bug? grafik

smaxx1337 commented 3 years ago

by the way: If you need credentials in order to understand the issue we are facing, please tell me your contact info.

smaxx1337 commented 3 years ago

Update: The bug only appears when changing the track while the server is running. If you stop the server and then change the track, it will have the correct track in the UI.