Jrpcexception asn 1 decode error offset 0

Ошибка 0x80093106 и нехватка памяти для ASN1

Ошибка 0x80093106 и нехватка памяти для ASN1

Добрый день! Уважаемые читатели и гости IT портала Pyatilistnik.org. Пару лет назад я устанавливал Windows 7 одному из своих друзей на его ноутбук. Все работало как часы, но на прошлой неделе мой друг написал мне, что у него на сайте taxcom.ru во время приема пакетов, выскочила ошибка "Не удалось получить размер для расшифрованных данных, причина нехватка памяти для ASN1. Код ошибки 0x80093106" и попросил помочь в решении данной проблемы. Отказать ему я не мог, поэтому, когда появилось свободное время я приступил к ее устранению.

Что означает нехватка памяти для ASN1?

Есть такая система сдачи отчетности Такском, у пользователя выскочило уведомление:

[info]Уведомление о запрете использования сертификатов, выпущенных по ГОСТу 34.10-2001. Ошибка в процессе приема пакетов. В процессе приема документа от регламенту произошла ошибка. Не удалось получить размер для расшифрованных данных, причина нехватка памяти для ASN1. Код ошибки 0x80093106[/info]

В итоге Windows 7 используя метод EnvelopedCms.Decode в приложении Microsoft .NET Framework, не может декодировать сообщения размером более 5 мегабайт (МБ). Кроме того, вы получаете сообщение об ошибке, похожее на следующее:

  • Необработанное исключение: System.Security.Cryptography.CryptographicException: ASN1 недостаточно памяти.
  • в System.Security.Cryptography.Pkcs.EnvelopedCms.OpenToDecode (Byte [] encodedMessage)
  • в System.Security.Cryptography.Pkcs.EnvelopedCms.Decode (Byte [] encodedMessage)

Эта проблема возникает из-за того, что размер буфера неправильно увеличивается в функции CryptMsgUpdate, когда метод EnvelopedCms.Decode добавляет декодированный контент в буфер во время процесса декодирования. Таким образом, целочисленное переполнение происходит для большого файла.

Как исправить ошибку 0x80093106

Чтобы у нас возвратилась возможность принимать и обрабатывать письма более пяти мегабайт вам необходимо установить специальное обновление от Microsoft, это как в случае с бесконечным обновлением системы, вам его придется загрузить отдельно. Исправление заменит библиотеку Msasn1.dll. Нужная нам KB Windows6.1-KB2480994-v2-x64 или более новая версия KB2729094, подробнее о нем (https://support.microsoft.com/ru-ru/help/2480994/asn1-out-of-memory-error-when-the-cryptmsgupdate-function-decodes-a-me)

  • Скачать KB2480994 можно у меня по ссылке, к сожалению MS данное обновление убрала и заменила, на сколько я понял KB2729094
  • Скачать KB2729094 по ссылке (https://support.microsoft.com/ru-ru/help/2729094/an-update-for-the-segoe-ui-symbol-font-in-windows-7-and-in-windows-ser) или у меня из облака одним пакетом (https://cloud.mail.ru/public/Dgmm/KU6ehFgkn)

Производим установку обновлений KB248099. Запускаем его и соглашаемся на установку.

Сам процесс установки обновления KB248099 занимаем менее минуты.

I am using Objective System Inc(http://www.obj-sys.com/products/asn1c/index.php) ASN.1 Compiler and the specification file(cdr_spec.asn) generated Java source code. The CDRS are enecoded based on format BER(Basic Encoding Rule)

Command to generate Java source:

The source is generated:

When I decode the first CDR file, it parses 3 lines only, the CDR file is supposed to contain more than 100 lines, so it is partially decoded.

When I try decoding another CDR file, it is failed when decoding CDR file and gave me such error:

My ASN.1 specification file does not have any syntax error when I use tool checking its syntax.

Can anyone who knows ASN.1 well help me about this?

" means nesting-related): – Failed at: @displayUserCertifications user_id [in template "custom.author-acclaim-certifications" at line 4, column 9] ——>

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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.

Читайте также:  Как запустить stronghold 2

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:

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.

" means nesting-related): – Failed at: @displayUserCertifications user_id [in template "custom.author-acclaim-certifications" at line 4, column 9] ——>

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

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

the following information for further troubleshooting.

+ SCE and API version

+ OS which runs the API

+ Snippet of your code

" means nesting-related): – Failed at: @displayUserCertifications user_id [in template "custom.author-acclaim-certifications" at line 4, column 9] ——>

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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 (

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 :

This is the code of SceQuotaListener.java :

This is the code of SceResultHandler.java :

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

" means nesting-related): – Failed at: @displayUserCertifications user_id [in template "custom.author-acclaim-certifications" at line 4, column 9] ——>

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

Читайте также:  Titan quest требует диск

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.

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

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?

" means nesting-related): – Failed at: @displayUserCertifications user_id [in template "custom.author-acclaim-certifications" at line 4, column 9] ——>

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

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?

" means nesting-related): – Failed at: @displayUserCertifications user_id [in template "custom.author-acclaim-certifications" at line 4, column 9] ——>

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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.

" means nesting-related): – Failed at: @displayUserCertifications user_id [in template "custom.author-acclaim-certifications" at line 4, column 9] ——>

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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.

Читайте также:  Rpg на двоих на одном компьютере

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.

" means nesting-related): – Failed at: @displayUserCertifications user_id [in template "custom.author-acclaim-certifications" at line 4, column 9] ——>

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

but there is something I forgot to suggest.

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?

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

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

debug rpc-adapter debug-mode on

debug rpc-adapter debug-mode off

The debug log generated can be found:

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.

" means nesting-related): – Failed at: @displayUserCertifications user_id [in template "custom.author-acclaim-certifications" at line 4, column 9] ——>

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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.

" means nesting-related): – Failed at: @displayUserCertifications user_id [in template "custom.author-acclaim-certifications" at line 4, column 9] ——>

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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: >

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: >

2011-10-11 17:33:04 | INFO | CPU #000 | EM Agent: quotaStatusIndication operation was called with parameters: >

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.

Оцените статью
ПК Знаток
Добавить комментарий

Adblock
detector