Jump to content

Native Linux server (with management scripts)


Recommended Posts

Alloc, I'm not sure if I'm doing something wrong here or not, but we're not seeing the map generate at all on our dedicated server. I go and load it up in a browser, and I can see trackers for all players, animals (if I look closely) and hostiles, but there's no actual map drawn. I just updated to the latest fixes to see if that made a difference, and it did not.

 

I will state that I did put an old webpermissions.xml into the folder, but that was after loading the unaltered one first. The older one was to see if it made a difference.

 

EDIT: In the process of making sure player info and log still work, I see this in the log (and yes they all work except map):

 

2019-10-08T16:49:36 2074.202 INF Error in Web.HandleRequest(): System.NullReferenceException: Object reference not set to an instance of an object at System.Net.HttpConnection.get_RemoteEndPoint () [0x00000] in <c9226b2f33b7421e85bb391f94075e49>:0 at System.Net.HttpListenerRequest.get_RemoteEndPoint () [0x0000b] in <c9226b2f33b7421e85bb391f94075e49>:0 at AllocsFixes.NetConnections.Servers.Web.Web.DoAuthentication (System.Net.HttpListenerRequest _req, AllocsFixes.NetConnections.Servers.Web.WebConnection& _con) [0x0003b] in <563c14ed088347ba9435fd8ab8c282fe>:0 at AllocsFixes.NetConnections.Servers.Web.Web.HandleRequest (System.IAsyncResult _result) [0x00073] in <563c14ed088347ba9435fd8ab8c282fe>:0

 

Not sure if that actually has any relevance to the issue, but figured I'd include it. Timestamp coincided with the access to the web page originally, rather than checking logs/players.

Edited by bobross (see edit history)
Link to post
Share on other sites

Hi alloc,

ich habe folgende Einstellungen getroffen:

 

<permission module="web.map" permission_level="2000" />

 

<!-- <permission module="webapi.getlog" permission_level="0" /> -->

<!-- <permission module="webapi.executeconsolecommand" permission_level="0" /> -->

<permission module="webapi.getplayerlist" permission_level="2000" />

<permission module="webapi.getstats" permission_level="2000" />

<permission module="webapi.getplayersonline" permission_level="2000" />

 

<permission module="webapi.getplayerslocation" permission_level="2000" />

<permission module="webapi.viewallplayers" permission_level="2000" />

 

<permission module="webapi.getlandclaims" permission_level="2000" />

<permission module="webapi.viewallclaims" permission_level="20000" />

 

<permission module="webapi.getplayerinventory" permission_level="2000" />

 

Leider zeigt er mir die map nicht an,

die map bleibt einfach schwarz.

 

 

Hi alloc,

I have made the following settings:

 

<permission module="web.map" permission_level="2000" />

 

<!-- <permission module="webapi.getlog" permission_level="0" /> -->

<!-- <permission module="webapi.executeconsolecommand" permission_level="0" /> -->

<permission module="webapi.getplayerlist" permission_level="2000" />

<permission module="webapi.getstats" permission_level="2000" />

<permission module="webapi.getplayersonline" permission_level="2000" />

 

<permission module="webapi.getplayerslocation" permission_level="2000" />

<permission module="webapi.viewallplayers" permission_level="2000" />

 

<permission module="webapi.getlandclaims" permission_level="2000" />

<permission module="webapi.viewallclaims" permission_level="20000" />

 

<permission module="webapi.getplayerinventory" permission_level="2000" />

 

Unfortunately he does not show me the map,

the map just stays black.

Link to post
Share on other sites
So were certain options removed?

Only whatever's noted in the release notes.

 

 

... but we're not seeing the map generate at all on our dedicated server...

Sounds like this was pre-update of the server mods. That would be an issue for the other thread though.

 

 

 

Unfortunately he does not show me the map,

the map just stays black.

Most likely the same issue, i.e. not running the latest server fixes mod that I released yesterday. Should be versions 20, 23, 33.

  • Like 1
