basitengr

cgr-engine

Dec 4th, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 6.71 KB | None | 0 0
  1. I executed following cgr-migration command
  2. root@cgrc8:/usr/share/cgrates/tariffplans/tutorial# cgr-migrator -migrate=*set_versions -datadb_name 10 -datadb_port 27017 -datadb_user cgrates -datadb_passwd cgrates -datadb_type mongo -stordb_type postgres -stordb_port 5432 -stordb_user cgrates -stordb_passwd CGRateS.org -verbose
  3.  
  4. Result:
  5. 2017/12/01 10:22:56 Initializing dataDB:mongo
  6. 2017/12/01 10:22:56 Initializing storDB:postgres
  7. 2017/12/01 10:22:56 Initializing oldDataDB:mongo
  8. 2017/12/01 10:22:56 Initializing oldstorDB:postgres
  9. 2017/12/01 10:22:56 Migrating: *set_versions
  10. 2017/12/01 10:22:56 migrating[*set_versions]
  11. 2017/12/01 10:22:56 migrating*set_versions
  12. 2017/12/01 10:22:56 Done migrating!
  13. root@cgrc8:/usr/share/cgrates/tariffplans/tutorial#
  14. root@cgrc8:/usr/share/cgrates/tariffplans/tutorial#
  15. root@cgrc8:/usr/share/cgrates/tariffplans/tutorial#
  16.  
  17. Then i executed cgr-engine command that end up on panic
  18.  
  19. "data_db": {                                // database used to store runtime data (eg: accounts, cdr stats)
  20.     "db_type": "mongo",                     // data_db type: <redis|mongo>
  21.     "db_host": "127.0.0.1",                 // data_db host address
  22.     "db_port": 27017,                       // data_db port to reach the database
  23.     "db_name": "10",                        // data_db database name to connect to
  24.     "db_user": "cgrates",                   // username to use when connecting to data_db
  25.     "db_password": "cgrates",                       // password to use when connecting to data_db
  26. //  "load_history_size": 10,                // Number of records in the load history
  27. },
  28.  
  29.  
  30. root@cgrc8:/usr/share/cgrates/tariffplans/tutorial# cgr-engine -config_dir=/usr/share/cgrates/tutorials/kamevapi/cgrates/etc/cgrates -logger=*stdout
  31. 2017/12/01 10:24:29 method Call has wrong number of ins: 4
  32. 2017/12/01 10:24:29 [INFO]<HTTP> enabling handler for JSON-RPC
  33. 2017/12/01 10:24:29 [INFO]<HTTP> enabling handler for WebSocket connections
  34. 2017/12/01 10:24:29 [INFO]<HTTP> start listening at <0.0.0.0:2080>
  35. 2017/12/01 10:24:29 [INFO]Starting CGRateS CDRS service.
  36. 2017/12/01 10:24:29 method Call has wrong number of ins: 4
  37. 2017/12/01 10:24:29 [INFO]Starting Threshold Service
  38. 2017/12/01 10:24:29 method Call has wrong number of ins: 4
  39. 2017/12/01 10:24:29 [INFO]Starting Resource Service
  40. 2017/12/01 10:24:29 method Call has wrong number of ins: 4
  41. 2017/12/01 10:24:29 [INFO]Starting Stat Service
  42. 2017/12/01 10:24:29 method Call has wrong number of ins: 4
  43. 2017/12/01 10:24:29 [INFO]Starting CGRateS SMKamailio service.
  44. 2017/12/01 10:24:29 [INFO]Starting CGRateS JSON server at <0.0.0.0:2012>.
  45. 2017/12/01 10:24:29 [INFO]Starting CGRateS GOB server at <127.0.0.1:2013>.
  46. 2017/12/01 10:24:29 method Call has wrong number of ins: 4
  47. 2017/12/01 10:24:29 method Call has wrong number of ins: 4
  48. panic: runtime error: invalid memory address or nil pointer dereference
  49. [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xbe4aaa]
  50.  
  51. goroutine 36 [running]:
  52. github.com/cgrates/cgrates/engine.(*UserProfile).GetId(0x0, 0xc4204ec600, 0x15)
  53.     /usr/local/goapps/src/github.com/cgrates/cgrates/src/github.com/cgrates/cgrates/engine/users.go:60 +0x4a
  54. github.com/cgrates/cgrates/engine.(*UserMap).ReloadUsers(0xc4202ba820, 0x0, 0x0, 0xc420483f18, 0xc42048ce40, 0x756f656d69745f74)
  55.     /usr/local/goapps/src/github.com/cgrates/cgrates/src/github.com/cgrates/cgrates/engine/users.go:136 +0x1dd
  56. github.com/cgrates/cgrates/engine.NewUserMap(0xc420488a80, 0xc4203a7a80, 0x1, 0x4, 0x756f656d69745f79, 0x22733222203a2274, 0x90909090909092c)
  57.     /usr/local/goapps/src/github.com/cgrates/cgrates/src/github.com/cgrates/cgrates/engine/users.go:100 +0x1ad
  58. main.startUsersServer(0xc4202c6780, 0xc420488a80, 0xc4204b20e0, 0xc42012e360)
  59.     /usr/local/goapps/src/github.com/cgrates/cgrates/src/github.com/cgrates/cgrates/cmd/cgr-engine/cgr-engine.go:529 +0x60
  60. created by main.main
  61.     /usr/local/goapps/src/github.com/cgrates/cgrates/src/github.com/cgrates/cgrates/cmd/cgr-engine/cgr-engine.go:908 +0x11db
  62. root@cgrc8:/usr/share/cgrates/tariffplans/tutorial#
  63.  
  64. -------------------------------------------
  65. Replaced datadb from "mongo" to "redis"
  66.  
  67. "data_db": {                                // database used to store runtime data (eg: accounts, cdr stats)
  68.     "db_type": "redis",                     // data_db type: <redis|mongo>
  69.     "db_host": "127.0.0.1",                 // data_db host address
  70.     "db_port": 6379,                        // data_db port to reach the database
  71.     "db_name": "10",                        // data_db database name to connect to
  72. //  "db_user": "cgrates",                   // username to use when connecting to data_db
  73. //  "db_password": "cgrates",                       // password to use when connecting to data_db
  74. //  "load_history_size": 10,                // Number of records in the load history
  75. },
  76.  
  77. cgr-engine -config_dir=/usr/share/cgrates/tutorials/kamevapi/cgrates/etc/cgrates -logger=*stdout
  78. 2017/12/01 10:31:40 [INFO]Starting CGRateS CDRS service.
  79. 2017/12/01 10:31:40 [INFO]Starting CGRateS SMKamailio service.
  80. 2017/12/01 10:31:40 method Call has wrong number of ins: 4
  81. 2017/12/01 10:31:40 [INFO]Starting Threshold Service
  82. 2017/12/01 10:31:40 method Call has wrong number of ins: 4
  83. 2017/12/01 10:31:40 [INFO]Starting Resource Service
  84. 2017/12/01 10:31:40 method Call has wrong number of ins: 4
  85. 2017/12/01 10:31:40 [INFO]<HTTP> enabling handler for JSON-RPC
  86. 2017/12/01 10:31:40 [INFO]<HTTP> enabling handler for WebSocket connections
  87. 2017/12/01 10:31:40 [INFO]<HTTP> start listening at <0.0.0.0:2080>
  88. 2017/12/01 10:31:40 [INFO]Starting Stat Service
  89. 2017/12/01 10:31:40 method Call has wrong number of ins: 4
  90. 2017/12/01 10:31:40 method Call has wrong number of ins: 4
  91. 2017/12/01 10:31:40 [INFO]Starting CGRateS GOB server at <127.0.0.1:2013>.
  92. 2017/12/01 10:31:40 [INFO]Starting CGRateS JSON server at <0.0.0.0:2012>.
  93. 2017/12/01 10:31:40 [INFO]could not get load history: [] (<nil>)
  94. 2017/12/01 10:31:40 method Call has wrong number of ins: 4
  95. 2017/12/01 10:31:40 method Call has wrong number of ins: 4
  96. 2017/12/01 10:31:40 [INFO]<ServiceManager> Starting CGRateS Scheduler.
  97. 2017/12/01 10:31:40 method Call has wrong number of ins: 4
  98. 2017/12/01 10:31:40 method Call has wrong number of ins: 4
  99. 2017/12/01 10:31:40 [INFO]Registering CDRS HTTP Handlers.
  100. 2017/12/01 10:31:40 [INFO]Registering CDRS RPC service.
  101. 2017/12/01 10:31:40 method Call has wrong number of ins: 4
  102. 2017/12/01 10:31:40 method ProcessExternalCdr has wrong number of ins: 2
  103. 2017/12/01 10:31:40 method RateCDRs reply type not a pointer: bool
  104. 2017/12/01 10:31:40 method RegisterHandlersToServer has wrong number of ins: 2
  105. 2017/12/01 10:31:40 method Timezone has wrong number of ins: 1
  106. 2017/12/01 10:31:40 [INFO]<Cdrc> Monitoring /var/spool/cgrates/cdrc/in for file moves.
  107. KamEvapi:10:31:40 <KamEvapi> Attempting connect to Kamailio at: 127.0.0.1:8448
  108. 2017/12/01 10:31:40 [INFO]<Scheduler> processing 4 action plans
  109. 2017/12/01 10:31:40 [INFO]<Scheduler> queued 0 action plans
  110. KamEvapi:10:31:40 <KamEvapi> Successfully connected to 127.0.0.1:8448!
Add Comment
Please, Sign In to add comment