Page 21 of 66 FirstFirst ... 11192021222331 ... LastLast
Results 301 to 315 of 987

Thread: Native Linux server (with management scripts)

  1. #301
    Fun Pimps Staff
    Join Date
    Oct 2013
    Location
    Germany - Darmstadt
    Posts
    2,962
    Rep Power
    1
    Hm, tell TFP about that
    Buff (and "debuff") are official commands introduced in 9.0, so should not be affected by the mod or the Linux stuff

  2. #302
    Hunter qriff's Avatar
    Join Date
    Apr 2014
    Location
    Helsinki
    Posts
    125
    Rep Power
    0

    Arrow

    With latest versions, in current_output.log, now receiving:

    Code:
    2014.08.27 10:47:58: Error in Allocs telnetListenThread: Too many open files
    2014.08.27 10:47:58: Stack Trace:   at System.Net.Sockets.Socket.Accept () [0x00000] in <filename unknown>:0
    2014.08.27 10:47:59: at System.Net.Sockets.TcpListener.AcceptTcpClient () [0x00000] in <filename unknown>:0
    2014.08.27 10:47:59: at AllocsNetTelnetServer.telnetListenThread () [0x00000] in <filename unknown>:0
    This has apparently been manifesting earlier as daemon crashes but without error messages (or lost) and now failing to start (on Debian, latest).

    Code:
    # 7dtd.sh status one
    Instance: one
    
    Status: Running
    Open ports:
        25000 (udp)
        25001 (udp)
        25002 (udp)
        27036 (udp)
        37720 (tcp)
        8081 (tcp)
    /usr/local/lib/7dtd/common.sh: line 186:  5231 Killed                  nc 127.0.0.1 $TEL_PORT 0<&3
    Players:
    
    Game info:
        Server name:    One
        Password:
        Max players:    64
        World:          Random Gen
    
    Network info:
        Port:           25000
        Public:         true
        Control Panel:  off
        Telnet:         Port 8081, Pass
    Fix, insert/raise http://unix.stackexchange.com/a/85458 in /etc/security/limits.conf from default of 4096 with:
    Code:
    sdtd       hard     nofile     16384
    sdtd       soft     nofile      8192
    Note: Relogin required!

    Diagnostics: http://www.cyberciti.biz/tips/linux-...scriptors.html
    Last edited by qriff; 08-27-2014 at 08:32 AM. Reason: diagnostics

  3. #303
    Fun Pimps Staff
    Join Date
    Oct 2013
    Location
    Germany - Darmstadt
    Posts
    2,962
    Rep Power
    1
    Heh, thanks for the detailed report (and even a fix to it ).

    7dtd is doing some bad stuff, especially at startup when it opens lots of files. And in one of the server fixes releases I even increased that problem (I think that's the one still shipped with the scripts)
    I will release a new package in the next hours which hopefully also eliminates the problem for now.

  4. #304
    Scavenger
    Join Date
    Jul 2014
    Posts
    57
    Rep Power
    0
    I have a question regarding the new "Map rendering" feature. As I understand it, the map folder should be created automatically and the according map png's are palced into the map folder of the instance while players are running around? ("The map is rendered to image files as people visit the different places. "). Or is the map folder only created with the png's if and when I call the rendermap command?

    I ask because I restarted my instance with the newest script version and the map folder is not being created

  5. #305
    Fun Pimps Staff
    Join Date
    Oct 2013
    Location
    Germany - Darmstadt
    Posts
    2,962
    Rep Power
    1
    Yup, it should create everythig automatically. But I did not yet create an updated scripts bundle, so unless you manually added the DLLs it won't be in there
    Created a new bundle now with the current DLLs.

    If it still does not work check the logs for errors.

  6. #306
    Scavenger
    Join Date
    Jul 2014
    Posts
    57
    Rep Power
    0
    Haha ok will do, I just read the release page which I always have opened and assumed I must have updated it to that version some time =D

    Great Job again in any case

  7. #307
    Refugee Zodiac13's Avatar
    Join Date
    Jul 2014
    Posts
    15
    Rep Power
    0
    A friend of mine is trying to set up 7dtd on a linux based dedicated server and he is having trouble keeping the telnet connection open so that he is able to restart the server without having to resort to using root commands. Any suggestions?

  8. #308
    Fun Pimps Staff
    Join Date
    Oct 2013
    Location
    Germany - Darmstadt
    Posts
    2,962
    Rep Power
    1
    As the Telnet interface is part of the engine you can't "keep it open" during a restart. So for now it really resolves to using a login on the machine and issue the command to (stop & ) start the server. If you want to allow that for non-root you might consider going with a sudoers entry that only allows running "7dtd.sh start" (and optionally "7dtd.sh stop" if you want to shutdown from within the console).

  9. #309
    Scavenger KaXaK's Avatar
    Join Date
    Aug 2014
    Posts
    38
    Rep Power
    0
    Hi,
    I am trying to compile (svn ver.140/visual studio 2012) 7dtd-server-fixes.dll from the server-fixes.sln but it is missing a file named 'src\CustomCommands\EnableRendering.cs'.

    Many thanks for this awesome script. ^^

  10. #310
    Fun Pimps Staff
    Join Date
    Oct 2013
    Location
    Germany - Darmstadt
    Posts
    2,962
    Rep Power
    1
    Oh, yeah, forgot to add that one to versioning when commiting last time Done

  11. #311
    Hunter qriff's Avatar
    Join Date
    Apr 2014
    Location
    Helsinki
    Posts
    125
    Rep Power
    0
    Quote Originally Posted by Alloc View Post
    As you said you could not easily use the telnetCommand function (or any other provided by the scripts) but well, as long as I don't write everything in PHP (which obviously won't happen as that language isn't made for the given tasks ) there's no way around that if you want to use the functions. But you should be able to relatively easily set up a connection to the Telnet port with the PHP sockets stuff.
    So I've been succesfully running PHP scripts in your evented .sh scripts with the #!/usr/bin/php shebang with the assistance of https://github.com/ngharo/Random-PHP...lnet.class.php .

    <basedir>/hooks/playerConnect/ping.sh
    Code:
    #!/usr/bin/php
    <?php
    require_once('class-telnet.php');
    ....
    $telnet = new Telnet('127.0.0.1','8081',10,'');
    $ping = getPing($argv[6]);
    $country = geoip_country_name_by_name($argv[6]);
    $telnet->exec('Welcome, '.$argv[4].'. Your ping is '.$ping.'ms ('.$country.')';
    ?>
    And your done, the same goes for all other hooks like responding to chat /commands and cron for timed server messages.

    (remember cron doesn't unfortunately support incrementals so running something every 43 minutes actually only runs once an hour at 43 minutes past the hour, instead of 0:43, 1:26, 2:09, 2:52, etc... I'm not quite sure why but it sounds so retarded that there has to be a really, really, really absolute reason for it. Marvels of *nix I guess.)

  12. #312
    Fun Pimps Staff
    Join Date
    Oct 2013
    Location
    Germany - Darmstadt
    Posts
    2,962
    Rep Power
    1
    Quote Originally Posted by qriff View Post
    So I've been succesfully running PHP scripts in your evented .sh scripts with the #!/usr/bin/php shebang with the assistance of https://github.com/ngharo/Random-PHP...lnet.class.php .
    That's nice =) Thanks for posting this so others can use it too =)
    But could it be you're missing a "say " in your telnet->exec line?

    Quote Originally Posted by qriff View Post
    (remember cron doesn't unfortunately support incrementals so running something every 43 minutes actually only runs once an hour at 43 minutes past the hour, instead of 0:43, 1:26, 2:09, 2:52, etc... I'm not quite sure why but it sounds so retarded that there has to be a really, really, really absolute reason for it. Marvels of *nix I guess.)
    No way for such value, but you can do things like "every 20 minutes":
    Code:
    */20 * * * * ...
    See here for more details (first answer is a really good one ): Run Cron job every N minutes plus offset

  13. #313
    Hunter qriff's Avatar
    Join Date
    Apr 2014
    Location
    Helsinki
    Posts
    125
    Rep Power
    0
    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.

  14. #314
    Hunter qriff's Avatar
    Join Date
    Apr 2014
    Location
    Helsinki
    Posts
    125
    Rep Power
    0
    Quote Originally Posted by Alloc View Post
    But could it be you're missing a "say " in your telnet->exec line?
    True, poorly redacted code, sorry. Thanks to you we now also have "pm" so it won't flood the chat for other players.

    Quote Originally Posted by Alloc View Post
    No way for such value, but you can do things like "every 20 minutes"
    This is the fundamental windmill I try to fight against =) If you have multiple servers with services that process something every 20 minutes (three times an hours, or less if more often) then it eventually causes waves in all services (simultanious execution). While if they could all randomize the timer with x minutes on every run then it would even out. I believe this will eventually play a notable role with Internet of Things where a huge amount of devices poll and process for stuff all the time (not that it wouldn't happen already).

    I would love to know the answer why it has never been implemented, I can't imagine how hard it could be (I'm not assuming it can't be, just can't imagine why it is).

    - - - Updated - - -

    btw. Any possibility of getting "cm" per user only? (haven't tested yet, sorry) why is it session bound?

  15. #315
    Fun Pimps Staff
    Join Date
    Oct 2013
    Location
    Germany - Darmstadt
    Posts
    2,962
    Rep Power
    1
    But you read the stackoverflow answer?
    You can do stuff like 5-59/20 which would be 5, 25, 45. If you use different starting values for each instance you'll get different times within the hour
    (That way you can even be sure that at no time they overlap whereas with some weird intervals like 43 over the whole day two events could occur at the same time if they reach a common multiple )

    btw. Any possibility of getting "cm" per user only? (haven't tested yet, sorry) why is it session bound?
    Nope, not for the short term. It's the way the engine tells the clients about the server settings.
    Last edited by Alloc; 08-28-2014 at 09:41 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •