Jump to content

Native Linux server (with management scripts)


Alloc

Recommended Posts

There seems to be a interesting bug? with logs and filenames when the day changes.

 

It's now 2014-08-30 00:40 and it still shows me

current_chat.log -> /home/sdtd/instances/one/logs/2014-08-29_11-26-40_chat.log

meaning chat logs are going nowhere readable and there is no file 2014-08-30...

Link to comment
Share on other sites

There seems to be a interesting bug? with logs and filenames when the day changes.

 

It's now 2014-08-30 00:40 and it still shows me

current_chat.log -> /home/sdtd/instances/one/logs/2014-08-29_11-26-40_chat.log

meaning chat logs are going nowhere readable and there is no file 2014-08-30...

 

Well, the time in the logfile-name is the time you started the instance. So this won't change unless you restart the instance. The content should be just fine anyway.

Link to comment
Share on other sites

Where is the files for the webserver and how do I access the webpage where I can see the map? I can't find any information about ports, url etc.

Wasn't yet meant to be a fully official feature of the mod so I didn't document it yet on the wiki ;)

You can get the files on SVN one by one here: SVN

Or download the folder as a tar.gz archive here: Download archive

Just make sure that you end up with ...\<7dtd-folder>\webserver\index.html etc.

Also you have to have the control panel enabled. You should then be able to access the map on http://<yourIpOrDomain>:<port of control panel + 2>/

 

 

yeh but how to get the information that a telnet lpe command returns?

You have to send the command to the Telnet port and wait for its output and then parse that output.

Link to comment
Share on other sites

yup got it working now, well thats cool.. shame the query protocol is still broke as hell.. doesn't display playernames or id's but does display how long those unknown players have been online on the server.

 

btw alloc is there anyone who has come up with a way of converting the explored randomgen maps into image tile format so it can be used on a website to show where all players are on the map?

Link to comment
Share on other sites

yup got it working now, well thats cool.. shame the query protocol is still broke as hell.. doesn't display playernames or id's but does display how long those unknown players have been online on the server.

Could be for security reasons. Not sure if Valve would like it if a game just publicly announced the steamids as you could watch who's playing.

 

btw alloc is there anyone who has come up with a way of converting the explored randomgen maps into image tile format so it can be used on a website to show where all players are on the map?

Not sure what you're talking about exactly. There's the tool to render the map offline written by cumu: http://7daystodie.com/forums/showthread.php?14947-Export-discovered-map-to-png

And the server fixes also render the map live while people visit the world.

Link to comment
Share on other sites

Thanks. I copied the files to the 7-Days folder and restarted the instance. But there is nothing listening on port control + 2. And neither status or settings show anything about a webserver port. But I guess that it should'nt be there or is not implemented yet?

 

Great work on the server, man!

 

Wasn't yet meant to be a fully official feature of the mod so I didn't document it yet on the wiki ;)

You can get the files on SVN one by one here: SVN

Or download the folder as a tar.gz archive here: Download archive

Just make sure that you end up with ...\<7dtd-folder>\webserver\index.html etc.

Also you have to have the control panel enabled. You should then be able to access the map on http://<yourIpOrDomain>:<port of control panel + 2>/

 

 

 

You have to send the command to the Telnet port and wait for its output and then parse that output.

Link to comment
Share on other sites

"There's the tool to render the map offline written by cumu: http://7daystodie.com/forums/showthr...red-map-to-png

And the server fixes also render the map live while people visit the world. "

 

yeh thats a nice tool I started using that.. the server fixes rendering the map live.. thats in the <instance>/Random Gen/<server>/map/

folder? but is there anything to display all the tiles like the other mapping tool?

 

also I started getting this after starting an instance...

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

Done!

 

not sure why

Link to comment
Share on other sites

Thanks. I copied the files to the 7-Days folder and restarted the instance. But there is nothing listening on port control + 2. And neither status or settings show anything about a webserver port.

Do you have control panel enabled? Do what does the log contain?

 

yeh thats a nice tool I started using that.. the server fixes rendering the map live.. thats in the <instance>/Random Gen/<server>/map/

folder? but is there anything to display all the tiles like the other mapping tool?

Yup, that's what jimmyh and I are currently talking about too ;) (And a lot of refs before)

I'll write a short documentation later on, don't want to repeat this over and over again ;)

 

also I started getting this after starting an instance...

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

Done!

Hm, where do you get it? Console? Does the stuff work besides the error? I.e. server running, logs get filled, especially the logs/current_*.log?

Link to comment
Share on other sites

I tried compiling the source for the server fixes, but ran into the following errors: "Use of unassigned out parameter". It seems like the Vector2i structs are being used before getting a value assigned.

You dont happen to have hint as to why this is occuring? I must admit that I have never done anything with mono before..

 

Edit:

Oh and I second this:

And maybe Alloc could modify /usr/local/lib/7dtd/commands/stop.sh with maxwait=15 for servers that run a bit larger maps/userbases and giving additional mercy for badly behaving 7dtd processes.

 

I think it could be quite handy, because my instance seems to be taking too long to shutdown correctly :D.

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

so i been adding custom commands using just .<command> entered in the chat.. works fine.. but anyway to get a players entered command from the console instead? would mean less clutter in the chat. Or a way of adding custom commands, that don't tell the player anything like "Command <cmd> not allowed for etc", if a custom command is used its passed to a new hook?

 

also remoteCommand doesn't seem to work, ie can't seem to get anything out of it.. I got chat, playerConnect, telnetCommand hooks working fine though so not sure why.

Link to comment
Share on other sites

tbh i didn't check the logs.. cus everything is working fine.. its just odd I get it now. I get it in terminal console after doing 7dtd.sh start <instance>

Hm, ok, if you don't even have any problems other than that we might as well just ignore this for now ;)

 

 

I tried compiling the source for the server fixes, but ran into the following errors: "Use of unassigned out parameter". It seems like the Vector2i structs are being used before getting a value assigned.

Could you give me the exact error output (i.e. including file/line number).

I do not get that error so I don't know where and why that should happen.

 

 

I think it could be quite handy, because my instance seems to be taking too long to shutdown correctly :D.

Will be an option in the future. For now you could just edit the stop-script and put any value you like (though remember that when updating the changes will be overwritten).

 

 

so i been adding custom commands using just .<command> entered in the chat.. works fine.. but anyway to get a players entered command from the console instead?

Nope, currently not. It would require either to get the unknown commands to be printed ("harder" to intercept though) or one actual command that does just print the given parameters to the log so you could read them. Don't really think that's the best thing to do though.

 

 

also remoteCommand doesn't seem to work, ie can't seem to get anything out of it.. I got chat, playerConnect, telnetCommand hooks working fine though so not sure why.

Did you check if the commands show up in the current_commandExecution.log? If they do I suppose it's something wrong with your hooks. If they do not it might be either the server or the scripts, but at least with a quick test over here it worked fine ;)

Link to comment
Share on other sites

For example line 89 in MapRendering (rev 136, happened with the newest one too though, just not sure about the line there).

You declare "curFullMapPos" and then access its x attribute two lines down.

Another example would be line 184 in the getBlockNumber function, setting of block.x.

Also, the DamageSource Type seems to be missing?

 

Cool thing about the stop server time option, I will check/edit the script mysef for now.

Link to comment
Share on other sites

For example line 89 in MapRendering (rev 136, happened with the newest one too though, just not sure about the line there).

You declare "curFullMapPos" and then access its x attribute two lines down.

Another example would be line 184 in the getBlockNumber function, setting of block.x.

Hm, just read the .NET doc on structs ... you don't have to explicitly initialize it with new or anything but it looks like it's preferred to do so (x and y are written first in all cases so it does not matter for execution but it seems your compiler does not like it anyway). Added default initializers. Please tell me if that fixed your errors.

 

Also, the DamageSource Type seems to be missing?

Does it not compile or is it just highlighting or something around these lines missing in the editor? E.g. MonoDevelop sometimes chokes on the types but the compiler still compiles fine as it actually is there ;)

(Assuming you ran the deobfuscator on the input AC#.dll, but without almost nothing would work ;) )

Link to comment
Share on other sites

Thanks for the update, yes that fixed that problem. The same error occurs in the function GetWorldExtent (minChunk, maxChunk, minPos, maxPos) and getBlockNumber(block, blockOffset). After fixing those too that error disapperead, maybe you could commit the same :D.

 

Regarding DamageSource, its an actual error so it wont compile. I ran the deobfuscator on the original Assembly-CSharp.dll which seemed successful :D and then added it to the project.

 

On another topic: Is anyone else experiencing server crashes directly while/after /saveworld ?

There is no other log output indicating an error, just ends on something like "2014.08.31 16:44:19: Saving playerData for entity id: 304598".

It couldnt be caused by me calling saveworld every 10 minutes or so automatically could it?

Link to comment
Share on other sites

hmm "whitelist add <playerID> <permission level> "

 

now I thought playerID would be the steam64id ... but it seems not?.. seems a bit silly if so...

 

no way to remotely add a new player to the server whitelist remotely without them having already been on the server to get a different player id generated (one that seems to change every time?)

 

could you add something? that works with steamid's as I'd rather use that

Link to comment
Share on other sites

Thanks for the update, yes that fixed that problem. The same error occurs in the function GetWorldExtent (minChunk, maxChunk, minPos, maxPos) and getBlockNumber(block, blockOffset). After fixing those too that error disapperead, maybe you could commit the same :D.

You really should switch to a proper compiler ;)

 

Regarding DamageSource, its an actual error so it wont compile. I ran the deobfuscator on the original Assembly-CSharp.dll which seemed successful :D and then added it to the project.

Hm, then it should be there. I can compile it too ;)

 

On another topic: Is anyone else experiencing server crashes directly while/after /saveworld ?

There is no other log output indicating an error, just ends on something like "2014.08.31 16:44:19: Saving playerData for entity id: 304598".

It couldnt be caused by me calling saveworld every 10 minutes or so automatically could it?

Have never had this happen. The "savin playerdata" is when a connected player's inventory is stored for showinventory (so every 30 sec per player or on player disconnect).

 

 

hmm "whitelist add <playerID> <permission level> "

 

now I thought playerID would be the steam64id ... but it seems not?.. seems a bit silly if so...

Well, yeah, this command accepts only either player name or entity id (this won't change on a single server running one save game but will change on a new save or server).

There will be a more flexible way of managing players added by this mod later on.

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
×
×
  • Create New...