Jump to content

Native Linux server (with management scripts)


Alloc
 Share

Recommended Posts

I have another question. How do I move the map and player file from another server to my current host? I tried moving:

 

- Player Folder

- Region Folder

- Main.ttw

- Players.xml

 

But my server wont start. :/

Normally this should be fine but without logs noone will be able to help you with that ;)

Link to comment
Share on other sites

Normally this should be fine but without logs noone will be able to help you with that ;)

 

Hi Alloc!

 

I looked at the output log ( sorry, I'm a total noob at ubuntu in general ) and the issue was permission(s) setting.

 

Everything is working now. :) hehe.

Link to comment
Share on other sites

  • 1 month later...

Hi there.

 

Iam trying to start a dedicated server for alpha 13. Iv made a complete fresh installation, but i cant get rid of the following error:

 

 

Stacktrace:

 

 

Native stacktrace:

 

/home/sdtd/engine/7DaysToDieServer_Data/Mono/x86/libmono.so(+0x8960f) [0xb6e5460f]

/home/sdtd/engine/7DaysToDieServer_Data/Mono/x86/libmono.so(+0x21a63) [0xb6deca63]

linux-gate.so.1(__kernel_rt_sigreturn+0) [0xb7773600]

/home/sdtd/engine/7DaysToDieServer.x86() [0x879ccd0]

/home/sdtd/engine/7DaysToDieServer.x86() [0x8754d64]

/home/sdtd/engine/7DaysToDieServer.x86() [0x8756779]

/home/sdtd/engine/7DaysToDieServer.x86() [0x8756b4b]

/home/sdtd/engine/7DaysToDieServer.x86() [0x843420f]

/home/sdtd/engine/7DaysToDieServer.x86() [0x8394f5d]

/home/sdtd/engine/7DaysToDieServer.x86() [0x836a758]

/home/sdtd/engine/7DaysToDieServer.x86() [0x8364834]

/home/sdtd/engine/7DaysToDieServer.x86() [0x8365130]

/home/sdtd/engine/7DaysToDieServer.x86() [0x8173fdd]

/home/sdtd/engine/7DaysToDieServer.x86() [0x835f54c]

/home/sdtd/engine/7DaysToDieServer.x86() [0x835f80d]

/home/sdtd/engine/7DaysToDieServer.x86() [0x8084bda]

/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0xb7496723]

/home/sdtd/engine/7DaysToDieServer.x86() [0x808d465]

 

Debug info from gdb:

 

 

=================================================================

Got a SIGSEGV while executing native code. This usually indicates

a fatal error in the mono runtime or one of the native libraries

used by your application.

=================================================================

 

7DaysToDieServer_Data/Managed/Assembly-UnityScript-firstpass.dll (this message is harmless)

Loading /home/sdtd/engine/7DaysToDieServer_Data/Managed/Assembly-UnityScript-firstpass.dll into Unity Child Domain

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/Assembly-UnityScript.dll (this message is harmless)

Loading /home/sdtd/engine/7DaysToDieServer_Data/Managed/Assembly-UnityScript.dll into Unity Child Domain

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/UnityEngine.UI.dll (this message is harmless)

Loading /home/sdtd/engine/7DaysToDieServer_Data/Managed/UnityEngine.UI.dll into Unity Child Domain

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/UnityEngine.Networking.dll (this message is harmless)

Loading /home/sdtd/engine/7DaysToDieServer_Data/Managed/UnityEngine.Networking.dll into Unity Child Domain

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/AmplifyMotion.dll (this message is harmless)

Loading /home/sdtd/engine/7DaysToDieServer_Data/Managed/AmplifyMotion.dll into Unity Child Domain

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/ICSharpCode.SharpZipLib.dll (this message is harmless)

Loading /home/sdtd/engine/7DaysToDieServer_Data/Managed/ICSharpCode.SharpZipLib.dll into Unity Child Domain

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/libnoise.dll (this message is harmless)

Loading /home/sdtd/engine/7DaysToDieServer_Data/Managed/libnoise.dll into Unity Child Domain

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/LogLibrary.dll (this message is harmless)

Loading /home/sdtd/engine/7DaysToDieServer_Data/Managed/LogLibrary.dll into Unity Child Domain

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/ProfileAttribute.dll (this message is harmless)

Loading /home/sdtd/engine/7DaysToDieServer_Data/Managed/ProfileAttribute.dll into Unity Child Domain

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/NSpeex.dll (this message is harmless)

Loading /home/sdtd/engine/7DaysToDieServer_Data/Managed/NSpeex.dll into Unity Child Domain

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/EasyAntiCheat.Client.dll (this message is harmless)

Loading /home/sdtd/engine/7DaysToDieServer_Data/Managed/EasyAntiCheat.Client.dll into Unity Child Domain

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/EasyAntiCheat.Server.dll (this message is harmless)

Loading /home/sdtd/engine/7DaysToDieServer_Data/Managed/EasyAntiCheat.Server.dll into Unity Child Domain

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/System.Drawing.dll (this message is harmless)

Loading /home/sdtd/engine/7DaysToDieServer_Data/Managed/System.Drawing.dll into Unity Child Domain

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/System.Windows.Forms.dll (this message is harmless)

Loading /home/sdtd/engine/7DaysToDieServer_Data/Managed/System.Windows.Forms.dll into Unity Child Domain

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/LitJson.dll (this message is harmless)

Loading /home/sdtd/engine/7DaysToDieServer_Data/Managed/LitJson.dll into Unity Child Domain

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/System.Core.dll (this message is harmless)

- Completed reload, in 0.152 seconds

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/System.dll (this message is harmless)

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/System.Xml.dll (this message is harmless)

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/UnityScript.Lang.dll (this message is harmless)

Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/Boo.Lang.dll (this message is harmless)

The referenced script on this Behaviour is missing!

Link to comment
Share on other sites

Okay, just checked the windows version:

 

The referenced script on this Behaviour is missing! is in teh logs too, but the server starts afterwards. Looks like there is another reason why the server isnt starting.

 

I'm having the same issue. Used to work fine in A10 but A13 is not working (with a fresh install).

Link to comment
Share on other sites

Debian 8.2:

 

Failed to create secure directory (/run/user/0/pulse): Permission denied

Stacktrace:

 

 

Native stacktrace:

 

/home/sdtd/engine/7DaysToDieServer_Data/Mono/x86/libmono.so(+0x8960f) [0xb6dfa60f]

/home/sdtd/engine/7DaysToDieServer_Data/Mono/x86/libmono.so(+0x21a63) [0xb6d92a63]

linux-gate.so.1(__kernel_rt_sigreturn+0) [0xb7755600]

/home/sdtd/engine/7DaysToDieServer.x86() [0x879ccd0]

/home/sdtd/engine/7DaysToDieServer.x86() [0x8754d64]

/home/sdtd/engine/7DaysToDieServer.x86() [0x8756779]

/home/sdtd/engine/7DaysToDieServer.x86() [0x8756b4b]

/home/sdtd/engine/7DaysToDieServer.x86() [0x843420f]

/home/sdtd/engine/7DaysToDieServer.x86() [0x8394f5d]

/home/sdtd/engine/7DaysToDieServer.x86() [0x836a758]

/home/sdtd/engine/7DaysToDieServer.x86() [0x8364834]

/home/sdtd/engine/7DaysToDieServer.x86() [0x8365130]

/home/sdtd/engine/7DaysToDieServer.x86() [0x8173fdd]

/home/sdtd/engine/7DaysToDieServer.x86() [0x835f54c]

/home/sdtd/engine/7DaysToDieServer.x86() [0x835f80d]

/home/sdtd/engine/7DaysToDieServer.x86() [0x8084bda]

/lib/i386-linux-gnu/i686/cmov/libc.so.6(__libc_start_main+0xf3) [0xb743ca63]

/home/sdtd/engine/7DaysToDieServer.x86() [0x808d465]

 

Debug info from gdb:

 

 

=================================================================

Got a SIGSEGV while executing native code. This usually indicates

a fatal error in the mono runtime or one of the native libraries

used by your application.

=================================================================

...

...

...

 

 

 

Same Problem after updateengine and create instance

Link to comment
Share on other sites

I haved:

7dtd.sh updatescripts --force [v.94]

7dtd.sh updatefixes --force [6 8 10]

7dtd.sh updateengine --force [896430]

 

and i tried delete /home/sdtd complete and reinstall per ./bootstrap.sh ...

always the same error in my logfile from instance...

Link to comment
Share on other sites

Yes, I have updated all too. Its a VM. Debian Wheezy. 4GB ram. (webtropia) I think Thoron has a different problem. My Game has no output after:

 

The referenced script on this Behaviour is missing!

 

(Filename: Line: 1649)

 

worked for me before Updated to 13.

 

I have rebooted the server and updated it too.

Edited by NeverUsedID (see edit history)
Link to comment
Share on other sites

Allocs script isn't working with A13 for me

 

http://pastebin.com/WF8MKiyd

 

@Thoron, Are you running the server manually or are you using the the startserver.sh script? If you are running it manually try adding this to the parameters (like in the startserver.sh):

 

-quit -batchmode -nographics -dedicated

 

Once I did that I started getting the same errors as these guys.

Link to comment
Share on other sites

@Thoron, Are you running the server manually or are you using the the startserver.sh script? If you are running it manually try adding this to the parameters (like in the startserver.sh):

 

 

 

Once I did that I started getting the same errors as these guys.

 

These shouldn't have any impact if running the Linux dedicated build. "quit" never should make any difference, "batchmode" and "nographics" are only for clients being run as dedicated (also required for Windows dedicated), "dedicated" always only required for clients run as dedicated.

 

Also, continuing this over there as it's not relevant for the scripts: https://7daystodie.com/forums/showthread.php?34299-A13-Dedicated-Server-Linux-Bugs

