cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2984
Views
9
Helpful
9
Replies

SCE API error "input is closed ASN.1"

vilas
Level 1
Level 1

Hello everyone.

I'd need some assistance in using the Service Control Engine (SCE) API.

I have developed a simple application that queries the bucket data for a given subscriber (using the getQuotaStatus API). However, despite I believe the source code is correct, I cannot get any reply back from the SCE.

The client-side debugging (in Log4J) confirms that everything is fine, and that the getQuotaStatus() command was issued properly.

I did some debugging by enabling the command "management-agent sce-api logging" on the SCE command line, and I see this log entries:

2011-09-30 15:12:46 | INFO  | CPU #000 | EM Agent: PRPC connection to /123.123.123.2 established, client name is mcn.sceGw_192.168.2.101_SCE.J.API.PRPC, session name is rpc-59.

2011-09-30 15:12:46 | INFO  | CPU #000 | EM Agent: sceGw_192.168.2.101_SCE.J.API.PRPC - connect operation was called, registered listeners: none

2011-09-30 15:12:46 | INFO  | CPU #000 | EM Agent: sceGw_192.168.2.101_SCE.J.API.PRPC - connect operation was called, registered listeners: none

2011-09-30 15:12:46 | INFO  | CPU #000 | EM Agent: sceGw_192.168.2.101_SCE.J.API.PRPC - registered a quota Listener

2011-09-30 15:12:46 | INFO  | CPU #000 | EM Agent: getQuotaStatus operation was called with parameters: ID: ev_btest32, quota: 0,0,0,1=0

2011-09-30 15:12:51 | INFO  | CPU #000 | EM Agent: PRPC connection to /123.123.123.2 closed BAD: input is closed ASN.1 decode error @ offset 930: Unexpected end-of-buffer encountered..

In particular, I don't understand the "BAD: input is closed ASN.1 decode error" message.

Is this a known bug? How can I debug more, for example how can I get the text the SCE is trying to decode in ASN.1 notation?

I can post some snippet of my code, which is anyway very simple...

Thanks.

9 Replies 9

Tomonobu Okada
Cisco Employee
Cisco Employee

Hi,

The following message you pointed is too general and doesn't

help much unfortunately. For instance, it can happen even when

there was a network connection issue between SCE and API.

closed BAD: input is closed ASN.1 decode error @ offset 930: Unexpected end-of-buffer encountered..

The method getQuotaStatus works fine for me, so there should

be something difference between us. I'm using 3.7.0.

One thing I can come up with is that you need to configure

the Quota RDR's in SCABB and RDR-formatter for category 4

as below to get proper values by getQuotaStatus.

RDR-formatter destination 127.0.0.1 port 33001 category number 4 priority

Configuring the Quota Manager

http://www.cisco.com/en/US/partner/docs/cable/serv_exch/serv_control/broadband_app/rel37x/qm_sol/03_configuring.html

If it still doesn't work after the above changes, please share

the following information for further troubleshooting.

+ SCE and API version

+ Java version

+ OS which runs the API

+ Snippet of your code

Thanks,

Tomo

Many thanks for your answer.

I've added the line

RDR-formatter destination 127.0.0.1 port 33001 category number 4 priority 100

in the configuration. There are no other destinations for category 4.

