Error in cgr-loader

268 views
Skip to first unread message

remc...@gmail.com

unread,
Nov 12, 2014, 11:42:19 AM11/12/14
to cgr...@googlegroups.com
Hi,

First of all, awesome software :-). Looks really promising and production-ready!
I got a small issue loading the rates, but I can't seem to figure out whether I'm using the correct csv files.
When I use the sample files from github, I get the following error on loading them using cgr-loader:

$> cgr-loader /path/to/my/files
2014/11/12 15:38:46 WARNING: Got error on cache reload: invalid character '\u0082' looking for beginning of value

It seems some sort of encoding issue, tried both utf-8 and ascii encodings.
Also, the format of these files is different from what is described in the documentation, which one is the most recent? :-).

Thanks!
Remco.

Dan Christian Bogos

unread,
Nov 12, 2014, 11:57:12 AM11/12/14
to cgr...@googlegroups.com
Hi Remco,

Answers inline ...


On 12.11.2014 17:42, remc...@gmail.com wrote:
Hi,

First of all, awesome software :-). Looks really promising and production-ready!
Thanks for your kind words and yes, it runs already in production on few important sites.

I got a small issue loading the rates, but I can't seem to figure out whether I'm using the correct csv files.
When I use the sample files from github, I get the following error on loading them using cgr-loader:

$> cgr-loader /path/to/my/files
2014/11/12 15:38:46 WARNING: Got error on cache reload: invalid character '\u0082' looking for beginning of value

You are not providing correctly the path where the files are located. There are chances you are reading maybe wrong data out of the current directory you are located in when running the command.
Here is how I would do it:

`cgr-loader -verbose  -path=/path/to/my/files`
It seems some sort of encoding issue, tried both utf-8 and ascii encodings.
Also, the format of these files is different from what is described in the documentation, which one is the most recent? :-).
Well honestly the documentation is a bit behind, waiting for the motivated contributor still :). In the mean time we consider the existing one orientative and the most actual one should be in the tutorial files.

Please retry with the command I have specified and maybe flush before redis just to be sure nothing stale inthere (if you do not have any important data in databases 10 and 11).

DanB

Thanks!
Remco.

--
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/eb8e85ba-2acc-41f4-a132-4c05f1bb2e75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lorenzo Allegrucci

unread,
Nov 22, 2014, 5:49:57 AM11/22/14
to cgr...@googlegroups.com

Hi, I'm having the same problem, are there any updates on this issue?
Thanks

Dan Christian Bogos

unread,
Nov 22, 2014, 7:21:15 AM11/22/14
to cgr...@googlegroups.com
Hi Lorenzo,

Not sure what is the issue on Remco's side since he did not longer reply to my attempts of supporting his case. We cannot replicate the issue, so will need some more data. Maybe you can offer us some additional information?

How did u install cgrates and on what OS? Can you make sure you "flush" your redis before loading stuff from CGRateS in it? By default we use database number 10 and 11. What was the command you have used to load the data inside redis? Did u change the default encoding by any chance?

For a more interactive support, you can also join our IRC channel so we help you live on troubleshoot ...

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.

Lorenzo Allegrucci

unread,
Nov 22, 2014, 10:25:11 AM11/22/14
to cgr...@googlegroups.com


On Saturday, November 22, 2014 1:21:15 PM UTC+1, DanB wrote:
Hi Lorenzo,

Not sure what is the issue on Remco's side since he did not longer reply to my attempts of supporting his case. We cannot replicate the issue, so will need some more data. Maybe you can offer us some additional information?


sure
 
How did u install cgrates and on what OS?

I'm using a standard Debian 7, I installed cgrates building my deb and installing by dpkg, in this way:

cd pkg
./pkg_cgrates_deb.sh
cd /tmp
dpkg -i cgrates_0.9.1-rc6_amd64.deb


I use a standard redis2.4 provided by Debian, empty database (by FLUSHALL if necessary):

redis 127.0.0.1:6379> INFO
redis_version:2.4.14
redis_git_sha1:00000000
redis_git_dirty:0
arch_bits:64
multiplexing_api:epoll
gcc_version:4.6.2
process_id:6196
uptime_in_seconds:19954
uptime_in_days:0
lru_clock:1157765
used_cpu_sys:5.34
used_cpu_user:7.39
used_cpu_sys_children:0.00
used_cpu_user_children:0.00
connected_clients:11
connected_slaves:0
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
used_memory:812064
used_memory_human:793.03K
used_memory_rss:2437120
used_memory_peak:1394184
used_memory_peak_human:1.33M
mem_fragmentation_ratio:3.00
mem_allocator:jemalloc-2.2.5
loading:0
aof_enabled:0
changes_since_last_save:24
bgsave_in_progress:0
last_save_time:1416669493
bgrewriteaof_in_progress:0
total_connections_received:349
total_commands_processed:1231
expired_keys:0
evicted_keys:0
keyspace_hits:242
keyspace_misses:36
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:441
vm_enabled:0
role:master

then, cd /usr/share/cgrates/tariffplans/prepaid1centpsec

cgr-loader 
2014/11/22 16:18:57 WARNING: Got error on cache reload: invalid character '\u0082' looking for beginning of value
2014/11/22 16:18:57 WARNING: Failed reloading stat queues, error: invalid character 'Þ' looking for beginning of value


Can you make sure you "flush" your redis before loading stuff from CGRateS in it?

Yes, I run FLUSHALL

By default we use database number 10 and 11. What was the command you have used to load the data inside redis?

just cgr-loader
 
Did u change the default encoding by any chance?

default encoding of what? However, I didn't change any encoding
 
For a more interactive support, you can also join our IRC channel so we help you live on troubleshoot ...

DanB

thank you

Dan Christian Bogos

unread,
Nov 22, 2014, 10:32:46 AM11/22/14
to cgr...@googlegroups.com
Lorenzo,

Something is strange.

Here are my commands (could you maybe reproduce them in the right order, and send me the output?)
"""
root@iPBXDev:~/cgrates/data/tariffplans/prepaid1centpsec# uname -a
Linux iPBXDev 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u1 x86_64 GNU/Linux
root@iPBXDev:~/cgrates/data/tariffplans/prepaid1centpsec# ls -la /usr/bin/ | grep cgr-
root@iPBXDev:~/cgrates/data/tariffplans/prepaid1centpsec# redis-cli -n 10 flushdb
OK
root@iPBXDev:~/cgrates/data/tariffplans/prepaid1centpsec# redis-cli -n 11 flushdb
OK
root@iPBXDev:~/cgrates/data/tariffplans/prepaid1centpsec# cgr-loader -verbose
2014/11/22 16:29:41 Destinations:
2014/11/22 16:29:41     GERMANY : [+49]
2014/11/22 16:29:41     GERMANY_MOBILE : [+4915 +4916 +4917]
2014/11/22 16:29:41 Rating Plans:
2014/11/22 16:29:41     RP_RETAIL
2014/11/22 16:29:41     RP_DATA1
2014/11/22 16:29:41     RP_SMS1
2014/11/22 16:29:41 Rating Profiles:
2014/11/22 16:29:41     *out:cgrates.org:call:*any
2014/11/22 16:29:41     *out:cgrates.org:data:*any
2014/11/22 16:29:41     *out:cgrates.org:sms:*any
2014/11/22 16:29:41 Action Plans:
2014/11/22 16:29:41      PREPAID_10
2014/11/22 16:29:41 Shared Groups:
2014/11/22 16:29:41 LCR Rules:
2014/11/22 16:29:41 Actions:
2014/11/22 16:29:41      PREPAID_10
2014/11/22 16:29:41      BONUS_1
2014/11/22 16:29:41      LOG_BALANCE
2014/11/22 16:29:41      CDRST_WARN_HTTP
2014/11/22 16:29:41      CDRST_LOG
2014/11/22 16:29:41 Account Actions:
2014/11/22 16:29:41      *out:cgrates.org:1001
2014/11/22 16:29:41      *out:cgrates.org:1002
2014/11/22 16:29:41      *out:cgrates.org:1003
2014/11/22 16:29:41      *out:cgrates.org:1004
2014/11/22 16:29:41      *out:cgrates.org:1005
2014/11/22 16:29:41 Rating Profile Aliases:
2014/11/22 16:29:41 Account Aliases:
2014/11/22 16:29:41 Derived Chargers:
2014/11/22 16:29:41     *out:cgrates.org:call:dan:dan
2014/11/22 16:29:41     *out:cgrates.org:call:dan:*any
2014/11/22 16:29:41 CDR Stats Queues:
2014/11/22 16:29:41     CDRST1
2014/11/22 16:29:41     CDRST2
2014/11/22 16:29:41 Wrote history.
2014/11/22 16:29:41 Reloading cache
2014/11/22 16:29:41 Reloading scheduler
2014/11/22 16:29:41 Reloading CDRStats data
""""

Thanks,
DanB

Lorenzo Allegrucci

unread,
Nov 22, 2014, 11:43:15 AM11/22/14
to cgr...@googlegroups.com


On Saturday, November 22, 2014 4:32:46 PM UTC+1, DanB wrote:
Lorenzo,

Something is strange.


Indeed, I'm willing to try some patches to debug the issue, let me know

Dan Christian Bogos

unread,
Nov 22, 2014, 11:44:38 AM11/22/14
to cgr...@googlegroups.com
OK,

Please run the commands which I have recommended and send me the output.

Ta,
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.

Lorenzo Allegrucci

unread,
Nov 22, 2014, 12:10:12 PM11/22/14
to cgr...@googlegroups.com


On Saturday, November 22, 2014 5:44:38 PM UTC+1, DanB wrote:
OK,

Please run the commands which I have recommended and send me the output


 lorenzo@terminus:/usr/share/cgrates/tariffplans/prepaid1centpsec$ uname -a
Linux terminus 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64 GNU/Linux
lorenzo@terminus:/usr/share/cgrates/tariffplans/prepaid1centpsec$ ls -la /usr/bin/ | grep cgr-
-rwxr-xr-x  1 root   root     9395752 Nov 22 16:10 cgr-console
-rwxr-xr-x  1 root   root    11448360 Nov 22 16:10 cgr-engine
-rwxr-xr-x  1 root   root     9879048 Nov 22 16:10 cgr-loader
-rwxr-xr-x  1 root   root     9330952 Nov 22 16:10 cgr-tester
lorenzo@terminus:/usr/share/cgrates/tariffplans/prepaid1centpsec$ redis-cli -n 10 flushdb
OK
lorenzo@terminus:/usr/share/cgrates/tariffplans/prepaid1centpsec$ redis-cli -n 11 flushdb
OK
lorenzo@terminus:/usr/share/cgrates/tariffplans/prepaid1centpsec$ cgr-loader -verbose
2014/11/22 18:09:24 Destinations:
2014/11/22 18:09:24 GERMANY : [+49]
2014/11/22 18:09:24 GERMANY_MOBILE : [+4915 +4916 +4917]
2014/11/22 18:09:24 Rating Plans:
2014/11/22 18:09:24 RP_RETAIL
2014/11/22 18:09:24 RP_DATA1
2014/11/22 18:09:24 RP_SMS1
2014/11/22 18:09:24 Rating Profiles:
2014/11/22 18:09:24 *out:cgrates.org:call:*any
2014/11/22 18:09:24 *out:cgrates.org:data:*any
2014/11/22 18:09:24 *out:cgrates.org:sms:*any
2014/11/22 18:09:24 Action Plans:
2014/11/22 18:09:24 PREPAID_10
2014/11/22 18:09:24 Shared Groups:
2014/11/22 18:09:24 LCR Rules:
2014/11/22 18:09:24 Actions:
2014/11/22 18:09:24 CDRST_WARN_HTTP
2014/11/22 18:09:24 CDRST_LOG
2014/11/22 18:09:24 PREPAID_10
2014/11/22 18:09:24 BONUS_1
2014/11/22 18:09:24 LOG_BALANCE
2014/11/22 18:09:24 Account Actions:
2014/11/22 18:09:24 *out:cgrates.org:1002
2014/11/22 18:09:24 *out:cgrates.org:1003
2014/11/22 18:09:24 *out:cgrates.org:1004
2014/11/22 18:09:24 *out:cgrates.org:1005
2014/11/22 18:09:24 *out:cgrates.org:1001
2014/11/22 18:09:24 Rating Profile Aliases:
2014/11/22 18:09:24 Account Aliases:
2014/11/22 18:09:24 Derived Chargers:
2014/11/22 18:09:24 *out:cgrates.org:call:dan:dan
2014/11/22 18:09:24 *out:cgrates.org:call:dan:*any
2014/11/22 18:09:24 CDR Stats Queues:
2014/11/22 18:09:24 CDRST1
2014/11/22 18:09:24 CDRST2
2014/11/22 18:09:24 Wrote history.
2014/11/22 18:09:24 Reloading cache
2014/11/22 18:09:24 WARNING: Got error on cache reload: invalid character '\u0082' looking for beginning of value
2014/11/22 18:09:24 Reloading scheduler
2014/11/22 18:09:24 Reloading CDRStats data
2014/11/22 18:09:24 WARNING: Failed reloading stat queues, error: invalid character 'Þ' looking for beginning of value



Dan Christian Bogos

unread,
Nov 22, 2014, 12:19:34 PM11/22/14
to cgr...@googlegroups.com
Thanks,

Can you also please post your cgrates.cfg?

DanB

Lorenzo Allegrucci

unread,
Nov 22, 2014, 1:25:47 PM11/22/14
to cgr...@googlegroups.com


On Saturday, November 22, 2014 6:19:34 PM UTC+1, DanB wrote:
Thanks,

Can you also please post your cgrates.cfg?


 lorenzo@terminus:/usr/share/cgrates/tariffplans/prepaid1centpsec$ cat /etc/cgrates/cgrates.cfg 
# Real-time Charging System for Telecom & ISP environments
# Copyright (C) ITsysCOM GmbH
#
# This file contains the default configuration hardcoded into CGRateS.
# This is what you get when you load CGRateS with an empty configuration file.

[global]
ratingdb_type = redis # Rating subsystem database: <redis>.
ratingdb_host = 127.0.0.1 # Rating subsystem database host address.
ratingdb_port = 6379 # Rating subsystem port to reach the database.
ratingdb_name = 10 # Rating subsystem database name to connect to.
ratingdb_user = # Rating subsystem username to use when connecting to database.
ratingdb_passwd = # Rating subsystem password to use when connecting to database.
accountdb_type = redis # Accounting subsystem database: <redis>.
accountdb_host = 127.0.0.1 # Accounting subsystem database host address.
accountdb_port = 6379 # Accounting subsystem port to reach the database.
accountdb_name = 11 # Accounting subsystem database name to connect to.
accountdb_user = # Accounting subsystem username to use when connecting to database.
accountdb_passwd = # Accounting subsystem password to use when connecting to database.
stordb_type = postgres # Stor database type to use: <mysql|postgres>
stordb_host = 127.0.0.1 # The host to connect to. Values that start with / are for UNIX domain sockets.
stordb_port = 5432 # The port to reach the stordb.
stordb_name = cgrates # The name of the log database to connect to.
stordb_user = cgrates # Username to use when connecting to stordb.
stordb_passwd = CGRateS.org # Password to use when connecting to stordb.
stordb_max_open_conns = 0s # Maximum database connections opened
stordb_max_idle_conns = -10 # Maximum database connections idle
dbdata_encoding = json # The encoding used to store object data in strings: <msgpack|json>
rpc_json_listen = 127.0.0.1:2012 # RPC JSON listening address
rpc_gob_listen = 127.0.0.1:2013 # RPC GOB listening address
http_listen = 127.0.0.1:2080 # HTTP listening address
default_reqtype = rated # Default request type to consider when missing from requests: <""|prepaid|postpaid|pseudoprepaid|rated>.
default_category = call # Default Type of Record to consider when missing from requests.
default_tenant = cgrates.org # Default Tenant to consider when missing from requests.
default_subject = cgrates # Default rating Subject to consider when missing from requests.
rounding_decimals = 10 # System level precision for floats
# http_skip_tls_veify = false # If enabled Http Client will accept any TLS certificate
# tpexport_dir = /var/log/cgrates/tpe # Path towards export folder for offline Tariff Plans
# xmlcfg_path = # Path towards additional config defined in xml file