Link to post
Share on other sites
  • 3 weeks later...

My Linux server is working like a champ. I just generate a map with Nitrogen and upload it using WinSCP into /home/sdtd/engine/Data/Worlds

 

then sudo chown sdtd:sdtd mapnamehere

 

then in your /home/sdtd/instances/mapnamehere/config.xml change this line to the map you created.

<!-- World -->

<property name="GameWorld" value="mapnamehere"/>

Link to post
Share on other sites

Is there a method I can use to make Traders show up on the web map after they have been uncovered? Also, I know that when maps are generated each town has a name (I have seen town/city names while watching generation happen). Is there a way to show the town names on the web map?

Edited by morggin (see edit history)
Link to post
Share on other sites

I used to use virtual servers but found it more beneficial and economical to just outright purchase a server. I bought a Dell R710 with 64 gigs of RAM and then put a 500 Gig SSD in it and installed Ubuntu 14.04 on it. Then took the monthly payment I sent to a server rental place and used it to upgrade my internet connection to 100MB. Now I host my own server out of my house in Tacoma on Enterprise-class server hardware over the Click-Cable fiber network. Linux 7dtd server runs excellent on it.

Edited by morggin (see edit history)
Link to post
Share on other sites
Is there a method I can use to make Traders show up on the web map after they have been uncovered?

Yes, if you modify the mod ( :D ) to support this this can be achieved. The easier part here is showing traders, the harder is only showing them when uncovered.

 

Also, I know that when maps are generated each town has a name (I have seen town/city names while watching generation happen). Is there a way to show the town names on the web map?

Pretty sure this information isn't stored anyway, so that would be a no.

  • Like 1
Link to post
Share on other sites

Thanks, Alloc. On another note is the web map data stored in /instances/<map>/<save name>/<mapname>/<gamename>/Regions?

 

I have a 12288 x 12288 map and I tried to use "visitmap -12288 -12288 12288 12288" from the in-game console but ended up with some strange artifacts on the web map. If I delete the contents of Regions, will I just be able to run "rendermap" to restore it to a full map?

 

I tried deleting the specific region files for the affected areas but they are still showing up. I may have to clear my cache and reload the page.

 

mapmess11-4-2019.jpg.570b0f80e7f3d8633d111617bc20795a.jpg

Edited by morggin (see edit history)
Link to post
Share on other sites

Regions is game data, Map is where the rendered files for the webmap are.

If you have a 12k map you should not try to render 24k, which is what your command tried (12k - -12k = 24k).

Link to post
Share on other sites

Webmap not rendering A18 b155

 

Hi,

since updating to 18 stable - did a complete reinstall using the automated install scripts from Alloc's Website and running mod versions 20/23/33 - the webserver does not render the map anymore.

It does not even show any information other than date, time, x Players, y Hostiles, z Animals to the left.

To the right/ center there is just nothing. IIRC there used to be a table listing e.g. the players but it just stays blank.

When I refresh, for just the tiniest of moments, I can glimpse the headers of said table before the content disappears.

 

Do you have any hint as to what might cause this issue?

The only post I found that might be related is two pages back in this thread, mentioning just having had to wait it out for several hours. Is the webmap just generally taking some time after a new game is started for the first time? That wouldn't explain the missing table, though.

 

Regards, uncle

Link to post
Share on other sites

Sounds pretty much like you just haven't set up permissions. If it was the old issue with just the rendering failing you'd still get the map controls and all the other information on the page.

Link to post
Share on other sites
Sounds pretty much like you just haven't set up permissions. If it was the old issue with just the rendering failing you'd still get the map controls and all the other information on the page.
I do feel a lot dumber now for a lot of reasons; two of them being that I cannot for the life of me remember setting these in the last game, and then seeing said permissions mentioned here and there and not thinking about... that I might have set them up for the last game.

Thanks aplenty; you were spot on.

Link to post
Share on other sites
  • 2 weeks later...

