Dies ist eine mobil optimierte Seite, die schnell lädt. Wenn Sie die Seite ohne Optimierung laden möchten, dann klicken Sie auf diesen Text.

CCCAM Web Interface hängt sich auf

    Nobody is reading this thread right now.

Eisi2003

Freak
Premium
Registriert
26. Dezember 2008
Beiträge
236
Reaktionspunkte
72
Punkte
88
Hallo,
ich habe das Problem, dass das Web Interface nach einiger Zeit nicht mehr verfügbar ist. CCCAM läuft weiterhin. Nur das Web Interface ist nicht mehr erreichbar. Das Problem tritt ca. nach 10 bis 20 Minuten Laufzeit auf. Wenn ich dann CCCAM neu starte funktioniert wieder alles einwandfrei. Kennt jemand von Euch dieses Problem?

Version ist 2.3.0

Danke
Eisi
 
Ja, ist bekannt ...
 
Gibt es eine Lösung oder einen Thread, der das Problem beschreibt?
 
Nö ... ausser ein WatchDog der auch das WebInfo der CCcam mit überwachst.
 
Ich habe bereits einen WatchDog, der das Webinterface überwacht. Das Problem ist dann halt nur, dass CCCAM alle 10 Minuten neu gestartet wird. Das nervt etwas und ist eigentlich unnötig.
 
Anders geht es aber nicht.
Welches Image haste denn, CCcam Version und wie sieht das Script denn aus?
 
Es ist ein IPC-System. Das Standard-Script habe ich abgeändert.

#!/bin/bash
# IPC - CCcam-Watchdog
#

. /var/emu/script/functions.sh
readipccfg

[ -z $CCNAME ] && clear && echo -e "\033[1;31mVariablen Konfigurationsfehler!\033[0m" && exit 1
[ -z $CCVERSION ] && clear && echo -e "\033[1;31mVariablen Konfigurationsfehler!\033[0m" && exit 1
[ -z "$TIMESTAMP2" ] && clear && echo -e "\033[1;31mVariablen Konfigurationsfehler!\033[0m" && exit 1
[ -z $CAMLOGS ] && clear && echo -e "\033[1;31mVariablen Konfigurationsfehler!\033[0m" && exit 1
[ -z $CRASHMAIL ] && clear && echo -e "\033[1;31mVariablen Konfigurationsfehler!\033[0m" && exit 1

SUBJECT="$CCNAME Watchdog !"
MESSAGE1="$CCNAME wurde auf `hostname -f` vom Watchdog Überwachungsscript neu gestartet."
MESSAGE2="$CCNAME ist auf `hostname -f` mehrfach gestartet, Konfiguration scheint fehlerhaft zu sein!"
MESSAGE3="Web-Interface funktioniert nicht!"

#CCcam gestart ?
PID="$(pgrep -x $CCVERSION)"
if [[ ! -z $PID ]] ; then
echo "$TIMESTAMP2 Watchdog - CCcam Server läuft. Alles Ok!" >> $CAMLOGS/CCcam-watchdog.log

if wget -T 10 -t 5
then
rm index.html
echo "$TIMESTAMP2 Watchdog - CCcam Web If läuft. Alles Ok!" >> $CAMLOGS/CCcam-watchdog.log
else
cccam stop
sleep 1
cccam start
echo "$TIMESTAMP2 Watchdog - CCcam wurde neu gestartet, da das Web If nicht funktioniert" >> $CAMLOGS/CCcam-watchdog.log
#readipccfg
[ $CRASHMAIL == 1 ] && mailsend "$SUBJECT" "$MESSAGE3"
fi
else
cccam stop
sleep 1
cccam start
echo "$TIMESTAMP2 Watchdog - CCcam wurde neu gestartet" >> $CAMLOGS/CCcam-watchdog.log
#readipccfg
[ $CRASHMAIL == 1 ] && mailsend "$SUBJECT" "$MESSAGE1"
fi

#CCcam mehrfach gestartet ?
ANZAHL="$(pgrep -c $CCVERSION)"
if [ $ANZAHL -gt 1 ] ; then
cccam stop
sleep 1
cccam start
[ $CRASHMAIL == 1 ] && mailsend "$SUBJECT" "$MESSAGE2"
fi
/etc/init.d/cron start > /dev/null
exit 0
 
