Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
It's early days using GSM but so far it's not bad. I have an issue with the Discord bot though constantly disconnecting. I haven't been able to use 1 command yet. Any advice?
Also on a side note, I can't shut down a server which has been run with a batch script, even forcefully. It'd also be nice to be able to pipe the output to a log file by allowing us to do something like:
server.exe -param value > server.log
1. As long as the bot reconnects ok, it normally manages disconnects itself - which can happen. The bot needs to be set up. A good resource for that is here: https://discordpy.readthedocs.io/en/latest/discord.html
2. If you are not selecting an executable for your server (and instead a batch file), then you must tell GSM what the executable/process is that it needs to interact with via the "monitoring" tab - at the bottom. Click the "..." and select your "cmd.exe" - normally located in "C:\Windows\System32\cmd.exe". This is what batch files run. It's not the recommended way to do things, since the cmd.exe can be open by any number of other applications on a machine - and GSM cannot then distinguish between them - but it's totally do-able if you want to go down this route. Otherwise, it's normally better to select the server executable itself and add the commands in the relevant section there instead of using a batch file. Your choice, of course.
3. An interesting idea. I will add it to my list for potential improvements.
1. The GSM Discord Bot never reconnects, it shows as connected for around 10 seconds and then always shows "Connection lost" and logs "Disconnected" until it restarts itself, then the same thing happens.
The bot is correctly set up from those directions as far as I can tell. If I give the bot the wrong token, it errors with a 401 (just checking it's picking up errors), so unless there's a different error being thrown when it's using the correct token that it's not logging or displaying, I'm a bit stuck.
1.b. Side note, can the Discord Bot handle multiple servers ran with GSM?
2. Thanks, I'd completely missed that part of the description. I'll get my batch script to "start" the exe instead of running it directly.
The bot can be invited to any number of servers and work the same in each. As long as permissions and channels match, no problem.
I'm having one issue however and I can't figure out how to resolve it. Currently everything about running the server works perfectly and I've set it to do automatic updates using SteamCMD. This also works as intended as best I can tell. However when an automatic update occurs the server does not restart as it's meant to. It shuts down the server, connects to SteamCMD, updates the server, closes SteamCMD, and then just hangs...
GSM says "Performing Maintenance" and "Waiting for Update to Finish" but it never proceeds beyond that point. I have to close GSM, reopen it and then start up the server. Which sort of defeats part of the point of automatic updates since I'm still manually restarting the server every time.
Am I doing something wrong?
What you describe is certainly not normal behaviour. Could be caused by a number of things - hopefully not a bug, but if it is I will have to look into it.
How long is your server monitor cycle? It defaults to 30 seconds. If you have entered a larger number then the maintenance may wait until the next cycle before attempting to start the server again.
I take it that starting the server manually via GSM works ok? If it does then that eliminates a config issue there.
If you have a lengthy shutdown delay time, then that may also cause a hang for that length of time. This is there so that the server can perform any saves before GSM does other things. Slower machines generally require longer delays.
If you click "Perform maintenance", does it work correctly that way?
I was having the same issue but eventually figured out how to fix it.
First some information from the Valheim Dedicated Server Manual PDF that is included in the dedicated server folder:
Now with that information in mind, make sure you do not have any instances of the CMD window running by right-clicking the Windows taskbar and shut down any instances of CMD that is running. (I had two instances running that I forced closed.)
Now, to fix this in GSM head to Program Settings and navigate to Server Shutdown. Tick the box that says Send keys to shutdown the server: and inside the box you type in ctrl+c
Save & Close and you are done.
Click the Perform Maintenance button and GSM should look for updates, apply, restart and all that without hanging.
I hope this solves your issue as well!
This appears to have fixed it up. I must've looked at that a hundred times and not thought to include it in the parameters. Thank you for the help.
Do you know if Valheim can be configured to use any of the server telnet/rcon commands? I've done some searching, but can't find any info. Since you were familiar with how other games have implemented it, I was curious.
Also, I'm not for sure if I missed it in the GSM Discord Bot documentation, but is there any !status query to return if the server is Online?
Currently not - so go ahead and add a startup shortcut. Come to think of it, I don't know why this wasn't added years ago. I will try and get it in the next version.
There is no status query, but you are able to get GSM to send logs directly to Discord, which could achieve roughly the same kind of thing.