[OpenSIPS-Users] Could not start cdrtool 9.5.0

Aqs Younas aqsyounas at gmail.com
Fri Jul 7 05:22:09 EDT 2017


Thanks for reply, David.

I think you might missed the part of log.


*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.*

Well by manually running the Cdrtool it is failing too.

root at debian:/var/www/CDRTool/scripts# *php ratingEngine.php*
<?
set_time_limit (0);
ini_set('mbstring.func_overload', '0');
ini_set('output_handler', '');
@ob_end_flush();

require('/etc/cdrtool/global.inc');
require('cdr_generic.php');
require('rating.php');
require('rating_server.php');

// Init Rating Engine
syslog(LOG_NOTICE,"Starting CDRTool Rating Engine...");

$RatingEngineServer = new RatingEngine();

if (!$RatingEngineServer->init_ok) {
    syslog(LOG_NOTICE,'Error: Cannot start Rating Engine, fix the errors
and try again');
    exit;
}

syslog(LOG_NOTICE,"Rating Engine started sucesfully, going to
background...");

// Go to the background
$d = new Daemon('/var/run/ratingEngine.pid');
$d->start();

$daemon = new socketDaemon();
$server = $daemon->create_server('ratingEngineServer',
'ratingEngineClient', $RatingEngine['socketIP'],
$RatingEngine['socketPort']);

syslog(LOG_NOTICE,"Rating Engine is now ready to serve network requests");

$daemon->process();

?>

*It is simply printing the contents of script. *

I think it is due to php version compatibility issue. It is having
compatible issues with php 5.6 even though release announcements proclaimed
this.

Any pointer?
Best Regards.

On 7 July 2017 at 05:10, David Villasmil <david.villasmil.work at gmail.com>
wrote:

> I didn't see any errors, in fact it says the engine is ready... Seems to
> me like a startup script problem, the startup has changed in debian, maybe
> cdrtool hasn't been updated? Have you tried starting it up manually instead
> of using the startup script?
> On Thu, Jul 6, 2017 at 11:25 PM Aqs Younas <aqsyounas at gmail.com> wrote:
>
>> 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
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170707/51ea6c7c/attachment.html>


More information about the Users mailing list