1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

Server autoboot and auto shutdown

Discussion in 'Groups & Dedicated Servers' started by PazDim, Aug 31, 2018.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. PazDim

    PazDim Trainee Engineer

    I can not install the server in automatic mode. All that I need is an automatic startup at Windows startup and automatic shutdown at the Windows shutdown + saving the world. At the moment:
    A server configured as a service is not always started. Error in the logs - the "IP is not assigned" (or something like this). The same error occurs if I disconnect the Internet. But the Internet is connected! In the case that the service is running, at the Windows shutdown, server does not always save the world.
    A server running as a local / console works fine. But i need work in automatic mode.
    The server running from the command line with the -console option works well. I run it through the Windows Scheduller. But at the shutdown, he does not save the world! Tried to just turn off the computer. Tried to execute the command taskkill /IM. Does not work.
    Is the server intended for manual control???
    --- Automerge ---
    I found problem. When I run taskkill, dedicated The server exits with an error: "threadtools.cpp (3294): Assertion Failed: Illegal termination of worker thread...". Any ideas?
  2. MTXRooster

    MTXRooster Trainee Engineer

    When you say "A server configured as a service is not always started"., but then later reference using Windows Scheduler it forces me to ask you how/what exactly your setup us and what you consider configured as a service. I cannot comment on anything run though windows scheduler as I have *never* used that method to launch a server service/instance. Here is what ya want to do....

    1. Fire up SpaceEngineersDedicated.exe *RUN AS ADMINISTRATOR* (this is absolutely critical to your success)
    2. On the first screen that pops up, click Add New Instance. (DO NOT SELECT LOCAL/CONSOLE)
    3. Select an Instance Name (This 'service' name will be used later when you want to edit/change things, you will see THIS name directly under the "Local / Console" option, and will be double-clicking on it in the future to select your server should you need to edit it, shut it down, etc..)
    4. Double-click on the newly created instance of the name you just assigned :)
    5. Set up your settings as desired, and when ready click on save and start. Google is your friend at this point or the official server configuration guide..

    Once you've clicked save and start, the dedicated server service will begin.
    Also note that when the PC reboots, the service will automatically start once Windows is up (or after someone logs in possibly depending on your OS version, policy settings etc..

    Only thing I can't honestly tell you is when you tell the PC to shutdown, whether or not the service properly saves when issuing the terminate command to the service. Maybe someone with more experience on that can field an answer.. All I can say is I've never had a corrupt map/server/world in my time, and I've run a fair mix of 24/7 servers, as well as pop-up servers for this or that, never with any problem. I have only one server that I religiously go into the GUI and stop before rebooting that particular PC, and honestly it is almost never shut off. Of course your mileage may vary. And if this is the way you set yours up, then I'm sorry to have wasted your time, but from what you wrote, it seems like you manually added the server to windows scheduler. And again, maybe someone else will pop on here and say, "oh yeah, I use windows scheduler all the time, here's how...", but I've not read anyone that I can recall in the past, who does it that way.
    • Like Like x 1
  3. PazDim

    PazDim Trainee Engineer

    Thanks for the answer. Yes, I guess I described the problem poorly. I can create a service. It appears in the list of services. I can manually start it and can stop it. But it does not always start automatically when the operating system starts. If I remember correctly, the error was related to the receipt of the IP address. Unlike you, my server should often be turned off (I wanted to play - turned it on, then turned it off). So now I'm running it through the scheduler. The server is configured to autosave every minute, so the data is not lost. It's a bad idea, but so far it works like this.
  4. usurpine

    usurpine Trainee Engineer

    I set up my server exactly like this. Just it disappears sometimes from the server list, while i am still playing. So the service is running but nobody can login from the server list. If i restart the server manuall with the GUI its there again.
    The maintenance autorestart eg. every 240 min is not working, too. Its shutting down the server but not starting it again. So here again i have to start or restart the server. The windows service is doing restart after failures but when the service is shutdown by the mainentance setup its not a failure and windows might think, service is still running. So its a bit frustrating if server is not running stable for multiplayers, they just leave it and play somewhere else.
    I would like to have the service always run and be listed, how do i do that ?
Thread Status:
This last post in this thread was made more than 31 days old.