cgr-console status error

369 views
Skip to first unread message

malvern chamisa

unread,
May 7, 2017, 8:03:39 AM5/7/17
to CGRateS
Hie Need a fix am new to CGRateS have completed my installation but when i start CGRateS and use console status i get below

root@cgrates:/etc/cgrates# cgr-console status
  -rpc_encoding string
        RPC encoding used <gob|json> (default "json")
  -server string
        server address host:port (default "127.0.0.1:2012")
  -verbose
        Show extra info about command execution.
  -version
        Prints the application version.
2017/05/07 06:55:18 Could not connect to server 127.0.0.1:2012

and if i run systemctl i get below
root@cgrates:/etc/cgrates# systemctl status cgrates
● cgrates.service - LSB: CGRateS real-time charging system
   Loaded: loaded (/etc/init.d/cgrates)
   Active: active (exited) since Sun 2017-05-07 06:53:42 CDT; 3s ago
  Process: 2375 ExecStop=/etc/init.d/cgrates stop (code=exited, status=0/SUCCESS)
  Process: 2389 ExecStart=/etc/init.d/cgrates start (code=exited, status=0/SUCCESS)

May 07 06:53:42 cgrates CGRateS[2396]: Caching all derived chargers
May 07 06:53:42 cgrates CGRateS[2396]: Caching all actions
May 07 06:53:42 cgrates CGRateS[2396]: Caching all shared groups
May 07 06:53:42 cgrates CGRateS[2396]: Caching load history
May 07 06:53:42 cgrates CGRateS[2396]: Finished load history caching.
May 07 06:53:42 cgrates CGRateS[2396]: Caching all aliases
May 07 06:53:42 cgrates CGRateS[2396]: Caching load history
May 07 06:53:42 cgrates CGRateS[2396]: Finished load history caching.
May 07 06:53:42 cgrates CGRateS[2396]: Registering CDRS HTTP Handlers.
May 07 06:53:42 cgrates CGRateS[2396]: Registering CDRS RPC service.

DanB

unread,
May 7, 2017, 9:50:38 AM5/7/17
to cgr...@googlegroups.com
Hi Malvern,

Try starting cgrates manually by calling directly cgr-engine binary
(just that, no arguments) and see if you get any issue in console. Also
check syslog. Once the engine is up, try cgr-console again since there
are chances you are facing some permission issues.

DanB

malvern chamisa

unread,
May 8, 2017, 2:06:07 AM5/8/17
to CGRateS
when i try foreground running i get no output


root@cgrates:/home/africom# cgr-engine -config_dir=/usr/share/cgrates/tutorials/kamevapi/cgrates/etc/cgrates/cgrates.cfg





^Z
[1]+  Stopped                 cgr-engine -config_dir=/usr/share/cgrates/tutorials/kamevapi/cgrates/etc/cgrates/cgrates.cfg

Dan-Cristian Bogos

unread,
May 8, 2017, 2:13:48 AM5/8/17
to cgr...@googlegroups.com
ok. What was the syslog when running in foreground and were you able to connect via console?

DanB

--
You received this message because you are subscribed to the Google Groups "CGRateS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgrates+unsubscribe@googlegroups.com.
To post to this group, send email to cgr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cgrates/5f55a751-9db8-49db-b9fe-bd47e3745c8e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

malvern chamisa

unread,
May 8, 2017, 2:24:44 AM5/8/17
to CGRateS

 cgrates.service - LSB: CGRateS real-time charging system
   Loaded: loaded (/etc/init.d/cgrates)
   Active: active (exited) since Mon 2017-05-08 01:23:54 CDT; 39s ago
  Process: 3071 ExecStop=/etc/init.d/cgrates stop (code=exited, status=0/SUCCESS)
  Process: 3160 ExecStart=/etc/init.d/cgrates start (code=exited, status=0/SUCCESS)

