500 error for real-time POST subscription – 1 Nov 2019

  • This discussion is locked, please start a new discussion.
  • 48 Views
  • Last post 3 weeks ago
  • Discussion is solved
Selwyn McCracken posted this 3 weeks ago

Hi

I keep getting a 500 error when trying to trying to subscribe to the real-time price/dispatch API endpoints with a POST request (See trace below) 

A similar issue was raised in this thread, but doesn;t seem applicable in my case - I have included the necessary header as suggested there:

https://www.emi.ea.govt.nz/Forum/thread/emi-real-time-data-post-and-options-action/

Any help greatly appreciated.

Thanks,

Selwyn

curl -v -X POST "https://emi.azure-api.net/rtp/" -H "Content-Type: application/json" -H "Ocp-Apim-Subscription-Key:$emi_subscription_key" --data-ascii  '{ "name":"Selwyn McCracken" , "url":"https://emi-prices-dispatch.azurewebsites.net/api/emi?device=emi-prices&code=<SNIP>=="}' 

Note: Unnecessary use of -X or --request, POST is already inferred.

*   Trying 104.210.84.32...

* TCP_NODELAY set

* Connected to emi.azure-api.net (104.210.84.32) port 443 (#0)

* ALPN, offering h2

* ALPN, offering http/1.1

* successfully set certificate verify locations:

*   CAfile: /etc/ssl/certs/ca-certificates.crt

  CApath: /etc/ssl/certs

* TLSv1.3 (OUT), TLS handshake, Client hello (1):

* TLSv1.3 (IN), TLS handshake, Server hello (2):

* TLSv1.2 (IN), TLS handshake, Certificate (11):

* TLSv1.2 (IN), TLS handshake, Server key exchange (12):

* TLSv1.2 (IN), TLS handshake, Server finished (14):

* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):

* TLSv1.2 (OUT), TLS change cipher, Client hello (1):

* TLSv1.2 (OUT), TLS handshake, Finished (20):

* TLSv1.2 (IN), TLS handshake, Finished (20):

* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384

* ALPN, server did not agree to a protocol

* Server certificate:

*  subject: CN=*.azure-api.net

*  start date: Apr 16 16:31:18 2019 GMT

*  expire date: Apr 16 16:31:18 2021 GMT

*  subjectAltName: host "emi.azure-api.net" matched cert's "*.azure-api.net"

*  issuer: C=US; ST=Washington; L=Redmond; O=Microsoft Corporation; OU=Microsoft IT; CN=Microsoft IT TLS CA 4

*  SSL certificate verify ok.

> POST /rtp/ HTTP/1.1

> Host: emi.azure-api.net

> User-Agent: curl/7.58.0

> Accept: */*

> Content-Type: application/json

> Ocp-Apim-Subscription-Key:<SNIP>

> Content-Length: 172

> 

* upload completely sent off: 172 out of 172 bytes

< HTTP/1.1 500 Internal Server Error

< Cache-Control: no-cache

< Pragma: no-cache

< Content-Length: 20

< Content-Type: text/plain; charset=utf-8

< Expires: -1

< Set-Cookie: ARRAffinity=8f5c4a6b7dfb612fc801877d67d0cec25c27a3045c85b4e0e1355cb34c997f82;Path=/;HttpOnly;Domain=ma-emiapi-realtime-prd.azurewebsites.net

< X-AspNet-Version: 4.0.30319

< X-Powered-By: ASP.NET

< Date: Fri, 01 Nov 2019 04:52:19 GMT

< 

* Connection #0 to host emi.azure-api.net left intact

An error has occured

Order by: Standard | Newest | Votes
Matthew Keir posted this 3 weeks ago

Hi Selwyn,

Not sure whats going on there - we've made a couple of tweaks. Seems to be working now. Have a go and let us know.

Cheers,

Matthew

Selwyn McCracken posted this 3 weeks ago

Thanks Matthew - the registration seems to be working now. I can see both my endpoints registered via the OPTIONS tester on the API page.

How long does it take for data to start flowing? It is approaching an hour since they were registered and no messages have arrived yet. 

I have double-checked that the endpoints as supplied are working on my side.

Cheers,

Selwyn

 

 

 

Selwyn McCracken posted this 3 weeks ago

Please ignore my last question - data is streaming through now.

Thanks again.

 

 

This discussion is locked, please start a new discussion.

Close