Link to comment
Share on other sites

  • 4 weeks later...

Alloc, Great work man I'm really loving the scripts after a week or so of use. It's made running a server very streamlined!

 

I had checked around for a way to auto reboot the server and most implementations are windows based client programs.

 

I notice there is a ticket you previously created for this kind of feature https://7dtd.illy.bz/ticket/15

 

I was wondering if this is still being planned on implementation? Ideally it would be nice if it:

- Run script at specified time/interval (interval could be bash)

- Check if users online

- If users online, say countdown to server restart while monitoring if users connected.

 

- If no users online or prior to that final time there are no users, initiate restart.

Link to comment
Share on other sites

Saw this thread and just wanted to say thanks for the scripts...been using them for a long time.

 

iLLNESS, if there is a way to issue a "say" command from the console, we could use crontab to schedule the in-game notifications, then issue the shutdown and then reboot. I've been wanting to implement automated reboots like this but haven't had the time to research...been just doing it manually whenever there is an update. My guess it will be Telnet commands like Alloc uses in 7dtd.sh

Edited by LHammonds (see edit history)
Link to comment
Share on other sites

Thanks, glad it's of help for you guys :)

 

I had checked around for a way to auto reboot the server and most implementations are windows based client programs.

 

I notice there is a ticket you previously created for this kind of feature https://7dtd.illy.bz/ticket/15

 

I was wondering if this is still being planned on implementation? Ideally it would be nice if it:

- Run script at specified time/interval (interval could be bash)

- Check if users online

- If users online, say countdown to server restart while monitoring if users connected.

 

- If no users online or prior to that final time there are no users, initiate restart.

 

iLLNESS, if there is a way to issue a "say" command from the console, we could use crontab to schedule the in-game notifications, then issue the shutdown and then reboot. I've been wanting to implement automated reboots like this but haven't had the time to research...been just doing it manually whenever there is an update. My guess it will be Telnet commands like Alloc uses in 7dtd.sh

 

As LHammonds says: It's basically all possible already with bash scripting. Sending messages to the server is easily done with a single call to the scripts, an example can be found in the join-server hook example on the wiki.

Of course this would all have to be tied together to form a solution for announcing the restart (if people are online) with optional countdown and then stop/restart the server.

 

Not really top on my list though right now ;)

Link to comment
Share on other sites

I have written a bunch of scripts for 7D2D in Ruby. The Pastebin URLs below point to a couple of these.

 

http://pastebin.com/eH2qHV1B - A Ruby class to send messages to a 7D2D console connection (telnet)

http://pastebin.com/H613LHtA - A Ruby script that uses the class above

 

To use these, copy them both into a directory...call the class file something like "sdtdsay-class.rb" and the script whatever you want, like "send-command.rb." Make the "send-command.rb" file executable: "chmod 755 send-command.rb"

 

Change the script to use your server's settings (IP, port number, password).

 

Then you can use the script like this:

 

./send-command.rb -c listplayers
./send-command.rb -c "admin add someuser 0"
./send-command.rb -c 'say "blotavious is awesome"'
./send-command.rb -c 'say "_GREEN_blotavious_NOCOLOR_ is awesome"'

Edited by blotavious (see edit history)
Link to comment
Share on other sites

Sending messages to the server is easily done with a single call to the scripts, an example can be found in the join-server hook example on the wiki.

 

I tried the following Bash script:

#!/bin/bash
. /usr/local/lib/7dtd/common.sh
telnetCommand MehServerName "say hello world I love you"

It will send "hello" to the server and I can see it in-game but I cannot get it to send anything after the 1st word.

 

Here is the output of the command (ports and names changed to protect the innocent):

 

*** Connected with 7DTD server.
*** Server version: Alpha 13.6 (b2) Compatibility Version: Alpha 13.6
*** Dedicated server only build

Server IP:   Any
Server port: 69696
Max players: 16
Game mode:   GameModeSurvivalMP
World:       Random Gen
Game name:   MehServerName
Difficulty:  2

Press 'help' to get a list of all commands. Press 'exit' to end session.

2016-01-14T20:24:14 524423.749 INF Executing command 'say hello world I love you' by Telnet from 127.0.0.1:44444
2016-01-14T20:24:14 524423.750 INF GMSG: Server: hello

 

Am I doing something silly or does it not accept anything more than a single word?

 

Thanks,

LHammonds

Link to comment
Share on other sites

Yeah, sorry, forgot to update those :(

Double quoting as mudfly showed is right. Quoting the command with single quotes as LHammonds did should work too but AFAIR shell variables don't get expanded in those (might be wrong on this one though ;) ).

Link to comment
Share on other sites

When I around to configuring my server for automated messages via crontab, I'll post what I have done here so others can see (as well as my own forums). I plan to make a how-to article some day on how to setup a 7dtd server and Alloc is integral to that process. Again, can't thank you enough for what you've done.

Link to comment
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
 Share

×
×
  • Create New...