May 08 01:23:54 cgrates CGRateS[3167]: Caching load history
May 08 01:23:54 cgrates CGRateS[3167]: Finished load history caching.
May 08 01:23:54 cgrates CGRateS[3167]: Caching all aliases
May 08 01:23:54 cgrates CGRateS[3167]: Caching load history
May 08 01:23:54 cgrates CGRateS[3167]: Finished load history caching.
May 08 01:23:54 cgrates CGRateS[3167]: Registering CDRS HTTP Handlers.
May 08 01:23:54 cgrates CGRateS[3167]: Registering CDRS RPC service.
May 08 01:23:54 cgrates CGRateS[3167]: <KamEvapi> Attempting connect to Kamailio at: 127.0.0.1:8448
May 08 01:23:54 cgrates CGRateS[3167]: <SessionManager> error: dial tcp 127.0.0.1:8448: getsockopt: connection refused!
May 08 01:23:54 cgrates CGRateS[3167]: Stopped all components. CGRateS shutdown!



Which config needs editing to get this up and running?

malvern chamisa

unread,
May 8, 2017, 2:27:47 AM5/8/17
to CGRateS


This is the syslog output

May  8 00:19:13 cgrates systemd[1]: Starting Session 47 of user africom.
May  8 00:19:13 cgrates systemd[1]: Started Session 47 of user africom.
May  8 00:34:49 cgrates systemd[1]: Stopping LSB: CGRateS real-time charging system...
May  8 00:34:49 cgrates cgrates[3071]: start-stop-daemon: warning: failed to kill 2427: No such process
May  8 00:34:49 cgrates systemd[1]: Stopped LSB: CGRateS real-time charging system.
May  8 00:35:01 cgrates systemd[1]: Stopped LSB: CGRateS real-time charging system.
May  8 00:52:38 cgrates CGRateS[3112]: Caching all aliases
May  8 00:52:38 cgrates CGRateS[3112]: <CDRC> Configuration reload
May  8 00:52:38 cgrates CGRateS[3112]: Starting CGRateS Scheduler.
May  8 00:52:38 cgrates CGRateS[3112]: Starting CGRateS JSON server at 127.0.0.1:2012.
May  8 00:52:38 cgrates CGRateS[3112]: Starting CGRateS CDRS service.
May  8 00:52:38 cgrates CGRateS[3112]: Starting CGRateS SM-Kamailio service.
May  8 00:52:38 cgrates CGRateS[3112]: Starting CGRateS HTTP server at 127.0.0.1:2080.
May  8 00:52:38 cgrates CGRateS[3112]: Starting CGRateS GOB server at 127.0.0.1:2013.
May  8 00:52:38 cgrates CGRateS[3112]: Caching load history

Dan-Cristian Bogos

unread,
May 8, 2017, 2:45:32 AM5/8/17
to cgr...@googlegroups.com
OK let me put it other way then
 Do u still have issues when yoi start in foreground?

DanB

--
You received this message because you are subscribed to the Google Groups "CGRateS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgrates+unsubscribe@googlegroups.com.
To post to this group, send email to cgr...@googlegroups.com.

malvern chamisa

unread,
May 8, 2017, 3:11:45 AM5/8/17
to CGRateS
Yes am still getting the could not connect to server 127.0.0.1:2012 error when i run cgr-console status

May 08 02:06:43 cgrates CGRateS[3230]: <KamEvapi> Attempting connect to Kamailio at: 127.0.0.1:8448
May 08 02:06:43 cgrates CGRateS[3230]: <SessionManager> error: dial tcp 127.0.0.1:8448: getsockopt: connection refused!

and in my syslog the above error is causing all components to be stopped. cgrates and kamailio are running on the same server

DanB

unread,
May 8, 2017, 4:24:23 AM5/8/17
to cgr...@googlegroups.com
The error shows that your Kamailio server is not listening at
127.0.0.1:8448

DanB
> -- 
> You received this message because you are subscribed to the Google
> Groups "CGRateS" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to cgrates+u...@googlegroups.com.
> To post to this group, send email to cgr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/cgrates/3a64bc83-1f6f-48fe-825f-eeeb22c721b8%40googlegroups.com
> .

malvern chamisa

unread,
May 8, 2017, 5:42:46 AM5/8/17
to CGRateS


yes my kamailio is listening on port 5060 so should i change the evapi command to 127.0.0.1:5060 to resolve issue?

DanB

unread,
May 8, 2017, 8:58:39 AM5/8/17
to cgr...@googlegroups.com
Hi Malrvern,

You need to enable evapi module in Kamailio.
I would suggest going through the tutorial files we have published for
Kamailio here:
http://cgrates.readthedocs.io/en/latest/tut_kamailio.html

DanB

malvern chamisa

unread,
May 8, 2017, 11:35:22 AM5/8/17
to CGRateS
 Thank you for the help now up and running


Where are the default users 1001. 1002 located are they in any database cant find them

DanB

unread,
May 8, 2017, 4:32:46 PM5/8/17
to cgr...@googlegroups.com
Malvern,

Are you referring to Kamailio users or CGRateS ones?

DanB
> -- 
> You received this message because you are subscribed to the Google
> Groups "CGRateS" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to cgrates+u...@googlegroups.com.
> To post to this group, send email to cgr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/cgrates/46715bb3-ac26-4029-81c3-f1a4901112a5%40googlegroups.com

malvern chamisa

unread,
May 9, 2017, 3:50:26 AM5/9/17
to CGRateS
I am referring to CGRateS default users

I want to test the default rating plans all is set and my users are registered on jisti. When i try to make a call am getting the error  "Charging controller unreachable" on jisti softphone

I have registered with 1001 trying to call 1002.


DanB

unread,
May 9, 2017, 5:21:48 AM5/9/17
to cgr...@googlegroups.com
Malvern,

You create accounts in your AccountActions.csv file. These are in the
end "tasks" for the scheduler to execute.

Regarding controller unreachable, it appears there is no communication
between Kamailio and CGRateS (either something miss-configured or
CGRateS stopped working).

Which version of CGRateS are you running? Are you using tutorial
configs?

DanB
> -- 
> You received this message because you are subscribed to the Google
> Groups "CGRateS" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to cgrates+u...@googlegroups.com.
> To post to this group, send email to cgr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/cgrates/cef91669-a67f-45ee-a824-e16f330bf027%40googlegroups.com

malvern chamisa

unread,
May 9, 2017, 6:12:40 AM5/9/17
to CGRateS


yes am using tutorial configs as they are.

malvern chamisa

unread,
May 9, 2017, 6:15:06 AM5/9/17
to CGRateS


when i check console it shows cgrates is running

root@cgrates:/home/africom#  /usr/share/cgrates/tutorials/kamevapi/cgrates/etc/init.d/cgrates start
root@cgrates:/home/africom# cgr-console status                                  {
 "footprint": 10150,
 "memstat": 819
}

malvern chamisa

unread,
May 9, 2017, 6:23:57 AM5/9/17
to CGRateS


This is my version

cgrates_0
.9.1~rc8_amd64.deb

DanB

unread,
May 9, 2017, 7:46:07 AM5/9/17
to cgr...@googlegroups.com
Malvern,

Based on your status command, you are using an older version of
CGRateS.
Could help upgrading to the one out of master from here:
http://www.cgrates.org/tmp_pkg/

Also once you have the upgrade done, please post your kamailio and
cgrates configs if you still have issues (or send them to me privately
if you don't want them to be displayed).

DanB

On Tue, 2017-05-09 at 03:23 -0700, malvern chamisa wrote:
>
>
> This is my version
>
> cgrates_0.9.1~rc8_amd64.deb
> >
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "CGRateS" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to cgrates+u...@googlegroups.com.
> To post to this group, send email to cgr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/cgrates/913250ec-cf5c-4341-aec3-ebbbd37144f2%40googlegroups.com

malvern chamisa

unread,
Jun 22, 2017, 2:05:32 AM6/22/17
to CGRateS
Hie
I have managed to setup cgrates and kamailio and they are working fine my challenge is i now want my subscribers to authenticate from mysql not from the conf file but its quite a struggle

Dan B

unread,
Jun 22, 2017, 7:15:00 AM6/22/17
to cgr...@googlegroups.com
Hi Malvern,

Thanks for confirming. 
Regarding Kamailio password authorization, I would start with Kamailio documentation and maybe posting on their ML if you have further issues. I can also have a look on it but these things are best when others can also benefit from answers and the best place in this case is Kamailio ML.

DanB

On Thu, Jun 22, 2017 at 8:05 AM, malvern chamisa <malvern...@gmail.com> wrote:
Hie
I have managed to setup cgrates and kamailio and they are working fine my challenge is i now want my subscribers to authenticate from mysql not from the conf file but its quite a struggle

--
You received this message because you are subscribed to the Google Groups "CGRateS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgrates+unsubscribe@googlegroups.com.

To post to this group, send email to cgr...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages