[Spce-user] Malformed JSON string

Robert Cuaresma rcuaresma at cloudcom.cat
Mon Aug 27 08:44:04 EDT 2018


Hi Rene and Mika,

Thanks a lot for your response. I will try to upgrade the server to 5.x ASAP for solve this issue. At the moment, I have configured at the end of the file /etc/cron.d/ngcp-fraud-daily-lock this: >/dev/null 2>&1 to try to prevent that the server send e-mails to the root user.

Can this have any impact on the normal operation of fraud prevention? For example, with the sending of emails to exceed the defined fraud limit for a subscriber?

Thanks.

Saludos,
Robert Cuaresma

-----Mensaje original-----
De: Rene Krenn <rkrenn at sipwise.com> 
Enviado el: jueves, 23 de agosto de 2018 12:18
Para: Robert Cuaresma <rcuaresma at cloudcom.cat>; 'Michael Prokop' <mprokop at sipwise.com>
Asunto: AW: [Spce-user] Malformed JSON string

Hi,

not sure if components were upgrade manually, so make sure

ngcp-api-tools
db-schema
ngcp-panel
templates (in particular the nginx conf)

have aligened version.

If that is fine, you literally see this error because the monster query behind the fraud check takes too long.
This is (was) a known issue, and 5.x introduces better timeout settings therefore.

If you move on to recent 6.x version, you get the billing mappings rasterization refactoring, it speeds up the query by 10+ times.

regards

-----Ursprüngliche Nachricht-----
Von: Robert Cuaresma [mailto:rcuaresma at cloudcom.cat]
Gesendet: Donnerstag, 23. August 2018 12:14
An: Michael Prokop <mprokop at sipwise.com>
Cc: Rene Krenn <rkrenn at sipwise.com>
Betreff: RE: [Spce-user] Malformed JSON string

Hi Mika,

root at sbc01:~# dpkg --list ngcp-api-tools Desired=Unknown/Install/Remove/Purge/Hold
| 
|Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig
|-pend / Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                              Version               Architecture
Description
+++-=================================-=====================-============
+++=========-===========================================================
+++============
ii  ngcp-api-tools                    1.2.6.1+0~mr4.5.6.1   all
NGCP REST API related tools

Thanks!

Saludos,
Robert Cuaresma

-----Mensaje original-----
De: Michael Prokop <mprokop at sipwise.com> Enviado el: jueves, 23 de agosto de
2018 12:09
Para: Robert Cuaresma <rcuaresma at cloudcom.cat>
CC: Rene Krenn <rkrenn at sipwise.com>
Asunto: Re: [Spce-user] Malformed JSON string

Hi,

I'm discussing this internally now with Rene Krenn (see Cc).

As a starting point, what ngcp-api-tools versions are you using here? `dpkg --list ngcp-api-tools` lists that.

regards,
-mika-

* Robert Cuaresma [Thu Aug 23, 2018 at 09:15:13AM +0000]:
> Hi Michael, thanks a lot for your reply.

> This is the result of the debug:


> <html>\r
> <head><title>504 Gateway Time-out</title></head>\r <body 
> bgcolor="white">\r
> <center><h1>504 Gateway Time-out</h1></center>\r 
> <hr><center>nginx</center>\r </body>\r </html>\r\n
> 504 Gateway Time-out (60s)
> malformed JSON string, neither array, object, number, string or atom, 
> at
character offset 0 (before "<html>\r\n<head><tit...") at /usr/share/perl5/JSON.pm line 171.


> Otherwise, there are any form to disable that the server sendme an 
> e-mails
with this error?


> Saludos,
> Robert Cuaresma

> -----Mensaje original-----
> De: Spce-user <spce-user-bounces at lists.sipwise.com> En nombre de 
> Michael Prokop Enviado el: jueves, 23 de agosto de 2018 9:02
> Para: spce-user at lists.sipwise.com
> Asunto: Re: [Spce-user] Malformed JSON string

> Hi,

> * Robert Cuaresma [Wed Aug 22, 2018 at 10:00:11PM +0000]:

> > I have Sipwise v4.5.6 and since few weeks ago I received a lot of 
> > errors
with JSON. Sipwise send e-mails with this error:

> You should upgrade from 4.5.6 - which is no longer supported as such
> - to the latest 4.5 LTS version (mr4.5.9 right now).

> > Subject: Cron <root at sbc01>  if /usr/sbin/ngcp-check_active -q; then 
> > /usr/sbin/ngcp-fraud-daily-lock; fi

> > Body: "malformed JSON string, neither array, object, number, string 
> > or
atom, at character offset 0 (before "<html>\r\n<head><tit...") at /usr/share/perl5/JSON.pm line 171."

> > I don't know how to debug this issue and solve it. I appreciate so 
> > much
your help!

> Start by looking into `sudo /usr/sbin/ngcp-fraud-daily-lock --verbose`.
> If that doesn't clarify things for you, feel free to drop me its 
> output
via personal mail (to not share any personal/confidential data with the
public) and I'll clarify this within the Sipwise team.

> regards,
> -mika-




More information about the Spce-user mailing list