LinuxGSM icon indicating copy to clipboard operation
LinuxGSM copied to clipboard

[BUG] Rust - Seed Error after Map-Wipe and Stop/Start

Open DerMoki opened this issue 2 years ago • 4 comments

User Story

After a map-wipe the Server delete the old map files .map and . sav (Seed 924899645) and created a new with a new Random-Seed (Seed 576968746). All Works, we can connect and play on a new Map.

But: When i restart the Rust-Server (or Stop and Start), the Server created a new Map again with the old Seed (Seed 924899645) again. Now there are two maps in folder and he load always the "old" Map with Seed 924899645.

With a Restart the Server always change the Seed to 924899645

Basic info

  • Distro: [Debian 10]
  • Game: [Rust]
  • Command: [./rustserver map-wipe] and after this [./rustserver restart]
  • LinuxGSM version: [v20.5.1]

Further Information

DONT change the Seed in lgsm to work with Random-Seeds to have a new map after Map-Wipe every time (like probably most servers) You can find some of my Screenshots in LinuxGSM-Discord: https://discord.com/channels/127498813903601664/424152809970204672/959474458014412860

To Reproduce

Steps to reproduce the behaviour:

  1. Install the Rust Server ./rustserver install
  2. Run the Server ./rustserver start and wait for full loading
  3. look at /rustserver/serverfiles/server/rustserver , here the server generated the Map named proceduralmap.3000.924899645.222.map (Mapsize=300, Seed=924899645)
  4. make a Wipe ./rustserver map-wipe
  5. the Server delete the .sav and.map and generate a Random Seed and start the Server. Wait for full generation of Map and Server
  6. look at /rustserver/serverfiles/server/rustserver again, the Map is now proceduralmap.NEWGENERATEDRANDOMSEED.222.map
  7. make a Server Restart ./rustserver restart
  8. wait for full restart and look /rustserver/serverfiles/server/rustserver. You find the proceduralmap.NEWGENERATEDRANDOMSEED.222.map and the Server generated the proceduralmap.3000.924899645.222.map again an load this (old) map.
  9. The Seed after a Restart or Stop/Start is always 924899645

Expected behaviour

The server should still use its own generated random seed on restart

DerMoki avatar Apr 01 '22 22:04 DerMoki

I have this issue also on an Ubuntu distro setup with procedural maps. The only way I was able to work around the problem was to pin server to the new seed by setting the seed value in serverfiles/server/rustserver/cfg/[server_config].cfg. If you leave the value as zero, the server reverts to the seed that was used the first time.

scottengle avatar Apr 07 '22 17:04 scottengle

Nothing much of value to add to the discussion, but just sounding off that I experienced this same issue - although with a different seed number of course. The underlying problem being that after doing a map wipe, playing some time on a new map, and then issuing the restart command, the server loaded the map prior to the wipe, instead of the current map.

OneEighteenNoTwo avatar May 21 '22 18:05 OneEighteenNoTwo

+1, seed is changing to a fixed number when server is shut down and started back up, without the wipe command being used. Also having to pin the seed in the cfg file for that server

Log files show "+server.seed" "0" in the command line args when this happens, with that corresponding to this log entry Generating procedural map of size 3000 with seed 943622819

With the above, it always seems to generate a fixed seed of 943622819 for 0 and ignore lgsm/data/rustserver-seed.txt

Mazo avatar Jun 06 '22 08:06 Mazo

I am also experiencing the same issue. Only seems to happen when it's NOT a force-wipe. Manually wiped servers using the mw or mapwipe function will generate a new random seed, but upon server restart (I restart daily in the mornings) it will revert back to a previously used seed.

lblanchardiii avatar Aug 12 '22 15:08 lblanchardiii

I'm seeing the same thing. Then I thought it must be cached somewhere. I removed both the rustserver, serverfiles, log and lgsm and installed a "new" server. The first seed on ./rustserver start was still the same one thats stuck. I'm seeing 2100762109. For those asking I do not have a cached seed somewhere.

rust@rust:~/rust-server$ grep -rnw . -e "2100762109"
./log/console/rustserver-console-2023-03-21-02:20:01.log:220:Generating procedural map of size 4500 with seed 2100762109
./log/console/rustserver-console-2023-03-21-02:11:51.log:214:Generating procedural map of size 4500 with seed 2100762109
./log/console/rustserver-console-2023-03-21-02:11:51.log:8679:Couldn't load server/rustserver/proceduralmap.4500.2100762109.234.sav - file doesn't exist
./log/console/rustserver-console.log:220:Generating procedural map of size 4500 with seed 2100762109
./log/script/rustserver-script-2023-03-21-02:11:51.log:39:proceduralmap.4500.2100762109.234.map
./log/script/rustserver-alert.log:106:Generating procedural map of size 4500 with seed 2100762109

image

brorbw avatar Mar 21 '23 01:03 brorbw