Need assistance with Web Sockets - Json conversion error.

Hello,

I am testing my Web Socket connection using the “WebSocket
API Try it Now! Documentation Zip File” from TR DEV Community. It connects and seems to work fine, until I request a symbol. I see the error message "Json conversion error." See details below.

Thx

Gary

-------------------------------------------------------------------------------------------

Google Chrome
Version 63.0.3239.132 (Official Build) (64-bit)
Windows 10 Enterprise

SENT:
{
"ID": 2,
"Key": {
"Service": "IDN_RDF",
"Name": ".DJI"
}
}
RECEIVED:
[
{
"ID": 2,
"Type": "Status",
"Key": {
"Service": "IDN_RDF",
"Name": ".DJI"
},
"State": {
"Stream": "ClosedRecover",
"Data": "Suspect",
"Text": "Json conversion error."
}
}

Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answer

  • gary.backes
    Answer ✓

    Hi @Gurpreet

    I think I solved the issue! I changed the following setting in my ads_pop.cnf:

    *ads*IDN_RDF*dataType : 2 ---> 6

    Thanks

    Gary

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    I can replicate the issue by configuring ADS to use SSL protocol instead of RSSL protocol

    *ads*routeList : hostssl
    *ads*hostssl.route*serviceList : IDN_RDF
    *ads*hostssl.route*port : rmds_ssl_sink
    *ads*hostssl.route*hostList : 192.168.27.48
    *ads*hostssl.route*userName : DACS_CASCADE
    *ads*hostssl.route*protocol : sslauto
    *ads*hostssl.route*singleOpen : True
    *ads*hostssl.route*compressionType : 1
    *ads*hostssl.route*pingInterval : 2

    The routeList uses hostssl route which connects to rmds_ssl_sink port with sslauto protocol.

    You need to configure ADS to use RSSL protocol instead, as shown below.

    *ads*routeList : hostrssl
    ...

    *ads*hostrssl.route*serviceList : ELEKTRON_DD
    *ads*hostrssl.route*port : rmds_rssl_sink
    *ads*hostrssl.route*hostList : 192.168.27.46
    *ads*hostrssl.route*userName : DACS_CASCADE
    *ads*hostrssl.route*protocol : rssl
    *ads*hostrssl.route*singleOpen : True
    *ads*hostrssl.route*allowSuspectData : True
    *ads*hostrssl.route*disableDataConversion : True
    *ads*hostrssl.route*compressionType : 1

    The routeList of the above configurations uses hostrssl route which connect to rmds_rssl_sink port with rssl protocol.

    Please change routeList to use rssl route protocol. If it doesn't solve the problem, please share the following information:

    • The version of ADS
    • The ADS configuration file
  • Thanks for your answer... I did check this setting, and it appears to be correct.

    I am using ADS version 3.2.0.L1... have attached config file. Please let me know if you find anything out of place.ads-popcnf-egv-csd1.txt

  • Also... I should mention that this ADS 3.2 POP is being fed by TREP 2.6.1 ADH/ADS. Would this cause the issue? (Edge ---> adh 2.6.1 ---> ADS 2.6.1 ---> ADS 3.2)

  • Hi @gary.backes Are you using the latest version of download package?

    What response do you get, when following request is sent (omitted service name):

    {
    "ID": 2,
    "Key": {
    "Name": ".DJI"
    }
    }

    In my setup I get the JSON error, when the service name requested does not match the service name provided by infrastructure.

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    Thank you for sharing.

    I found one incorrect configuration in ads_pop.cnf.

    *ads*defaultJsonServiceId : IDN_RDF

    *ads*defaultJsonServiceId requires a serviceId.

    The serviceId of IDN_RDF is 257. Therefore, the correct configuration is:

    *IDN_RDF*serviceId : 257
    ...
    *ads*defaultJsonServiceId : 257
  • @Jirapongse

    Thx for catching that... now my default service works as it should!

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.