Hello,
I got a big trouble at my hands and i have been looking for the problem for days now and don't know where to look next.
Nothing is reported the amx logs, neither hlds debug logs. I have checked the kernel, system logs and nothing there either.
The hlds process just freezes and gets timeout, not crashing just frozen at the state when connecting to the hltv. I have found that it is happening when connecting to the hltv to execute the command.
I have tried to disable iptabels (firewall) on all the servers to make sure that it is not the problem without luck.
It is not always happening, it happens for lets say 1 of 30 times but is getting really annoying to manually restart servers every hour.
Here is the code for the hltv function.
PHP Code:
public hltv_reset()
{
new socket = 0;
new error;
new rconid[13];
new rcv[256];
new snd[256];
new rconPass[32];
// Connect to server
socket = socket_open(HLTV, hltv_port, SOCKET_UDP, error);
if (error != 0)
{
server_print("[%s]%s HLTV Record :: Connection to HLTV %s:%s failed. Error: %s",log_time(), SERVER_PREFIX, HLTV, hltv_port, error);
} else {
//send challenge rcon and receive response
setc(snd,4,0xff);
copy(snd[4],255,"challenge rcon");
setc(snd[18],1,'^n');
socket_send(socket,snd,255);
socket_recv(socket,rcv,255);
// get rcon challenge number from response
copy(rconid,12,rcv[19]);
replace(rconid,255,"^n","");
rconPass = "xxxxxxxxx";
// set rcon command
setc(snd,255,0x00);
setc(snd,4,0xff);
format(snd[4],255,"rcon %s %s stoprecording",rconid,rconPass);
// send rcon command and close socket
socket_send(socket,snd,255);
socket_close(socket);
server_print("[%s]%s HLTV Record :: Automatic recording now ending %s:%d.",log_time(), SERVER_PREFIX, HLTV, hltv_port);
}
}
Thanks guys!