A russian hacker attacked my server last night. I wasn't running EAC (i am now) and he modified some file on his side to gain admin access and destroyed at least 5 diffrent player bases. I was hoping that restoring the instance direcotry from 7dtd/backup would restore the world but apparently that is not the case. I restored from 24 hours ago but the damage is still there. Is the world data stored in the instance or in /sdtd/engine/Data/Worlds ?

Link to post
Share on other sites
I was hoping that restoring the instance direcotry from 7dtd/backup would restore the world but apparently that is not the case. I restored from 24 hours ago but the damage is still there. Is the world data stored in the instance or in /sdtd/engine/Data/Worlds ?

As Sylen said the actual game save data is part of instances/<gamename>/..., enginge/data/worlds is only serving the base world. If you (properly!) restored some of that data and it did not fix those changes then the hack was done earlier than you though.

 

Also make sure to stop the server first before replacing save files.

 

could it be that I'm restoring data but not cleaning the game cache on my local client that's why I'm still seeing the destroyed places?

No, the only thing cached on clients is the uncovered mini map view, nothing else.

Link to post
Share on other sites
  • 3 weeks later...

You won't find any information on restoring, after all that's just plain file handling ;)

What I meant with proper way is making sure file permissions are correct after restoring stuff and making sure to grab the correct files in the first place (and put them in the correct place of the save of course).

Link to post
Share on other sites

Hi Alloc, thanks for your great work on this.

 

I have a couple questions.

 

I have mods to put in, they go into sdtd/engine/mods or do they go somewhere else?

 

Does the serverconfig.xml get used in sdtd/engine? Does the info just get pulled from /sdtd/instances/name/ config.xml?

 

How do I add files from a windows machine to the server?

 

Thanks for your help.

Link to post
Share on other sites

I can answer these.

 

I have mods to put in, they go into sdtd/engine/mods or do they go somewhere else?

They go under /home/sdtd/engine/Mods

 

Does the serverconfig.xml get used in sdtd/engine? Does the info just get pulled from /sdtd/instances/name/ config.xml?

Each instance has a config.xml you configure the server settings in.

 

How do I add files from a windows machine to the server?

 

There may be a few ways to do this, but my personal preferred method is to use WinSCP to establish an SCP session to the Linux server and dump the files into your SSH user home folder, then SSH in as your user and copy them to the appropriate sdtd folders. Once the files are in place make sure to chown (change owner) the files.

 

For example if you use the Nitrogen tool by Damocles to generate your own maps you can upload it to /home/sdtd/engine/Data/Worlds. (also try to keep your world names short or use _ between multiple words in the name as linux just likes that better and it's less confusing than having to use \ for proper formatting of hard spaces in the name.)

 

chown -r sdtd:sdtd /home/sdtd/engine/Data/Worlds/<World name>

 

Or if you copied files into /home/sdtd/engine/Mods

chown -r sdtd:sdtd /home/sdtd/engine/Mods

 

As stated above, chown stands for change owner. sdtd has to own all the files under the folder for things to function properly. This is especially important if your restoring files from the backup.

 

NOTE: I personally have a symbolic link to a separate hard drive that I have mounted as /archive. I have symbolically linked /home/sdtd/backup --> /archive/backup/sdtd.

Edited by morggin (see edit history)
Link to post
Share on other sites

Do you guys have a recommended restart interval? Right now i am restarting every 8 hours with a cronjob.

20 6,14,22 * * * /usr/local/bin/7dtd.sh kill naboo && sleep 300 && /usr/local/bin/7dtd.sh start naboo

Could i get away with just restarting once every 24 hours or dose the server get wonky if it runs that long?

Link to post
Share on other sites
Do you guys have a recommended restart interval? Right now i am restarting every 8 hours with a cronjob.

20 6,14,22 * * * /usr/local/bin/7dtd.sh kill naboo && sleep 300 && /usr/local/bin/7dtd.sh start naboo

Could i get away with just restarting once every 24 hours or dose the server get wonky if it runs that long?

I used to do 24 hours, I'm doing 12 now.

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