Author Topic: service wont autostart/autoconnect to ts server  (Read 10515 times)

nmbrg

  • Newbie
  • *
  • Posts: 20
    • View Profile
service wont autostart/autoconnect to ts server
« on: July 30, 2018, 06:07:03 PM »
how can i make the service autostart/autoconnect until it connects?
If my teamspeak server goes down. or if the LAN goes down for a short period of time. The service is stopped and isnt connected to the teamspeak server.
I then have to manually start the service again.

are there any solution to this?

Stefan1200

  • Administrator
  • *****
  • Posts: 2244
    • View Profile
Re: service wont autostart/autoconnect to ts server
« Reply #1 on: July 30, 2018, 06:28:12 PM »
You can set bot_connect_forever to 1.

nmbrg

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: service wont autostart/autoconnect to ts server
« Reply #2 on: July 30, 2018, 07:43:41 PM »
Ok, thanks.
What does that do exactly? And what are the different values i can set it to?
Are there any downsides of using it?

EDIT: nevermind, found a description. :) But it sounds as its just altering the way it tries to connect when the service is running. Doesnt sound like it will autostart the service.
« Last Edit: July 30, 2018, 07:46:20 PM by nmbrg »

Stefan1200

  • Administrator
  • *****
  • Posts: 2244
    • View Profile
Re: service wont autostart/autoconnect to ts server
« Reply #3 on: July 30, 2018, 07:59:33 PM »
But it sounds as its just altering the way it tries to connect when the service is running. Doesnt sound like it will autostart the service.

It just make sure, that the JTS3ServerMod always try to reconnect every 65 seconds.

It has nothing to do with the service. I use an external program to make it possible to setup the JTS3ServerMod as a Windows service, because Java can't do this on its own.

Of course you can create a script, which checks the status of the service and restart, if disabled. But without any logic behind it, my way is more useful, because it use a system friendly delay of 65 seconds.

nmbrg

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: service wont autostart/autoconnect to ts server
« Reply #4 on: July 31, 2018, 10:58:55 AM »
But it sounds as its just altering the way it tries to connect when the service is running. Doesnt sound like it will autostart the service.

It just make sure, that the JTS3ServerMod always try to reconnect every 65 seconds.

It has nothing to do with the service. I use an external program to make it possible to setup the JTS3ServerMod as a Windows service, because Java can't do this on its own.

Of course you can create a script, which checks the status of the service and restart, if disabled. But without any logic behind it, my way is more useful, because it use a system friendly delay of 65 seconds.

Ok, whats that program you're using?

And cant i just edit the properties on the service for recovery to "restart the service" when it fails? or is that a bad idea?

Stefan1200

  • Administrator
  • *****
  • Posts: 2244
    • View Profile
Re: service wont autostart/autoconnect to ts server
« Reply #5 on: July 31, 2018, 11:30:18 AM »
I use procrun, you will find it in the tools directory.

nmbrg

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: service wont autostart/autoconnect to ts server
« Reply #6 on: July 31, 2018, 01:25:00 PM »
oh, ok.
How do i set it up to auto restart the service if it gets stopped?
« Last Edit: July 31, 2018, 01:27:29 PM by nmbrg »

Stefan1200

  • Administrator
  • *****
  • Posts: 2244
    • View Profile
Re: service wont autostart/autoconnect to ts server
« Reply #7 on: July 31, 2018, 02:27:36 PM »
oh, ok.
How do i set it up to auto restart the service if it gets stopped?

I don't know.

What is wrong with my solution?

nmbrg

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: service wont autostart/autoconnect to ts server
« Reply #8 on: July 31, 2018, 02:38:12 PM »
oh, ok.
How do i set it up to auto restart the service if it gets stopped?

I don't know.

What is wrong with my solution?

you dont know?
first you say you use procrun, and when i ask how to set procrun up you dont know?

well i dont know what you mean with your solution..
and i explained a couple of times that when jts3servermod cant connect to the server for some reason (like the server beeing shutdown or restarted) the service stops. And isnt restarted again. So jts3servermod isnt connected to the teamspeakserver until i manually start the service again.

Stefan1200

  • Administrator
  • *****
  • Posts: 2244
    • View Profile
Re: service wont autostart/autoconnect to ts server
« Reply #9 on: July 31, 2018, 03:05:51 PM »
you dont know?
first you say you use procrun, and when i ask how to set procrun up you dont know?

well i dont know what you mean with your solution..
and i explained a couple of times that when jts3servermod cant connect to the server for some reason (like the server beeing shutdown or restarted) the service stops. And isnt restarted again. So jts3servermod isnt connected to the teamspeakserver until i manually start the service again.

Procrun is not created by me, it is a software from the apache community. Running as Windows Service is nothing which Java can do by default. I created a small script, which install the service. I don't know if procrun can do this auto restart stuff. Feel free to read the procrun manual.


well i dont know what you mean with your solution..
and i explained a couple of times that when jts3servermod cant connect to the server for some reason (like the server beeing shutdown or restarted) the service stops. And isnt restarted again. So jts3servermod isnt connected to the teamspeakserver until i manually start the service again.

Please read my answer from yesterday at 18:28 (CEDT). That should solve your issue.