ging / fiware-cosmos-orion-flink-connector-examples

Code examples for getting started with Flink Orion Connector
https://fiware-cosmos-flink-examples.readthedocs.io
MIT License
1 stars 2 forks source link

Subscription failure "Server returned nothing (no headers, no data)" [Example 2] #4

Closed daniel9029 closed 4 years ago

daniel9029 commented 4 years ago

Good afternoon,

I'm having some issues following the Example 2 tutorial steps.
After I solved some server connection problem (the port 9001 wasn't configured suitably in the config file), I've created the Room entity and then subscribed to the attributes changes. But this last step gave me this error:

orion | time=Thursday 14 May 13:46:50 2020.723Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=connectionOperations.cpp[454]:collectionUpdate | msg=Database Operation Successful (update: <{ _id: ObjectId('5ebd4b94a1d4397897f1e71e'), $or: [ { lastFailure: { $lt: 1589463956 } }, { lastFailure: { $exists: false } } ] }, { $set: { lastFailure: 1589463956, lastFailureReason: "Server returned nothing (no headers, no data)" } }>).

Here is the modified yml file: version: '3.5' services: mongo-db: image: mongo:3.6 hostname: mongo-db container_name: db-mongo expose:

Thank you for your attention!

sonsoleslp commented 4 years ago

Hi, Make sure your Flink job is running and that you have subscribed to notifications in Orion using the right callback URL. If the job is not running or the callback URL is unreachable, the notification will fail.

daniel9029 commented 4 years ago

Hi, thank you for the answer. Yes, the Flink job related to the Example2 is running (as you can see from the screenshot below)

ApacheFlink

I can correctly submit a new entity with the script provided under files/example2/curl_CreateNewEntity.sh, but when I try to subscribe to the attributes change with the script under files/example2/curl_SubscribeToEntityNotifications.sh, this happens:

orion_response

subscription_json

Am I wrong in something?

Thank you again for your patience!

sonsoleslp commented 4 years ago

If you are using the Flink Job Manager then you are already on example 3. Try subscribing as it's done in this file: https://github.com/ging/fiware-cosmos-orion-flink-connector-examples/blob/master/files/example3/curl_SubscribeToEntityNotifications.sh

daniel9029 commented 4 years ago

Ok perfect, now it works fine :)

Thank you for your time!