Telnet Support and Sigterm

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
Darelius
Posts: 66
Joined: Wed Apr 09, 2008 2:48 pm

Telnet Support and Sigterm

Post by Darelius »

L2J Revision: 3695M
L2JDP Revision: 3695M

Hello, i have some Questions about the server restart.

Because the server is behind a DSL Routerm, the ip resets all 24 hours, sometimes more often.

Because my Jave and Batch-Skills are not so great, i used a php-script to check, if there is a new ip and replace it in the properties-files.

Then i tried to use the "telnet" option to restart the server so that the server is reachable again, but the telnet restart dont work on loginserver or on the gameserver it gives only error messages.

With a sheduled task this wont work, because the connection reset is not equal every day so i tried the automatic option with php but it failed :(

Is there another option to combine an ip-check with a replacement of ips in properties files and restarting of the server?

It would be a great help for me...


...XD
Darelius, Keeper of the Elements
Image
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Telnet Support and Sigterm

Post by janiii »

never tried it, but was already mentioned some times on forum for dynamic ip: http://www.no-ip.com/
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
Darelius
Posts: 66
Joined: Wed Apr 09, 2008 2:48 pm

Re: Telnet Support and Sigterm

Post by Darelius »

Err, i HAVE already a dynamic IP with a hoster, but i use Selfip.com

And there are no information how to get a "hard" IP on that DAddress..

for Webbrowsing, local Homepage etc there is no problem.

But with Lineage 2 and the IP in the HOST - File it dont work.


...DX
Darelius, Keeper of the Elements
Image
User avatar
Darelius
Posts: 66
Joined: Wed Apr 09, 2008 2:48 pm

Re: Telnet Support and Sigterm

Post by Darelius »

Hmm, problem:

Sometimes the telnet sigterm is accepted and sometimes NOT and when not it makes a java error!

I have no idea, what there is wrong. After make the "sleep();" - entry in the php-skriit, the problem still exists, i can only send a restart command to one of the server (login OR game server), the other ignores the command or made an error, sometimes nothing, absolutely nothing...

THAT ist funny...

anybody any idea?

Code: Select all

              // Logonserver Restart                 $usetelnetlog = fsockopen($log_host, $log_port, $errno, $errstr, 5);                 if($usetelnetlog)                 {                         $give_string = 'restart' ;                         fputs($usetelnetlog, $log_password);                         fputs($usetelnetlog, "\r\n");                         fputs($usetelnetlog, $give_string);                         fputs($usetelnetlog, "\r\n");                         fclose($usetelnetlog);                         echo "Restart 1: Restart Login Server...".$t;                }                else                {                        echo "Restart 1: <b>ERROR</b> Couldn't connect to telnet to restart Loginserver".$t;                }              //GameServer Restart                flush();                sleep (5);                $usetelnetgs = fsockopen($gs_host, $gs_port, $errno, $errstr,5);                if($usetelnetgs)                {                    $give_string = 'restart 5';                    fputs($usetelnetgs, $gs_password);                    fputs($usetelnetgs, "\r\n");                    fputs($usetelnetgs, $give_string);                    fputs($usetelnetgs, "\r\n");                    fputs($usetelnetgs, "exit\r\n");                    fclose($usetelnetgs);                    echo "Restart 2: Restart Gameserver...".$t;                 }                 else                 {                        echo "Restart 2: <b>ERROR</b> Couldn't connect to telnet to restart Gameserver".$t;                 } 
Tha main part of the php-file...

anyone a hint, clue, idea or something?


...DX
Darelius, Keeper of the Elements
Image
Post Reply