<SessionS> failed rounding session cost [...] error: <UNSUPPORTED_SERVICE_METHOD>

120 views
Skip to first unread message

Jacek Konieczny

unread,
Jun 15, 2021, 4:28:27 AM6/15/21
to CGRateS
Hi,

I am getting lots of these in my logs:

Jun 15 10:21:57 cgrdev cgr-engine[25664]: CGRateS <350cff3> [25664]: <SessionS> failed rounding  session cost for <7967e3bfbd9a5da67c61d6c6c04841e5fa17e1a7>, srIdx: <0>, error: <UNSUPPORTED_SERVICE_METHOD>
Jun 15 10:22:05 cgrdev cgr-engine[25664]: CGRateS <350cff3> [25664]: <SessionS> failed rounding  session cost for <358fb58f1516b11ebc1e042880f9f9157cf1f453>, srIdx: <0>, error: <UNSUPPORTED_SERVICE_METHOD>
Jun 15 10:22:16 cgrdev cgr-engine[25664]: CGRateS <350cff3> [25664]: <SessionS> failed rounding  session cost for <1211577abc3c210b6ccc1bc9dfd17a5fa122cfb2>, srIdx: <0>, error: <UNSUPPORTED_SERVICE_METHOD>
Jun 15 10:22:26 cgrdev cgr-engine[25664]: CGRateS <350cff3> [25664]: <SessionS> failed rounding  session cost for <73aec7c3f71e890327b545f89b36ad1c47f179e2>, srIdx: <0>, error: <UNSUPPORTED_SERVICE_METHOD>

I am not sure how to debug that.

CGRateS 0.10.2

Greets,
Jacek

Alexandru Tripon

unread,
Jun 18, 2021, 6:40:39 AM6/18/21
to cgr...@googlegroups.com
Hi Jacek,

Please post the config you are using, if you are using the dispatcher please post all the config you are using(for the dispatcher and also for the engine you are using).
Also please capture the ngrep between SessionS and Responder( in case you use the dispatcher: between SessionS and DispatcherS).

Thanks,
Trial97

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/cgrates/a5273fb4-9f7a-486b-a907-a7ff5bdc77ccn%40googlegroups.com.

Jacek Konieczny

unread,
Jul 2, 2021, 10:10:37 AM7/2/21
to CGRateS
I forgot about this thread, but the error keeps coming back.

I am not really able to post the whole config I use – I would have to anonymize it quite a bit, and am not even sure what this config would be (just cgrates.json? whole tariff? opensips.cfg?).

I do not use DispatcherS. And I have no idea what this Responder is (https://cgrates.readthedocs.io/ does not mention it even once) and how to ngrep the traffic. There is not much about debugging in the CGrateS documentation, and the logs are quite useless (why 'UNSUPPORTED_SERVICE_METHOD' message does not specify the service and method? – would make things much easier).

Any more specific hints? What is this 'rounding session cost' supposed to do?

Alexandru Tripon

unread,
Jul 16, 2021, 5:43:26 AM7/16/21
to cgr...@googlegroups.com
Hi Jacek,

If you are not using DispatcherS only the cgrates.json should suffice.
If your connection between SessionS and RALs is on `*localhost` you can ngrep with the following command: `sudo ngrep -t -W byline port 2012  -d lo`.
If you use a custom connection you need to change the previous command with the right port and device.

Thanks,
Trial97

Jacek Konieczny

unread,
Jul 23, 2021, 4:24:50 AM7/23/21
to CGRateS
I was using '*internal' for all SessionS connections. I have changed "rals_conns" from "*internal" to "*localhost" to be able to ngrep the traffic. I found no problems in the traffic dumps there.
Then I changed all other component connections to "*localhost" to see other traffic. ngrep show more data, but I could not reproduce the problem any more. Using '*localhost' stopped the <UNSUPPORTED_SERVICE_METHOD> error for me.

I still don't know what was wrong, but this seems like a good-enough workaround for me. I will just switch to "*localhost" connections. Performance impact should be not a problem for me, even on the production machine and the system will be easier to debug too.

Alexandru Tripon

unread,
Jul 29, 2021, 2:36:16 AM7/29/21
to cgr...@googlegroups.com
Hi Jacek,

Can you please post your configuration from when you received `UNSUPPORTED_SERVICE_METHOD`?
And also the post the version you are using(cgr-engine --version).

Thanks,
Trial97

Jacek Konieczny

unread,
Jul 29, 2021, 2:56:03 AM7/29/21
to CGRateS
cgr-engine --version
CGR...@v0.10.2

This is still the latest released version.

The config, as when the error used to happen:

----



{

"general": {
        "logger":"*syslog",
        "log_level": 7,
        "default_tenant": "Tenant",
        "default_timezone": "Local"
},


"rpc_conns": {
        "*localhost": {
                "conns": [{"address": "127.0.0.1:2012", "transport":"*json"}]
        }
},


"data_db": {
        "db_type": "*redis",
        "db_host": "127.0.0.1",
        "db_port": 6379,
        "db_name": "10"
},


"stor_db": {
        "db_type": "*postgres",
        "db_host": "/run/postgresql/",
        "db_port": 5432,
        "db_name": "cgrates",
        "db_user": "cgrates"
},

"listen": {
        "rpc_json": "127.0.0.1:2012",
        "rpc_gob": "127.0.0.1:2013",
        "http": "127.0.0.1:2080",
        "rpc_json_tls" : "0.0.0.0:2022",
        "rpc_gob_tls": "0.0.0.0:2023",
        "http_tls": "0.0.0.0:2280"
},

"tls": {
        "server_certificate": "/etc/cgrates/server.crt",
        "server_key": "/etc/cgrates/server.key",
        "ca_certificate": "/etc/ssl/certs/ca-certificates.crt",
        "server_policy": 0,
        "server_name": "cgrdev.example.org"
},

"schedulers": {
        "enabled": true
},

"rals": {
        "enabled": true,
        "thresholds_conns": ["*localhost"],
        "stats_conns": ["*localhost"],
        "caches_conns":["*internal"]
},

"cdrs": {
        "enabled": true,
        "extra_fields": ["source_number"],
        "stats_conns": ["*internal"],
        "chargers_conns": ["*internal"],
        "rals_conns": ["*internal"],
        "attributes_conns": ["*internal"],
        "sessions_cost_retries": 5
},

"cdre": {
        "*default": {
                "export_format": "*file_csv",
                "export_path": "/var/spool/cgrates/cdre",
                "filters" :[],
                "tenant": "Tenant",
                "synchronous": false,
                "attempts": 1,
                "field_separator": ",",
                "attributes_context": "",
                "fields": [
                        {"path": "*exp.CGRID", "type": "*composed", "value": "~*req.CGRID"},
                        {"path": "*exp.Account", "type": "*composed", "value": "~*req.Account"},
                        {"path": "*exp.Source", "type": "*composed", "value": "~*req.source_number"},
                        {"path": "*exp.Destination", "type": "*composed", "value": "~*req.Destination"},
                        {"path": "*exp.SetupTime", "type": "*composed", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
                        {"path": "*exp.AnswerTime", "type": "*composed", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
                        {"path": "*exp.Usage", "type": "*composed", "value": "~*req.Usage"},
                        {"path": "*exp.Cost", "type": "*composed", "value": "~*req.Cost", "rounding_decimals": 4}
                ]
        }
},


"ers": {
        "enabled": true
},

"ees": {
        "enabled": true
},

"chargers": {
        "enabled": true,
        "attributes_conns": ["*internal"]
},

"sessions": {
        "enabled": true,
        "listen_bijson": "0.0.0.0:2014",
        "chargers_conns": ["*internal"],
        "rals_conns": ["*internal"],
        "cdrs_conns": ["*internal"],
        "resources_conns": ["*internal"],
        "suppliers_conns": ["*internal"],
        "attributes_conns": ["*internal"],
        "stats_conns": ["*internal"],
        "thresholds_conns": ["*internal"],
        "debit_interval": "10s",
        "channel_sync_interval":"30s"
},

"attributes": {
        "enabled": true,
        "string_indexed_fields": ["Account"]
},

"resources": {
        "enabled": true,
        "thresholds_conns": ["*internal"],
        "string_indexed_fields": ["Account"],
        "prefix_indexed_fields": ["Destination"]
},

"stats": {
        "enabled": true,
        "thresholds_conns": ["*internal"],
        "string_indexed_fields": ["Account"]
},

"thresholds": {
        "enabled": true,
        "string_indexed_fields": ["Account"]
},

"suppliers": {
        "enabled": true,
        "resources_conns": ["*internal"],
        "stats_conns": ["*internal"],
        "string_indexed_fields": ["Account"],
        "prefix_indexed_fields": ["Destination"]
},

"routes": {
        "enabled": true
},

"analyzers": {
        "enabled": true
},

"apiers": {
        "enabled": true,
        "scheduler_conns": ["*internal"]
},

"mailer": {
        "server": "localhost",
        "from_address": "cgr-m...@cgrdev.example.org"
}

}

----

Alexandru Tripon

unread,
Jul 29, 2021, 10:08:21 AM7/29/21
to cgr...@googlegroups.com
Hi Jacek,

This was fixed in the latest version of this branch.
We are planning to shout a new release in a month or so but if you want you can test it from here: http://pkg.cgrates.org/deb/v0.10/cgrates_0.10.3~dev%2B20210719171216%2B997a990db_amd64.deb

Thanks,
Trial97

Reply all
Reply to author
Forward
0 new messages