[OpenSIPS-Users] Could not start cdrtool 9.5.0

Aqs Younas aqsyounas at gmail.com
Thu Jul 6 17:21:44 EDT 2017


Good Day.

I am trying to start cdrtool 9.5.0 after installation on Debian Jessie 8.3
having php 5.6.24 but it is failing with below errors.

root at debian:~# /etc/init.d/cdrtool start
[....] Starting cdrtool (via systemctl): cdrtool.serviceJun  5 02:47:30
debian ratingEngine.php[13021]: <?
Jun  5 02:47:30 debian ratingEngine.php[13021]: set_time_limit (0);
Jun  5 02:47:30 debian ratingEngine.php[13021]:
ini_set('mbstring.func_overload', '0');
Jun  5 02:47:30 debian ratingEngine.php[13021]: ini_set('output_handler',
'');
Jun  5 02:47:30 debian ratingEngine.php[13021]: @ob_end_flush();
Jun  5 02:47:30 debian ratingEngine.php[13021]:
require('/etc/cdrtool/global.inc');
Jun  5 02:47:30 debian ratingEngine.php[13021]: require('cdr_generic.php');
Jun  5 02:47:30 debian ratingEngine.php[13021]: require('rating.php');
Jun  5 02:47:30 debian ratingEngine.php[13021]:
require('rating_server.php');
Jun  5 02:47:30 debian ratingEngine.php[13021]: // Init Rating Engine
Jun  5 02:47:30 debian ratingEngine.php[13021]: syslog(LOG_NOTICE,"Starting
CDRTool Rating Engine...");
Jun  5 02:47:30 debian ratingEngine.php[13021]: $RatingEngineServer = new
RatingEngine();
Jun  5 02:47:30 debian ratingEngine.php[13021]: if
(!$RatingEngineServer->init_ok) {
Jun  5 02:47:30 debian ratingEngine.php[13021]: syslog(LOG_NOTICE,'Error:
Cannot start Rating Engine, fix the errors and try again');
Jun  5 02:47:30 debian ratingEngine.php[13021]: exit;
Jun  5 02:47:30 debian ratingEngine.php[13021]: }
Jun  5 02:47:30 debian ratingEngine.php[13021]: syslog(LOG_NOTICE,"Rating
Engine started sucesfully, going to background...");
Jun  5 02:47:30 debian ratingEngine.php[13021]: // Go to the background
Jun  5 02:47:30 debian ratingEngine.php[13021]: $d = new
Daemon('/var/run/ratingEngine.pid');
Jun  5 02:47:30 debian ratingEngine.php[13021]: $d->start();
Jun  5 02:47:30 debian ratingEngine.php[13021]: $daemon = new
socketDaemon();
Jun  5 02:47:30 debian ratingEngine.php[13021]: $server =
$daemon->create_server('ratingEngineServer', 'ratingEngineClient',
$RatingEngine['socketIP'], $RatingEngine['socketPort']);
Jun  5 02:47:30 debian ratingEngine.php[13021]: syslog(LOG_NOTICE,"Rating
Engine is now ready to serve network requests");
Jun  5 02:47:30 debian ratingEngine.php[13021]: $daemon->process();
Jun  5 02:47:30 debian ratingEngine.php[13021]: ?>
Job for cdrtool.service failed. See 'systemctl status cdrtool.service' and
'journalctl -xn' for details.
Jun  5 02:47:30 debian systemd[1]: Failed to start CDR mediation and rating
engine for Call Details Records..
Jun  5 02:47:30 debian systemd[1]: Unit cdrtool.service entered failed
state.
 failed!
Jun  5 02:47:31 debian systemd[1]: Failed to start CDR mediation and rating
engine for Call Details Records..
Jun  5 02:47:31 debian systemd[1]: Unit cdrtool.service entered failed
state.
Jun  5 02:47:31 debian systemd[1]: cdrtool.service start request repeated
too quickly, refusing to start.
Jun  5 02:47:31 debian systemd[1]: Failed to start CDR mediation and rating
engine for Call Details Records..
Jun  5 02:47:31 debian systemd[1]: Unit cdrtool.service entered failed
state.


Even by manually running*
/var/www/CDRTool/scripts/importRatingTables.php *script
is printing its contents on console.

root at debian:~# php /var/www/CDRTool/scripts/importRatingTables.php
<?
require("/etc/cdrtool/global.inc");
require('cdr_generic.php');
require("rating.php");

set_time_limit(0);

$lockFile=sprintf("/var/lock/CDRTool_import_rates.lock");
$abort_text="Another import operation is in progress. Try again later.\n";

$f=fopen($lockFile,"w");
if (flock($f, LOCK_EX + LOCK_NB, $w)) {
    if ($w) {
        print $abort_text;
        syslog(LOG_NOTICE,$abort_text);
        exit(2);
    }
} else {
    print $abort_text;
    syslog(LOG_NOTICE,$abort_text);
    exit(1);
}

$RatingTables= new RatingTables();
$RatingTables->ImportCSVFiles();

if ($RatingTables->mustReload) {

    if (!reloadRatingEngineTables()) {
        print "Error: cannot connect to network rating engine\n";
    }
}

?>


root at debian:~# php -v
PHP 5.6.24-0+deb8u1 (cli) (built: Jul 26 2016 08:17:07)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend
Technologies

root at debian:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.3 (jessie)
Release:        8.3
Codename:       jessie


Any pointer would be much appreciated.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170707/be0bb872/attachment.html>


More information about the Users mailing list