Welche CCcam Version denn?
 
Mach mal 2.2.1 drauf, weil die verarbeitet die CryptoWorks Karten anders (Ident wird angezeigt).
 
Ich konnte das Problem dauerhaft lösen. Ursache war InfoPHP, bzw. der Cron-Job, der InfoPHP im Hintergrund 1x pro Minute aktualisiert. Ich habe die update.php so abgeändert, dass die Entitlements Seite nicht aktualisiert wird. Das Problem mit dem WebIf ist damit behoben. D.h. das Web Interface von CCCAM hängt sich nur wegen der Entitlements Seite auf. Alle anderen Seiten haben kein Problem mit InfoPHP. Ich vermute auch nicht, dass es sich um ein Problem mit InfoPHP handelt. Es ist eher ein Problem von CCCAM beim Abfragen der Kartendaten (über die Entitlements Seite).

cron_update.php:
<?php
$cron_p= ""; if(isset($_GET['p'])) $cron_p = $_GET['p'];
$cron_profil = (int)(trim($cron_p));
$cron_update = true;
include "common.php";

$forceupdate = 1;
include "update2.php";

?>

update2.php
<?php

function checkUpdateFile($filename_update)
{
global $server_offline;
global $update_failed;
global $downloadfacut;

if (!file_exists($filename_update))
{
$server_offline = true;
global $cccam_host;
global $webinfo_port;
$update_failed = "<FONT COLOR=red><B>Update failed : </B></FONT>Unable to connect to $cccam_host:$webinfo_port";
}
else
{
$filename_update_data = file ($filename_update);
if (count($filename_update_data)<1)
{
$server_offline = true;
$update_failed = "<FONT COLOR=red><B>Update failed : </B></FONT>no data";
}
else
{
$linie = $filename_update_data[0];

if (!strstr($linie,"200 OK"))
{
$server_offline = true;
$update_failed = "<FONT COLOR=red><B>Update failed : </B></FONT>".$linie;
}
}
}


if ($server_offline == false)
{
$downloadfacut = true;
stripdata($filename_update);
}
else
if (file_exists($filename_update))
unlink($filename_update);
}

function CopyUpdate($filename_source,$filename_dest)
{
if (!file_exists($filename_source))
return;

if (file_exists($filename_dest)) {unlink($filename_dest);}

copy($filename_source, $filename_dest) ;
}


$update_failed = "";
//---------------------------------------
if ($cccam_host == "")
{
$skipUpdate = true;
$server_offline = true;
$update_failed = "<FONT COLOR=red><B>Update failed : </B></FONT>Server not defined in config.php !";

}

$TIMP_Update = "";

if (!$skipUpdate)
{
$timp1 = timpexec();

$updatelog_text = time();

if (file_exists($caminfo_update)) {unlink($caminfo_update);}
if (file_exists($servers_update)) {unlink($servers_update);}
if (file_exists($shares_update)) {unlink($shares_update);}
if (file_exists($clients_update)) {unlink($clients_update);}
if (file_exists($activeclients_update)) {unlink($activeclients_update);}
//if (file_exists($entitlements_update)) {unlink($entitlements_update);}


$downloadfacut = false;

if (!(file_exists($caminfo_file)) || $forceupdate ||$update_info)
{
$ttt1 = timpexec();
filesuck($cccam_host, $webinfo_port, $webinfo_user, $webinfo_pass, "/", $caminfo_update);
checkUpdateFile($caminfo_update);
$ttt2 = timpexec();
$difff = number_format(((substr($ttt2,0,9)) + (substr($ttt2,-10)) - (substr($ttt1,0,9)) - (substr($ttt1,-10))),4);
if ($downloadfacut == false) $difff = "error";
$updatelog_text = $updatelog_text."\nInfo : ".$difff." ms";
}

if (!(file_exists($clients_file)) || $forceupdate ||$update_clients)
if ($server_offline == false)
{
$ttt1 = timpexec();
filesuck($cccam_host, $webinfo_port, $webinfo_user, $webinfo_pass, "/clients", $clients_update);
checkUpdateFile($clients_update);
$ttt2 = timpexec();
$difff = number_format(((substr($ttt2,0,9)) + (substr($ttt2,-10)) - (substr($ttt1,0,9)) - (substr($ttt1,-10))),4);
if ($downloadfacut == false) $difff = "error";
$updatelog_text = $updatelog_text."\nClients : ".$difff." ms";

if ($downloadfacut == true)
saveUsageData(file($clients_update));
}

if (!(file_exists($servers_file)) || $forceupdate ||$update_servers)
if ($server_offline == false)
{
$ttt1 = timpexec();
filesuck($cccam_host, $webinfo_port, $webinfo_user, $webinfo_pass, "/servers", $servers_update);
checkUpdateFile($servers_update);
$ttt2 = timpexec();
$difff = number_format(((substr($ttt2,0,9)) + (substr($ttt2,-10)) - (substr($ttt1,0,9)) - (substr($ttt1,-10))),4);
if ($downloadfacut == false) $difff = "error";
$updatelog_text = $updatelog_text."\nServers : ".$difff." ms";

if ($downloadfacut == true)
saveOnlineData(file($servers_update));
}

if (!(file_exists($activeclients_file)) || $forceupdate ||$update_activeclients)
if ($server_offline == false)
{
$ttt1 = timpexec();
filesuck($cccam_host, $webinfo_port, $webinfo_user, $webinfo_pass, "/activeclients", $activeclients_update);
checkUpdateFile($activeclients_update);
$ttt2 = timpexec();
$difff = number_format(((substr($ttt2,0,9)) + (substr($ttt2,-10)) - (substr($ttt1,0,9)) - (substr($ttt1,-10))),4);
if ($downloadfacut == false) $difff = "error";

$updatelog_text = $updatelog_text."\nActiveclients : ".$difff." ms";
}

//if (!(file_exists($entitlements_file)) || $forceupdate ||$update_entitlements)
//if ($server_offline == false)
//{
// $ttt1 = timpexec();
// filesuck($cccam_host, $webinfo_port, $webinfo_user, $webinfo_pass, "/entitlements", $entitlements_update);
// checkUpdateFile($entitlements_update);
// $ttt2 = timpexec();
// $difff = number_format(((substr($ttt2,0,9)) + (substr($ttt2,-10)) - (substr($ttt1,0,9)) - (substr($ttt1,-10))),4);
// if ($downloadfacut == false) $difff = "error";
//
// $updatelog_text = $updatelog_text."\nEntitlements : ".$difff." ms";
//}


if (!(file_exists($shares_file)) || $forceupdate ||$update_shares)
if ($server_offline == false)
{
$ttt1 = timpexec();
filesuck($cccam_host, $webinfo_port, $webinfo_user, $webinfo_pass, "/shares", $shares_update);
checkUpdateFile($shares_update);
$ttt2 = timpexec();
$difff = number_format(((substr($ttt2,0,9)) + (substr($ttt2,-10)) - (substr($ttt1,0,9)) - (substr($ttt1,-10))),4);
if ($downloadfacut == false) $difff = "error";

$updatelog_text = $updatelog_text."\nShares : ".$difff." ms";
}


if ($downloadfacut == true)
{
CopyUpdate($caminfo_update,$caminfo_file);
CopyUpdate($servers_update,$servers_file);
CopyUpdate($shares_update,$shares_file);
CopyUpdate($clients_update,$clients_file);
CopyUpdate($activeclients_update,$activeclients_file);
//CopyUpdate($entitlements_update,$entitlements_file);

UpdateClientsCountryIP();
UpdateServersCountryIP();
UpdateServersECM();

$timp2 = timpexec();

$diferentaTIMP1 = number_format(((substr($timp2,0,9)) + (substr($timp2,-10)) - (substr($timp1,0,9)) - (substr($timp1,-10))),4);
$TIMP_Update = "Update time: ".$diferentaTIMP1."s";

$updatelog_text = $updatelog_text."\nTOTAL : ".$diferentaTIMP1." ms";

$fp = @fopen($update_log,"w");
fwrite($fp, $updatelog_text);
fclose($fp);
}


}
if ($TIMP_Update == "" && $timp_lastupdate!="")
$TIMP_Update = " Updated ".get_formatted_timediff($timp_lastupdate)." ago";

$skipUpdate = true;

?>
 
Für die Nutzung dieser Website sind Cookies erforderlich. Du musst diese akzeptieren, um die Website weiter nutzen zu können. Erfahre mehr…