[balancer]
enabled = false # Start Balancer service: <true|false>.

[rater]
enabled = true # Enable RaterCDRSExportPath service: <true|false>.
# balancer =   # Register to Balancer as worker: <""|internal|127.0.0.1:2013>.

[scheduler]
enabled = true # Starts Scheduler service: <true|false>.

[cdrs]
enabled = true # Start the CDR Server service:  <true|false>.
# extra_fields = # Extra fields to store in CDRs for non-generic CDRs
mediator = internal # Address where to reach the Mediator. Empty for disabling mediation. <""|internal>
# cdrstats = # Address where to reach the cdrstats service. Empty to disable stats gathering from raw CDRs <""|internal|x.y.z.y:1234>
# store_disable = false # When true, CDRs will not longer be saved in stordb, useful for cdrstats only scenario

[cdre]
# cdr_format = csv # Exported CDRs format <csv>
# data_usage_multiply_factor = 0.0 # Multiply data usage before export (eg: convert from KBytes to Bytes)
# cost_multiply_factor = 0.0 # Multiply cost before export (0.0 to disable), eg: add VAT
# cost_rounding_decimals = -1 # Rounding decimals for Cost values. -1 to disable rounding
# cost_shift_digits = 0 # Shift digits in the cost on export (eg: convert from EUR to cents)
# mask_destination_id = # Destination id containing called addresses to be masked on export
# mask_length = 0 # Length of the destination suffix to be masked
# export_dir = /var/log/cgrates/cdre # Path where the exported CDRs will be placed
# export_template = cgrid,mediation_runid,tor,accid,reqtype,direction,tenant,category,account,subject,destination,setup_time,answer_time,usage,cost
# Exported fields template  <""|fld1,fld2|*xml:instance_name>
[cdrc]
# enabled = false # Enable CDR client functionality
# cdrs = internal # Address where to reach CDR server. <internal|127.0.0.1:2080>
# run_delay = 0 # Sleep interval in seconds between consecutive runs, 0 to use automation via inotify
# cdr_format = csv # CDR file format <csv|freeswitch_csv>.
# field_separator = , # Separator used in case of csv files. One character only supported and needs to be right after equal sign
# data_usage_multiply_factor = 1 # Conversion factor for data usage
# cdr_in_dir = /var/log/cgrates/cdrc/in # Absolute path towards the directory where the CDRs are stored.
# cdr_out_dir = /var/log/cgrates/cdrc/out # Absolute path towards the directory where processed CDRs will be moved.
# cdr_source_id = csv # Free form field, tag identifying the source of the CDRs within CGRS database.
# tor_field = 2 # TypeOfRecord field identifier. Use index number in case of .csv cdrs.
# accid_field = 3 # Accounting id field identifier. Use index number in case of .csv cdrs.
# reqtype_field = 4 # Request type field identifier. Use index number in case of .csv cdrs.
# direction_field = 5 # Direction field identifier. Use index numbers in case of .csv cdrs.
# tenant_field = 6 # Tenant field identifier. Use index numbers in case of .csv cdrs.
# category_field = 7 # Type of Record field identifier. Use index numbers in case of .csv cdrs.
# account_field = 8 # Account field identifier. Use index numbers in case of .csv cdrs.
# subject_field = 9 # Subject field identifier. Use index numbers in case of .csv CDRs.
# destination_field = 10 # Destination field identifier. Use index numbers in case of .csv cdrs.
# setup_time_field = 11 # Setup time field identifier. Use index numbers in case of .csv cdrs.
# answer_time_field = 12 # Answer time field identifier. Use index numbers in case of .csv cdrs.
# usage_field = 13 # Usage field identifier. Use index numbers in case of .csv cdrs.
# extra_fields = # Extra fields identifiers. For .csv, format: <label_extrafield_1>:<index_extrafield_1>[...,<label_extrafield_n>:<index_extrafield_n>]

[mediator]
enabled = true # Starts Mediator service: <true|false>.
reconnects = 3 # Number of reconnects to rater/cdrs before giving up.
rater = internal # Address where to reach the Rater: <internal|x.y.z.y:1234>
cdrstats = internal # Address where to reach the cdrstats service. Empty to disable stats gathering out of mediated CDRs <""|internal|x.y.z.y:1234>
store_disable = false # When true, CDRs will not longer be saved in stordb, useful for cdrstats only scenario