By the way, I see that this problem is still open on 3.7.0, see "CSCsm19587" in the release notes (

http://www.cisco.com/en/US/docs/cable/serv_exch/serv_control/broadband_app/rel37x/scos_rn/scos_rn.pdf).

However, I cannot get any answer from the SCE. My details:

  • SCE and API version: SCE8000 running version 3.6.5 Build 489. API version is: 3.6.5 Build 300.
  • Java version: 1.6.0_26
  • OS which runs the API: tried both Windows 7 and Apple OSX 10.6
  • Snippet of your code: see below

This is the code of the main class:

http://pastebin.com/MJaYDhMb

This is the code of SceQuotaListener.java:

http://pastebin.com/H6KiuDhA

This is the code of SceResultHandler.java:

http://pastebin.com/PfVxFCLp

Many thanks for your help, this problem got me stuck for ages, it's driving me mad.

Hello,

Hmm.. the source code you provided works fine for me on

my setup which runs same versions with yours.

I have added some println lines in your code to see the received value

and here is the result.

I'm getting the quota status for subscriber test1

1: 1048576(bucket id:value)

But when no bucket is assigned to the subscriber, then no value is returned.

So I assume you need to complete Quota related configurations including

Quota RDR settings on SCA-BB GUI(which I pointed in the previous reply) and

QM config on SM.

Please refer to the following doc for the detail.

http://www.cisco.com/en/US/partner/docs/cable/serv_exch/serv_control/broadband_app/rel36x/qm_sol/03_configuring.html

You can check if a bucket.quota is assigned to a subs by:

SCE2000#>sh interface LineCard 0 subscriber name test1 bucket-state

Bucket 1 is used. Status - Not Breached.                           

SCE2000#>sh interface LineCard 0 subscriber name test1 bucket-state id 1

Bucket type: Total Volume                                              

Bucket state: OK        

Bucket size: 1048576

Bucket usage: 0

If no bucket is assigned:

SCE2000#>sh interface LineCard 0 subscriber name test2 bucket-state    

Error - Subscriber has no quota profile.

BTW, do you always see the following error?

closed BAD: input is closed ASN.1 decode error @ offset 930: Unexpected end-of-buffer encountered..

Or the above error is one time event and your problem is that simply

SCE doesn't reply any info to getQuotaStatus method?

Thanks,

Tomo

Thanks again for helping me.

I've followed the guide you linked (both the 3.6.5 and 3.7.0) line by line. I've also upgraded the OS and the API jars to 3.7.0, but the result is the same.

The only difference with my configuration is in this screen:

the guide suggests to configure "Gy", while I am using the second option instead. The difference is not fully clear to me.

I do see a similar output when I query a user with associated quota:

SCE2000#>sh interface LineCard 0 subscriber name test1 bucket-state id 1

Bucket type: Total Volume                                             

Bucket state: OK       

Bucket size: 1048576

Bucket usage: 0

I always get the error

closed BAD: input is closed ASN.1 decode error @ offset 930: Unexpected end-of-buffer encountered..

every time I use the getQuotaStatus().

Also, I tried following the instruction in paragraph "Configuring SCE for Quota Management Provisioning" of the guide you linked me (http://www.cisco.com/en/US/partner/docs/cable/serv_exch/serv_control/broadband_app/rel37x/qm_sol/03_configuring.html#wp1053276) but nothing changed.

Any other idea or debugging to suggest?

Hi,

You always see the error while I have never seen it in my setup, that's wired...

I think that's better to open a TAC case with your SCE support file and the source code.

Last thing I can think of is that there is something issue in your network between your API

and SCE. For example, NAT, firewall, security software on your PC, etc. I'm not sure if these

can cause such error but if you don't mind please test it again with a direct connection(same network)

between them.  Seems the IP of SCE is 123.123.123.2 and the API is 192.168.2.101,

so I believe they are in different network.

If it doesn't work with this change, I think openning a TAC case is a better option.

I'm sorry that I can't help you much.

Thanks,

Tomo

I have already opened a TAC last week, but it's progressing very slowly and it seems quite hard to debug.

Thanks so much for spending time to help me.

ps: the ip 123.123.123.123 is a placeholder. There is no NAT nor firewall between the SCE and the API client. I tried this already...

Hi again,

I don't want to bother your TAC case or work in parallel,

but there is something I forgot to suggest...

1.

How many subscriber do you have in your SCE box?

If you have more than one and if this is not a production

environment, can you try clearing all the subscribers once

then import ev_btest32 only and try the test again?

2.

If this is not a production, you can enable the following

rpc debug(at this point I'm not sure if this is helpful.).

To enable:

debug rpc-adapter debug-mode on

To disable:

debug rpc-adapter debug-mode off

The debug log generated can be found:

more /apps/data/scos/system/p3hidden/um/umlog

3.

I think you have already tried this, but if you didn't can

you please try reloading your SCE or try different SCE box?

Of course if this is not a production.

Thanks!

Tomo

Thanks so much again for your help.

Sadly, this is a production SCE (with tens of thousands subscribers) so I can't do anything of these. I also have another two SCE1000 and SCE2000 but they are in production too, and their subscribers don't have associated quota...

My TAC was escalated today, let's wait and see. It's becoming quite frustrating...

I see, I'm sorry to hear that

Let's wait for the response from escalation.

My intention was that something performance factor(num of subs, e.g.) is related to this issue

as in working case I see the following log(indicated in red) just after the same log(indicated in blue)

with yours, while in your case nothing happens about for 5 seconds then generates the error.

2011-10-11 17:32:12 | INFO  | CPU #000 | Cleared user log files

2011-10-11 17:32:56 | INFO  | CPU #000 | EM Agent: quotaStatusIndication operation was called with parameters: ID: ev_btest33, quota: 1,0,1318354376,1=0,3=1048576

2011-10-11 17:33:03 | INFO  | CPU #000 | EM Agent: PRPC connection to /1.120.20.1 established, client name is mcn.sceGw_1.120.20.1_SCE.J.API.PRPC, session name is rpc-3.

2011-10-11 17:33:04 | INFO  | CPU #000 | EM Agent: sceGw_1.120.20.1_SCE.J.API.PRPC - connect operation was called, registered listeners: none

2011-10-11 17:33:04 | INFO  | CPU #000 | EM Agent: sceGw_1.120.20.1_SCE.J.API.PRPC - connect operation was called, registered listeners: none

2011-10-11 17:33:04 | INFO  | CPU #000 | EM Agent: sceGw_1.120.20.1_SCE.J.API.PRPC - registered a quota Listener

2011-10-11 17:33:04 | INFO  | CPU #000 | EM Agent: getQuotaStatus operation was called with parameters: ID: ev_btest33, quota: 0,0,0,1=0

2011-10-11 17:33:04 | INFO  | CPU #000 | EM Agent: quotaStatusIndication operation was called with parameters: ID: ev_btest33, quota: 1,5,1318354384,1=0,3=1048576

2011-10-11 17:33:05 | INFO  | CPU #000 | EM Agent: sceGw_1.120.20.1_SCE.J.API.PRPC - disconnected

2011-10-11 17:33:05 | INFO  | CPU #000 | EM Agent: PRPC connection to /1.120.20.1 closed OK: peer terminated connection: user request.

But I wouldn't recommend to try anything I suggested in last reply as this is a production....

Thanks,

Tomo

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: