Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with perseo-fe on receving perseo-core timer:at() fired actions #91

Closed
ahmadessam opened this issue May 15, 2018 · 8 comments
Closed

Comments

@ahmadessam
Copy link

ahmadessam commented May 15, 2018

I've been using perseo project recently and i've tested some of its functionalities through the provided examples in Github . i have deployed perse-core as a docker container and perseo-fe source using npm.
i configured the perseo-fe along with the perseo-core container and i made sure they communicate with each other by using the examples in https://github.com/telefonicaid/perseo-fe/tree/master/examples . But then i began to use a new rule including the timer:at() function so that the perse-core fires an action at a specific time.
see

then i checked the perseo-core logs and made sure it fired an action but there was failure in communication between it and the perseo-fe as follows .

screenshot from 2018-05-15 06 56 39

and i don't know what is the problem with perseo-fe and why it gives this error

i checked the perseo-core separately with a socket server listening on port 6000 and made the core fire towards it instead of 9090 and i made sure the perseo-core fires on time but i also found another problem where it fired only the values involved in the select clause and it didn't fire the json body included in the action field .
So there are two problems
1- the perseo-fe has a problem on receiving actions from the perseo-core with the timer:at() function
2-the perseo-core fires the values of the select clause and doesnot include the json included action field.

I hope there would be a solution for these issues @fgalan @dmoranj .

@fgalan
Copy link
Member

fgalan commented May 16, 2018

It would be great to know from another users attemping to use timer:at() in rules (personally, I have never used it) to confirm the issue.

@fgalan
Copy link
Member

fgalan commented May 16, 2018

Thanks for the feedback!

@aguirrea
Copy link

I have a similar problem with timer:interval, I have leave a post on stackoverflow: https://stackoverflow.com/questions/51602716/are-esper-time-intervals-supported-in-fiware-perseo
best,
Andrés

@fgalan
Copy link
Member

fgalan commented Jul 31, 2018

Maybe @aarranz or his team could provide some feedback on this. They have been playing with Perseo recently :)

@aguirrea
Copy link

aguirrea commented Aug 1, 2018

In perseo-core log I receive the same error than @ahmadessam . The timer event is fired but the communication with the perseo-fe is interrupted; below, the traffic sniffed with wireshark is attached:

POST /actions/do HTTP/1.1
Content-Type: application/json; charset=utf-8
fiware-correlator: n/a
Fiware-Service: n/a
Fiware-Servicepath: n/a
X-Real-IP
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.8.0_171
Host: perseo-fe:9090
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 36

{"ruleName":"timer_interval_update"}

The docker-compose used for the environment setup is in:

https://github.com/aguirrea/fiware-perseo-test.git

@cblanco
Copy link
Contributor

cblanco commented Aug 7, 2018

I have been analysing the perseo-core behaviour using this timer rules, timer:at and timer:interval and I corroborate that a "SocketException: Unexpected end of file from server" occurs.

The problem is that perseo-core is not designed to manage actions that are not triggered by events from perseo-fe. This kind of queries don't need previous request from perseo-fe. The Esper engine call the handler and send the request automatically, but the requests contains invalid header values ("n/a")

Perseo-fe needs correct values in the next headers to accept the requests:

  • "service"
  • "subservice"
  • "fiware-correlator"
  • "transactionId"
  • "correlatorId"
  • "Fiware-Service"
  • "Fiware-Servicepath"
  • "X-Real-IP"
  • "from"

To solve this issue and get perseo-core to correctly process this type of request, a posible solution should be give special treatment to this type of Esper events within the core, detecting that it is a 'timer' type query and get the appropriate headers, which should be saved somewhere at the time the rule is added.

The solution is not trivial, we will analyse the possibility solve this issue in our roadmap for this component.

@fgalan
Copy link
Member

fgalan commented Aug 7, 2018

@cblanco thanks for the detailed analysis!

@fgalan
Copy link
Member

fgalan commented Nov 23, 2018

This issue was automatically closed by github upon merging PR #114.

@ahmadessam @aguirrea could you check the new version (in master branch) and confirm or provide some feedback on this, pls? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants