Prime Push not working after migrating to 6.2

UI Components for JSF
Error
Posts: 19
Joined: 24 Jun 2013, 21:05

16 Mar 2018, 15:46

I have an app that uses Primefaces. It was on version 6.0 and everything was working fine.

Now I'm trying to update the Primefaces version to 6.2 and my websockets (prime push) stop working. I updated the Atmosphere dependency to version 2.4.6 as the manual says. However I keep getting this message:

Websocket closed, reason: Connection was closed abnormally (that is, with no close frame being sent). - wasClean: true

And then my messages are not delivered; Is anyone else with this problem?
I'm using JSF 2.2 with Wildfly 10.
Server: Wildfly 17
JSF: 2.2
Primefaces: 7.0
JDK:11 Corretto

stephan.wenders
Posts: 27
Joined: 11 Nov 2013, 09:38
Location: Duisburg, Germany

20 Jun 2018, 11:45

Yes, I am having the same problem.
Any help is appreciated.

Otherwise I will try to migrate to JSF 2.3 and test the new websocket feature.
Stephan Wenders

Primefaces 6.2.x
Wildfly 15
JSF 2.3
JDK 8
Solaris 11, Windows 10

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

20 Jun 2018, 12:27

I would migrate, we removed Push completely for 6.3.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

stephan.wenders
Posts: 27
Joined: 11 Nov 2013, 09:38
Location: Duisburg, Germany

20 Jun 2018, 12:59

Yes your right, but the problem is that we have to do a lot of work for this.

There will be the necessity to switch to wildfly 12 or 13 to have jsf 2.3 support,
better to wildfly 13 to have full jee8 support.

The local primefaces problem results in a lot of testing for our production environment.

Please do not get me wrong, primefaces rocks, but it takes al lot of time and it would be nice
to have a solution for the local problem.

Perhaps an additional information, the browsers console output will give a hint.

Code: Select all

Websocket closed, reason: Connection was closed abnormally (that is, with no close frame being sent). - wasClean: false
socket.js.xhtml:1:40274
Websocket failed on first connection attempt. Downgrading to long-polling and resending
socket.js.xhtml:1:40274
XHRGET
http://pc601.hkm.de:8080/primepush/valuesProduced?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.3.3-javascript&X-Atmosphere-Transport=long-polling&X-Atmosphere-TrackMessageSize=true&X-atmo-protocol=true&_=1529491713589
[HTTP/1.1 404 Not Found 1ms]
XHRGET
http://pc601.hkm.de:8080/primepush/valuesProduced?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.3.3-javascript&X-Atmosphere-Transport=long-polling&X-Atmosphere-TrackMessageSize=true&X-atmo-protocol=true&_=1529491713593
[HTTP/1.1 404 Not Found 1ms]
XHRGET
http://pc601.hkm.de:8080/primepush/valuesProduced?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.3.3-javascript&X-Atmosphere-Transport=long-polling&X-Atmosphere-TrackMessageSize=true&X-atmo-protocol=true&_=1529491713627
[HTTP/1.1 404 Not Found 0ms]
XHRGET
http://pc601.hkm.de:8080/primepush/valuesProduced?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.3.3-javascript&X-Atmosphere-Transport=long-polling&X-Atmosphere-TrackMessageSize=true&X-atmo-protocol=true&_=1529491713639
[HTTP/1.1 404 Not Found 1ms]
XHRGET
http://pc601.hkm.de:8080/primepush/valuesProduced?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.3.3-javascript&X-Atmosphere-Transport=long-polling&X-Atmosphere-TrackMessageSize=true&X-atmo-protocol=true&_=1529491713654
[HTTP/1.1 404 Not Found 0ms]
XHRGET
http://pc601.hkm.de:8080/primepush/valuesProduced?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.3.3-javascript&X-Atmosphere-Transport=long-polling&X-Atmosphere-TrackMessageSize=true&X-atmo-protocol=true&_=1529491713673
[HTTP/1.1 404 Not Found 1ms]
Stephan Wenders

Primefaces 6.2.x
Wildfly 15
JSF 2.3
JDK 8
Solaris 11, Windows 10

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

20 Jun 2018, 13:14

Sorry, i'm not good in atmosphere but it was always hard to get it running on different containers. Therefore i never used it. Also atmosphere (especially the fallbacks) isn't required anymore since all current browsers support websockets.
You can also use OmniFaces, the websocket component should be very similar to the JSF23 websocket.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

FkJ
Posts: 183
Joined: 08 Jan 2010, 19:16

21 Jun 2018, 20:24

tandraschko wrote:
20 Jun 2018, 13:14
Sorry, i'm not good in atmosphere but it was always hard to get it running on different containers. Therefore i never used it. Also atmosphere (especially the fallbacks) isn't required anymore since all current browsers support websockets.
You can also use OmniFaces, the websocket component should be very similar to the JSF23 websocket.
Same problem with 6.2.5. I noticed that the context path of the application is missing on the generated web socket urls, generating these 404 errors on the console.

Could please take a look? Maybe it is something simple.

Thanks

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

21 Jun 2018, 21:48

Try and look in the 6.2 changelog for anything that might have affected computing of a path?

You will probably have to debug this one maybe by comparing PF 6.1 to PF 6.2 source code for what changed and reporting it. But since its 6.2 you might have to have a PRO support account to get it fixed or patch the branch yourself.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

jfarcand
Posts: 19
Joined: 02 Feb 2010, 20:23

21 Jun 2018, 22:37

@tandraschko I would appreciate if you stop spreading all over the place (github, here) TOTALLY false information about Atmosphere. I have hundreds of happy customers using Atmosphere + PF so please stop your false statement. Just take a look at your internal JIRA and you will see that you have customers that use Atmosphere in production.

PF + Atmosphere integration may have some regressions with 6.1 or 6.2, but was working perfectly fine before that.

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

22 Jun 2018, 09:27

@JF
sorry, i don't want to blame you or atmosphere, i just wanted to share my expierence as (probably bad) atmosphere user, not as PF dev.

I tried PF Push 2-3 years ago and i sadly needed to switch to plain atmosphere, which worked in my environment. Not sure what was the exact problem... was long time ago.
Today, I (as user) would use plain websockets with a small wrapper like OmniFaces/JSF23, as the fallback doesn't matter for me anymore and the programming model seems similar (between atmosphere and the JSR) and i probably only use basic features.

Removing Push was wheter influenced by me nor decided by me.
If just the path is wrong, it should be easily possible the overwrite the Socket/PushRenderer in the applications.
Also, the sourcecode of PF Push is still there (in the 6.2 tag), someone could easily extract it to an own module!
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

22 Jun 2018, 13:15

@jfarcand. I think a "PrimeFaces-Atmosphere" library supported and run by the Atmosphere team might be the better place for the code that got removed in PF 6.3. There do seem to be advantages of PrimeFaces Push but PrimeTek no longer wanted to support it and our open source team (@tandraschko, myself, @Rapster) etc don't know enough about it to really make quality bug fixes.

And when out team did report Atmosphere defects it seems no one takes any action on them for example here are the two I reported...

https://github.com/Atmosphere/atmosphere/issues/2289

https://github.com/Atmosphere/atmospher ... issues/226

I know yours is a community based project but it's hard for PF to support a library when defects being reported are not being actioned.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 44 guests