Starting Cgrates

621 views
Skip to first unread message

Bassie Sonnie

unread,
Jun 7, 2014, 10:26:08 AM6/7/14
to cgr...@googlegroups.com
Im new to Cgrates and following the instructions  here, However, when i try to check if cgrates is running with "cgr-console status", i get the message 
-rpc_encoding="json": RPC encoding used <gob|json>
  -server="127.0.0.1:2012": server address host:port
  -version=false: Prints the application version.
2014/06/07 15:22:06 Could not connect to server 127.0.0.1:2012

Please what might i be doing wrong. 

Thank You

Dan Christian Bogos

unread,
Jun 7, 2014, 10:28:07 AM6/7/14
to cgr...@googlegroups.com
Hi,

It appears that your server did not start and hence the console cannot connect to it. I suggest trying to start the cgr-engine again and check syslog after you do it (if debian, use /etc/ini.d/cgrates start)

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/fd42c5e3-59a1-43bb-883c-88c3bc55325f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bassie Sonnie

unread,
Jun 7, 2014, 10:37:10 AM6/7/14
to cgr...@googlegroups.com

Thanks Dan, 
Fixed now.

DInesh Sharma

unread,
Aug 24, 2015, 3:56:56 AM8/24/15
to CGRateS
Hello Dan,

when i check with following command to start cgrates then we are getting following error:

commnad : 

/usr/share/cgrates/tutorials/osips_async/cgrates/etc/init.d/cgrates start
cgr-console status

Error :
  -rpc_encoding="json": RPC encoding used <gob|json>
  -server="127.0.0.1:2012": server address host:port
  -verbose=false: Show extra info about command execution.

  -version=false: Prints the application version.
2015/08/24 07:52:27 Could not connect to server 127.0.0.1:2012

when we checked syslog then it is showing following error:

CGRateS[9122]: Registering CDRS RPC service.
CGRateS[9122]: Starting CGRateS HTTP server at 127.0.0.1:2080.
CGRateS[9122]: <SM-OpenSIPS> Listening for datagram events at <127.0.0.1:2020>
CGRateS[9122]: Starting CGRateS GOB server at 127.0.0.1:2013.
CGRateS[9122]: Starting CGRateS JSON server at 127.0.0.1:2012.
CGRateS[9122]: <SM-OpenSIPS> Failed subscribing to OpenSIPS at address: <127.0.0.1:8020>, error: <read udp 127.0.0.1:48659: connection refused>
CGRateS[9122]: <SM-OpenSIPS> error: <SM-OpenSIPS> Stopped reading events!
CGRateS[9122]: Stopped all components. CGRateS shutdown!


We have commented all lines at this file:


/etc/cgrates/cgrates.json

Let me know what can be error or where we need to change?

thanks

DanB

unread,
Aug 24, 2015, 3:59:47 AM8/24/15
to cgr...@googlegroups.com
Hi Dinesh,

Your syslog is telling you the reason:

"CGRateS[9122]: <SM-OpenSIPS> Failed subscribing to OpenSIPS at address: <127.0.0.1:8020>, error: <read udp 127.0.0.1:48659: connection refused>"

CGRateS is trying to contact OpenSIPS at 127.0.0.1:8020 but it appears that OpenSIPS does not listen there.

My 2 cents would be around suggesting you running through OpenSIPS tutorial and making yourself comfortable first with the configuration files there.
http://cgrates.readthedocs.org/en/latest/tut_opensips.html

DanB

DInesh Sharma

unread,
Aug 24, 2015, 4:12:46 AM8/24/15
to CGRateS
thanks for nice support

when i start opensip

/usr/share/cgrates/tutorials/osips_async/opensips/etc/init.d/opensips start

not getting any error

when i run this command

opensipsctl moni

getting following error:
-bash: opensipsctl: command not found

Freeswitch is working at same server and we can call

Let me know what can be error?

Thanks

DanB

unread,
Aug 24, 2015, 4:16:56 AM8/24/15
to cgr...@googlegroups.com
Dinesh,

There are chances that you don't have opensips installed there?

DanB

DInesh Sharma

unread,
Aug 24, 2015, 7:05:24 AM8/24/15
to CGRateS
We have already installed it because we are not getting any error if run this command:

/usr/share/cgrates/tutorials/osips_async/opensips/etc/init.d/opensips start

DanB

unread,
Aug 24, 2015, 7:07:56 AM8/24/15
to cgr...@googlegroups.com
Dinesh,

That command fails silently (like most of the init scripts) if the binaries of opensips are not found.

DanB
Reply all
Reply to author
Forward
0 new messages