[cdrstats]
enabled = true # Starts the cdrstats service: <true|false>
# queue_length = 50 # Number of items in the stats buffer
# time_window = 1h # Will only keep the CDRs who's call setup time is not older than time.Now()-TimeWindow
# metrics = ASR, ACD, ACC # Stat metric ids to build
# setup_interval = # Filter on CDR SetupTime
# tors = # Filter on CDR TOR fields
# cdr_hosts= # Filter on CDR CdrHost fields
# cdr_sources = # Filter on CDR CdrSource fields
# req_types = # Filter on CDR ReqType fields
# directions = # Filter on CDR Direction fields
# tenants = # Filter on CDR Tenant fields
# categories = # Filter on CDR Category fields
# accounts = # Filter on CDR Account fields
# subjects = # Filter on CDR Subject fields
# destination_prefixes = # Filter on CDR Destination prefixes
# usage_interval = # Filter on CDR Usage 
# mediation_run_ids = # Filter on CDR MediationRunId fields
# rated_accounts = # Filter on CDR RatedAccount fields
# rated_subjects = # Filter on CDR RatedSubject fields
# cost_intervals = # Filter on CDR Cost

[session_manager]
enabled = false # Starts SessionManager service: <true|false>
switch_type = opensips # Defines the type of switch behind: <freeswitch>
rater = internal # Address where to reach the Rater <""|internal|127.0.0.1:2013>
cdrs = # Address where to reach CDR Server, empty to disable CDR capturing <""|internal|127.0.0.1:2013>
reconnects = 3 # Number of reconnects to rater/cdrs before giving up.
debit_interval = 10 # Interval to perform debits on.
min_call_duration = 0s # Only authorize calls with allowed duration bigger than this
max_call_duration = 3h # Maximum call duration a prepaid call can last

[freeswitch]
# server = 127.0.0.1:8021 # Adress where to connect to FreeSWITCH socket.
# passwd = ClueCon # FreeSWITCH socket password.
# reconnects = 5 # Number of attempts on connect failure.
# min_dur_low_balance = 5s # Threshold which will trigger low balance warnings for prepaid calls (needs to be lower than debit_interval)
# low_balance_ann_file = # File to be played when low balance is reached for prepaid calls
# empty_balance_context = # If defined, prepaid calls will be transfered to this context on empty balance 
# empty_balance_ann_file = # File to be played before disconnecting prepaid calls on empty balance (applies only if no context defined)
# cdr_extra_fields = # Extra fields to store in CDRs in case of processing them

[opensips]
# listen_udp = 127.0.0.1:2020 # Address where to listen for datagram events coming from OpenSIPS
# mi_addr = 127.0.0.1:8020 # Adress where to reach OpenSIPS mi_datagram module
# events_subscribe_interval = 60s # Automatic events subscription to OpenSIPS, 0 to disable it
# reconnects = 3 # Number of attempts on connect failure.

[derived_charging]
# run_ids = # Identifiers of additional sessions control.
# run_filters = # List of cdr field filters for each run.
# reqtype_fields = # Name of request type fields to be used during additional sessions control <""|*default|field_name>.
# direction_fields = # Name of direction fields to be used during additional sessions control <""|*default|field_name>.
# tenant_fields = # Name of tenant fields to be used during additional sessions control <""|*default|field_name>.
# category_fields = # Name of tor fields to be used during additional sessions control <""|*default|field_name>.
# account_fields = # Name of account fields to be used during additional sessions control <""|*default|field_name>.
# subject_fields = # Name of fields to be used during additional sessions control <""|*default|field_name>.
# destination_fields = # Name of destination fields to be used during additional sessions control <""|*default|field_name>.
# setup_time_fields = # Name of setup_time fields to be used during additional sessions control <""|*default|field_name>.
# answer_time_fields = # Name of answer_time fields to be used during additional sessions control <""|*default|field_name>.
# usage_fields = # Name of usage fields to be used during additional sessions control <""|*default|field_name>.
# combined_chargers = true # Combine accounts specific derived_chargers with server configured ones <true|false>.

[history_server]
enabled = true # Starts History service: <true|false>.
history_dir = /var/log/cgrates/history # Location on disk where to store history files.
save_interval = 1s # Interval to save changed cache into .git archive

[history_agent]
enabled = true # Starts History as a client: <true|false>.
server = internal # Address where to reach the master history server: <internal|x.y.z.y:1234>

[mailer]
# server = localhost # The server to use when sending emails out
# auth_user = cgrates # Authenticate to email server using this user
# auth_passwd = CGRateS.org # Authenticate to email server with this password
# from_address = cgr-m...@localhost.localdomain # From address used when sending emails out

Dan Christian Bogos

unread,
Nov 22, 2014, 1:30:53 PM11/22/14
to cgr...@googlegroups.com
Lorenzo,

This is the source of your errors (hence my initial question if you have modified the encoding by any chance):


dbdata_encoding = json # The encoding used to store object data in strings: <msgpack|json>

By default cgr-loader encodes tariff plans data into redis using msgpack (you can changed it by cgr-loader -dbdata_encoding=json). So you can either load with different encoding or read with cgr-engine using different encoding.

We use msgpack encoding by default since it is faster but json is more readable.

Let me know if all clear now.

DanB

Lorenzo Allegrucci

unread,
Nov 22, 2014, 1:44:21 PM11/22/14
to cgr...@googlegroups.com


On Saturday, November 22, 2014 7:30:53 PM UTC+1, DanB wrote:
Lorenzo,

This is the source of your errors (hence my initial question if you have modified the encoding by any chance):

dbdata_encoding = json # The encoding used to store object data in strings: <msgpack|json>

By default cgr-loader encodes tariff plans data into redis using msgpack (you can changed it by cgr-loader -dbdata_encoding=json). So you can either load with different encoding or read with cgr-engine using different encoding.

We use msgpack encoding by default since it is faster but json is more readable.

Let me know if all clear now

yes, that fixed the issue, thank you very much!

so, is it normal to get this hex output?

 redis 127.0.0.1:6379[10]> get dst_GERMANY
"x\x9cjZ\xe4\x99\xb2\xdc\xdd5\xc8\xd7\xd1/rE@QjZfEj\xf1\xc4\xc5\xda&\x96\x80\x00\x00\x00\xff\xff\x8e\xc1\nF"

Dan Christian Bogos

unread,
Nov 22, 2014, 1:46:21 PM11/22/14
to cgr...@googlegroups.com
Yes,

Most of the data inside redis is not really readable since we archive it for load speed purpose (we got sometimes about 300MB of non-archived data within one rating plan key).

Dan

PS: One item which is readable is ubl key, holding the account data.
--
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.

remc...@gmail.com

unread,
Nov 25, 2014, 5:38:33 AM11/25/14
to cgr...@googlegroups.com
Hi,

Sorry for not reply'ing any sooner! I was rather busy the last couple of weeks. I decided that it was related to the fact that I was using debian squeeze instead of wheezy somehow and installed another machine. Only yesterday I tried again on this new machine, and encountered the same issue. I was about to reply to this thread and just read the solution :-).
I will try if this solves my problem as well.

Thanks again!
Remco.

Op woensdag 12 november 2014 17:42:19 UTC+1 schreef remc...@gmail.com:

Dan Christian Bogos

unread,
Nov 25, 2014, 5:40:04 AM11/25/14
to cgr...@googlegroups.com
Hi Remco,

Debial Squeeze should still work if you ask me. If you still have issues, please send us your cgrates.cfg.

Cheers,
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.

remc...@gmail.com

unread,
Dec 4, 2014, 9:16:48 AM12/4/14
to cgr...@googlegroups.com
Hi,

It is working now, even on squeeze!

Thanks,
Remco.

Op dinsdag 25 november 2014 11:40:04 UTC+1 schreef DanB:

DanB

unread,
Dec 4, 2014, 10:07:26 AM12/4/14
to cgr...@googlegroups.com
Great,

Thanks for reporting.

DanB
Reply all
Reply to author
Forward
0 new messages