Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watchdog #13

Open
Roller29 opened this issue Jul 30, 2014 · 1 comment
Open

Watchdog #13

Roller29 opened this issue Jul 30, 2014 · 1 comment

Comments

@Roller29
Copy link

When running
glbd -c 127.0.0.1:4444 -a --max_conn 20000 -l -w exec:"tcp.sh" 0.0.0.0:25565 ip:1336:5 ip:1337:5

It runs and then gives me a error:
http://pastiebin.com/53d83f3e424b4

Then the next time around it gives me this
http://pastiebin.com/53d83f5bbb14e

It removes the IPs from the Watchdog list completely.

This is what I'm using for the watchdog script:

It's a python script and then a shell script that executes the python script:
http://pastiebin.com/53d83f79b1429

shell script:

python tcp.py $1

I've tested this manually and it works.
root@1:# ./tcp.sh 8.8.8.8:53
3
root@1:
#

root@1:# ./tcp.sh 8.8.8.8:2754
0
root@1:
#

Any idea how to fix this?

@ayurchen
Copy link
Member

On 2014-07-30 03:43, Roller29 wrote:

When running
glbd -c 127.0.0.1:4444 -a --max_conn 20000 -l -w exec:"tcp.sh"
0.0.0.0:25565 ip:1336:5 ip:1337:5

It runs and then gives me a error:
http://pastiebin.com/53d83f3e424b4

Then the next time around it gives me this
http://pastiebin.com/53d83f5bbb14e

It removes the IPs from the Watchdog list completely.

This is what I'm using for the watchdog script:

It's a python script and then a shell script that executes the python
script:
http://pastiebin.com/53d83f79b1429

shell script:

python tcp.py $1

I've tested this manually and it works.
root@1:# ./tcp.sh 8.8.8.8:53
3
root@1:
#

root@1:# ./tcp.sh 8.8.8.8:2754
0
root@1:
#

Any idea how to fix this?

Your script does not loop, it runs only once and exits.

GLB watchdog expects the script to loop reading commands from glbd on
the standard input. In shell terms:

while read cmd
do
case $cmd in
"poll")
;;
*) break
;;
esac
done

This is done

  1. to avoid forking a new process on every poll request
  2. to control how often endpoint polling happens and when the process
    should exit

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants