Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

This systemd service I wrote after following documentation for a Unturned server any help?

Do you have "screen" installed?

It's trying to start on a screen session that doesn't exist.

Link to post
Share on other sites

I think you have an error in your path. You specified

GameServers/Unturned/UnturnedServer/ServerHelper.sh

This is a relative path, since it doesn't start with a "/". Since you're running a system service this should be an absolute path.

Remember to quote or @mention others, so they are notified of your reply

Link to post
Share on other sites
Just now, Nayr438 said:

Do you have "screen" installed?

It's trying to start on a screen session that doesn't exist.

I have it installed 

Link to post
Share on other sites
2 minutes ago, Nayr438 said:

Do you have "screen" installed?

It's trying to start on a screen session that doesn't exist.

I think this is just subsequent error. The service fails to start (so the screen session does too), so when systemd tries to stop the service, it fails because there is no active screen session. You wouldn't get a message "no screen session found" if screen wasn't installed. You'd get something like "unknown command: screen".

Remember to quote or @mention others, so they are notified of your reply

Link to post
Share on other sites
Just now, Eigenvektor said:

I think this is just subsequent error. The service fails to start (so the screen session does too), so when systemd tries to stop the service, it fails because there is no active screen session. You wouldn't get a message "no screen session found" if screen wasn't installed. You'd get something like "unknown command: screen".

How would I fix this, I'm a noob when it comes to systemd

Link to post
Share on other sites
Just now, GougedKirby522 said:

How would I fix this, I'm a noob when it comes to systemd

Look at my first post. The path you configured is incorrect.

GameServers/Unturned/UnturnedServer/ServerHelper.sh

 

This is a relative path, meaning it assumes you're in a certain directory already. Try using an absolute path, i.e. one starting at root ("/"). So something like:

/what/ever/directory/it/is/installed/in/GameServers/Unturned/UnturnedServer/ServerHelper.sh

Remember to quote or @mention others, so they are notified of your reply

Link to post
Share on other sites
1 minute ago, Eigenvektor said:

Look at my first post. The path you configured is incorrect.


GameServers/Unturned/UnturnedServer/ServerHelper.sh

 

This is a relative path, meaning it assumes you're in a certain directory already. Try using an absolute path, i.e. one starting at root ("/"). So something like:


/what/ever/directory/it/is/installed/in/GameServers/Unturned/UnturnedServer/ServerHelper.sh

Okay I'll try that, thanks

Link to post
Share on other sites

Changed, reloaded daemon and restarted and still spat out errors

3.PNG

1.PNG

Link to post
Share on other sites
Just now, GougedKirby522 said:

Changed, reloaded daemon and restarted and still spat out errors

1.PNG

Why not simply copy & paste the text? That would make it a bit easier to reference things :P

 

Are you sure the game server is in the directory "/GameServer/…/ServerHelper.sh"? Simply adding a / does not fix the issue if this is not the path where the script is located.

 

Go into the directory where "ServerHelper.sh" is located, then enter "pwd", this will return the absolute path for that directory.

Remember to quote or @mention others, so they are notified of your reply

Link to post
Share on other sites
1 minute ago, Eigenvektor said:

Why not simply copy & paste the text? That would make it a bit easier to reference things :P

 

Are you sure the game server is in the directory "/GameServer/…/ServerHelper.sh"? Simply adding a / does not fix the issue if this is not the path where the script is located.

 

Go into the directory where "ServerHelper.sh" is located, then enter "pwd", this will return the absolute path for that directory.

Okay will do! Thanks 

Link to post
Share on other sites

root@delta1:/GameServers/Unturned/UnturnedServer# pwd
/GameServers/Unturned/UnturnedServer
root@delta1:/GameServers/Unturned/UnturnedServer# ls
BattlEye  Content          ExampleServer.sh  Licenses.txt  Logs                       Modules      ServerHelper.sh  steam_appid.txt  StreamerNames.json      Unturned_Headless.x86_64
Bundles   CuratedMapIcons  Extras            linux64       Maps                       Sandbox      Servers          steamapps        Translations            Worlds
Cloud     EconInfo.json    install.vdf       Localization  MasterServerBlacklist.txt  Screenshots  Status.json      steamclient.so   Unturned_Headless_Data
root@delta1:/GameServers/Unturned/UnturnedServer#
 

Tested the directory with pwd and ls and is the correct directory path

Link to post
Share on other sites
24 minutes ago, GougedKirby522 said:

Tested the directory with pwd and ls and is the correct directory path

Can you try running the server directly?

/…/ServerHelper.sh -ThreadedConsole +LanServer/Deltaserver1

 

If that works, try running it through screen

/bin/screen -dmS unturned-server /…/ServerHelper.sh -ThreadedConsole +LanServer/Deltaserver1

 

Are you sure "screen" is located in /bin/? You could try "which screen" to make sure.

Remember to quote or @mention others, so they are notified of your reply

Link to post
Share on other sites
3 minutes ago, Eigenvektor said:

Can you try running the server directly?


/…/ServerHelper.sh -ThreadedConsole +LanServer/Deltaserver1

 

If that works, try running it through screen


/bin/screen -dmS unturned-server /…/ServerHelper.sh -ThreadedConsole +LanServer/Deltaserver1

 

Are you sure "screen" is located in /bin/? You could try "which screen" to make sure.

Server runs normally If I run it manually, which screen returned /usr/bin/screen

Link to post
Share on other sites
Just now, GougedKirby522 said:

Server runs normally If I run it manually, which screen returned /usr/bin/screen

Well in that case you need to adjust the service command you used to /usr/bin/screen :P

 

ExecStart=/usr/bin/screen -dmS unturned-server /GameServer/…/ServerHelper.sh -ThreadedConsole …

 

Remember to quote or @mention others, so they are notified of your reply

Link to post
Share on other sites

Still has these errors:

3:51 PM
Failed to start Unturned Dedicated Server.
systemd
 
3:51 PM
unturned-server.service: Failed with result 'exit-code'.
systemd
 
3:51 PM
unturned-server.service: Start request repeated too quickly.
systemd
 
3:51 PM
Stopped Unturned Dedicated Server.
systemd
 
3:51 PM
unturned-server.service: Scheduled restart job, restart counter is at 5.
systemd
 
3:51 PM
unturned-server.service: Failed with result 'exit-code'.
systemd
 
3:51 PM
unturned-server.service: Control process exited, code=exited, status=1/FAILURE
systemd
 
3:51 PM
tail: invalid PID: ‘’
bash
 
3:51 PM
No screen session found.
bash
 
3:51 PM
Started Unturned Dedicated Server.
systemd
Link to post
Share on other sites

* threads merged *

 

Making multiple threads about the same subject / question isn't allowed.

If you need help with your forum account, please use the Forum Support form !

 

VPN server guide

Introduction to Mechanical Keyboard

Spoiler

My Gaming Rig - Motherboard: MSI Z370-A PRO CPU: i7-8700 RAM: 32GB DDR4 2400(4x8GB) GPU: Gigabyte GTX 1060 3GB OS SSD: 240GB Avexir E100 Storage: 2x 1TB Seagate PSU: Seasonic G650 OS: Windows 10 Pro 64bits Monitor: Acer 21in G205H + Lenovo 21in

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×