Go Back   FlashFXP Forums > > > >

! Other Scripts Support Support for all other scripts...

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-14-2006, 10:00 PM   #1
eger
Member
FlashFXP Beta Tester
ioFTPD Foundation User
 
Join Date: Mar 2003
Posts: 40
Default SiteKill.exe returning error in log

Using SiteKill.exe by FTPServertools and it works well for killing idlers. But it keeps returning an error in my log every minute

Code:
Scheduler event 'KillIdlers' returned error.
Here is how I am running it:

Code:
KillIdlers = * * * * EXEC ..\scripts\SiteKill.exe silent user!=sitebot "idletime>600"
Any idea why it returns an error? It seems to be working fine. Kills all users after 600 seconds idle. But doesn't ever kill sitebot.
eger is offline   Reply With Quote
Old 02-15-2006, 03:55 AM   #2
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

Are you running io as service??
Which sitekill version do you run? Be aware not to run sitekill4x since that is for a way older version of ioftpd.
FTPServerTools is offline   Reply With Quote
Old 02-15-2006, 12:25 PM   #3
eger
Member
FlashFXP Beta Tester
ioFTPD Foundation User
 
Join Date: Mar 2003
Posts: 40
Default

I am not running io as a service. I am using the sitekill5x from your site.

Should I be running io as a service? I couldn't get AlcoBot to work with io as a service.
eger is offline   Reply With Quote
Old 02-15-2006, 01:23 PM   #4
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

No not as service. A service can cause some scripts not to behave properly.
If you have read the text file that came with SiteKill you would have seen the following line in there:
Do me a favor and show me the reply in the log, I am wondering what is going wrong.
You might try with the silent parameter removed.. Although last time I tested it was needed.
The silent mode causes no output to be given which is what you would need if you run it io as service or if you use it in the scheduler. I'll see if I can do some testing..
Now if it returns an error then the response from the io log would be correct. So you should try to run
..\scripts\SiteKill.exe user!=sitebot "idletime>600" from a cmd box.
And tell me what it gives as reply.
FTPServerTools is offline   Reply With Quote
Old 05-12-2006, 09:49 PM   #5
eger
Member
FlashFXP Beta Tester
ioFTPD Foundation User
 
Join Date: Mar 2003
Posts: 40
Default

Wondering if you tested this at all?

Here is some more info I discovered. When ALL of the users from the cmd line are logged in when the SiteKill.exe runs, I don't get the error.

However I DO get the error when I run it like this
Code:
..\scripts\SiteKill.exe silent "idletime>600" user!=sitebot user!=eger user!=iogui
and say, only 1 or 2 of these users are logged in. I am going to try without the silent param and see if the error happens again.
eger is offline   Reply With Quote
Old 05-13-2006, 12:59 PM   #6
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

Of course I test my own tools. And sort of every question has at least past on efnet in the ioftpd channel. I can check the source code if I havent forgotten a return code. Because the only reason for such an error is a return cod ethat messages the thing is bad. This can occur if sitekill can not communicate with ioftp (e.g. you patched it) or if you run multiple ioftpd's (i.e. it can only communicate with one). The nuisance is that a windows thing can occur that makes it hard to run (e.g. a bad commandline, insufficient stack space, ...) I have not tested every possible error that can occur. If an error occurs it will always exit with an error code so that you can see somethign is going wrong. That can occur if shell32.dll can not be found, if CreateEvent with ioftd doesnt get a legit event number (ioftpd is reacting strange..), ioftpd window can not be found, any of the shared memory allocation routines can not be found (bad windows shell32.dll version), shared memory can not be allocated, shared mem can not be locked, shared mem is not recognized by ioftpd, ioftpd did not deliver ONLINEDATA structure or did not deliver it within the timeout period. For the rest the override mode always returns a success (so that a command can be overruled). The silent mode causes simply no output to be given. YOu better run sitekill fomr a cmd line (with debug mode on and silent mode off) so that I can at least see what is going on. O yes and tell me which io version you use.
FTPServerTools is offline   Reply With Quote
Old 05-13-2006, 10:33 PM   #7
eger
Member
FlashFXP Beta Tester
ioFTPD Foundation User
 
Join Date: Mar 2003
Posts: 40
Default

Whew, a lot of that is way over my head. It's great to know you are on top of your scripts though. Here is some debug output I ran and captured at a time it kicked a user:
Code:
C:\ioFTPD\system>..\scripts\SiteKill.exe debug user!=sitebot "idletime>600"
cnr=0 cid=0 uid=139 gid=0 Username=iogui Groupname=SiTEOPS
CompareString:user!=sitebot result:0
TimesToKill=-1 compare:user!=sitebot ArgumentResult=EQ, TotalResult=1
CompareNumber:idletime>600 result:1
TimesToKill=-1 compare:idletime>600 ArgumentResult=NEQ, TotalResult=1
Final compare result of all arguments NEQ
cnr=1 cid=1 uid=111 gid=0 Username=sitebot Groupname=SiTEOPS
CompareString:user!=sitebot result:1
TimesToKill=-1 compare:user!=sitebot ArgumentResult=NEQ, TotalResult=1
Final compare result of all arguments NEQ
cnr=2 cid=3 uid=104 gid=2 Username=user1 Groupname=group1
CompareString:user!=sitebot result:0
TimesToKill=-1 compare:user!=sitebot ArgumentResult=EQ, TotalResult=1
CompareNumber:idletime>600 result:12
TimesToKill=-1 compare:idletime>600 ArgumentResult=NEQ, TotalResult=1
Final compare result of all arguments NEQ
cnr=3 cid=4 uid=106 gid=2 Username=user2 Groupname=group1
CompareString:user!=sitebot result:0
TimesToKill=-1 compare:user!=sitebot ArgumentResult=EQ, TotalResult=1
CompareNumber:idletime>600 result:21
TimesToKill=-1 compare:idletime>600 ArgumentResult=NEQ, TotalResult=1
Final compare result of all arguments NEQ
cnr=4 cid=5 uid=108 gid=2 Username=user3 Groupname=group1
CompareString:user!=sitebot result:0
TimesToKill=-1 compare:user!=sitebot ArgumentResult=EQ, TotalResult=1
TimesToKill=-1 compare:idletime>600 ArgumentResult=NEQ, TotalResult=1
Final compare result of all arguments NEQ
cnr=5 cid=8 uid=126 gid=3 Username=user4 Groupname=group2
CompareString:user!=sitebot result:0
TimesToKill=-1 compare:user!=sitebot ArgumentResult=EQ, TotalResult=1
CompareNumber:idletime>600 result:4294967
TimesToKill=-1 compare:idletime>600 ArgumentResult=EQ, TotalResult=1
Final compare result of all arguments EQ
Kicked: user4 *@72.20.3.58
cnr=6 cid=9 uid=106 gid=2 Username=user2 Groupname=group1
CompareString:user!=sitebot result:0
TimesToKill=-2 compare:user!=sitebot ArgumentResult=EQ, TotalResult=1
CompareNumber:idletime>600 result:18
TimesToKill=-2 compare:idletime>600 ArgumentResult=NEQ, TotalResult=1
Final compare result of all arguments NEQ
cnr=7 cid=10 uid=104 gid=2 Username=user1 Groupname=group1
CompareString:user!=sitebot result:0
TimesToKill=-2 compare:user!=sitebot ArgumentResult=EQ, TotalResult=1
CompareNumber:idletime>600 result:0
TimesToKill=-2 compare:idletime>600 ArgumentResult=NEQ, TotalResult=1
Final compare result of all arguments NEQ
cnr=8 cid=12 uid=103 gid=0 Username=eger Groupname=SiTEOPS
CompareString:user!=sitebot result:0
TimesToKill=-2 compare:user!=sitebot ArgumentResult=EQ, TotalResult=1
CompareNumber:idletime>600 result:137
TimesToKill=-2 compare:idletime>600 ArgumentResult=NEQ, TotalResult=1
Final compare result of all arguments NEQ
cnr=9 cid=13 uid=103 gid=0 Username=eger Groupname=SiTEOPS
CompareString:user!=sitebot result:0
TimesToKill=-2 compare:user!=sitebot ArgumentResult=EQ, TotalResult=1
CompareNumber:idletime>600 result:43
TimesToKill=-2 compare:idletime>600 ArgumentResult=NEQ, TotalResult=1
Final compare result of all arguments NEQ
cnr=10 cid=15 uid=104 gid=2 Username=user1 Groupname=group1
CompareString:user!=sitebot result:0
TimesToKill=-2 compare:user!=sitebot ArgumentResult=EQ, TotalResult=1
CompareNumber:idletime>600 result:23
TimesToKill=-2 compare:idletime>600 ArgumentResult=NEQ, TotalResult=1
Final compare result of all arguments NEQ
cnr=11 cid=18 uid=109 gid=2 Username=user5 Groupname=group1
CompareString:user!=sitebot result:0
TimesToKill=-2 compare:user!=sitebot ArgumentResult=EQ, TotalResult=1
CompareNumber:idletime>600 result:4
TimesToKill=-2 compare:idletime>600 ArgumentResult=NEQ, TotalResult=1
Final compare result of all arguments NEQ
cnr=12 cid=23 uid=109 gid=2 Username=user5 Groupname=group1
CompareString:user!=sitebot result:0
TimesToKill=-2 compare:user!=sitebot ArgumentResult=EQ, TotalResult=1
CompareNumber:idletime>600 result:4
TimesToKill=-2 compare:idletime>600 ArgumentResult=NEQ, TotalResult=1
Final compare result of all arguments NEQ
Totally 1 connections kicked, due to:user!=sitebot idletime>600
2 things I noticed in this debug output. The first being that the error is only logged from the schedular when SiteKill kicks someone for being idle. However they may not have actually been idle which brings up the second thing I noticed.

When the user here was kicked you can see the result (the time which sitekill thought they were idle?) was 4294967 which is actually incorrect. When running the cmd from cmd line over and over it will eventually kick a person even when none were close to 600 seconds idle. This is probably due to me just running it many times back to back (a shared memory reading problem?).

But what I did was set the timer low and then log in a user i created and let it idle. After the schedular ran the cmd and the user was killed I checked the error log. Sure enough there was a Schedular error for that same time as when the user was kicked.

The user names have been munged from that debug output and the current io version I am running is 5.8.5r. I also had the same issue on 5.9.7r.

I understand this would be nice to have an error free script. However it's probably not worth your time as the sitekill.exe IS working fine and is kicking the users as it should. The schedular just thinks it is returning an error for some reason when it kicks i guess...
eger is offline   Reply With Quote
Old 05-14-2006, 02:58 PM   #8
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

Hmm I thought I had handled the proper return code. Namely 0. Anyway you can force the return of 0 (thus the scheduler always succeeds) by adding the 'override' in the scheduler commandline.
I do need to check the TimesToKill=some negative number tho, I dont recall it giving a negative number back.
Anyway let me know if that works for you.
FTPServerTools is offline   Reply With Quote
Reply

Tags
error, killidlers, log, returning, sitekill.exe

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:42 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)