• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WebSocket connection failed: One or more reserved bits
#1
One of the latest updates to pilight have broke my proxy configuration,
and the webgui stops loading with "Connection lost, touch to reload" message.
In the browser-console throws an error:
Quote:WebSocket connection to 'wss://localhost/websocket' failed: One or more reserved bits are on: reserved1 = 0, reserved2 = 1, reserved3 = 1

Though when reloaded, sometimes it loads without an error (like 2 out 10 times).
I'm suspecting the cause was maybe the commit f15aed5, with a title "Bugfix webserver called with daemon API".

Any help is appreciated!
 
Reply
#2
Would be great if you can verify by compiling the code before that commit and after that commit.
 
Reply
#3
(02-15-2018, 01:12 PM)curlymo Wrote: Would be great if you can verify by compiling the code before that commit and after that commit.

I've just finished trying a few earlier commits and seems like it is the f15aed5.
Tomorrow i will try to compile the latest without this commit.
 
Reply
#4
Confirmed, it is caused by commit f15aed5.
When the latest is compiled without this commit it is working great.

Unfortunately it was too early to confirm: it is still happening, but not that often.
 
Reply
#5
How can i trigger the issue myself?
 
Reply
#6
(02-16-2018, 10:43 AM)curlymo Wrote: How can i trigger the issue myself?

That is a good question, i'm not yet sure.
Seems to happen quite random at loading the webgui in the browser.
When it stucks then a few times pressed refresh can help, but sometimes
it is also good for triggering the issue. The most often i get it on Android devices,
seems to happen less on desktop.

To trigger the issue, you need to route pilight on proxy. I'm using a Apache/Debian server configured to proxy the subdomain to pilight. Https of pilight is not used, Apache is doing the job.

Here is the Apache config:
Code:
<VirtualHost *:80>
   ServerName subdomain.example.com

   # Tell search engines not to index or follow.
   Header set X-Robots-Tag "noindex, nofollow"

   # Redirect everything to HTTPS
    Redirect 301 / https://subdomain.example.com
</VirtualHost>

<VirtualHost *:443>
   ServerName subdomain.example.com

   # Tell search engines not to index or follow.
   Header set X-Robots-Tag "noindex, nofollow"

   SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem
   SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
   SSLCertificateChainFile /etc/letsencrypt/live/example.com/fullchain.pem

   SSLProxyEngine On

   ProxyPreserveHost On
   ProxyPass /websocket ws://localhost:5001/websocket/
   ProxyPassReverse /websocket ws://localhost:5001/websocket/
   ProxyPass / http://localhost:5001/
   ProxyPassReverse / http://localhost:5001/
</VirtualHost>

So far it was good to achieve Https and to put it on a subdomain.
 
Reply
#7
The problem is that the commit you are referring to was actually a bugfix for some other issue. I need to now how to trigger this issue reliably in order to make a unittest for it.
 
Reply
#8
Yes thats right, i've also edited my above post with the confirmation.
After hours of trying it is still not clear what is triggering the issue.

Do you have any hint on where to investigate this further?
I'm running out of ideas.
 
Reply
#9
I just know that the original bug that was fixed with this commit was more serious. But ofc, i want to fix all of them.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Already fixed in 8.1.2] Loss of webserver-connection Ulrich.Arnold 32 1,500 07-17-2019, 09:12 AM
Last Post: Ulrich.Arnold
Thumbs Up Newbie problems, usbnano connection and rsl366 pukington 1 411 02-14-2018, 07:36 PM
Last Post: pukington
  Windows HTTP connection andbehtls 1 968 01-14-2018, 02:24 PM
Last Post: bnk72
  Upgrade to jessie+pilight+kernel failed witty 10 1,603 01-04-2018, 12:27 PM
Last Post: witty
  Illumina, cannot obtain connection hansrijn2 5 1,219 05-31-2017, 04:29 PM
Last Post: hansrijn2
  [solved] another pilight ssdp missed connection on RPI segalion 2 2,808 08-24-2016, 10:51 PM
Last Post: Hauke
  [Solved] pilight 7.0 LAN interact connection - 2 Raspberrys mvasi90 4 1,787 07-10-2016, 03:50 PM
Last Post: mvasi90
  pilight-receive: NOTICE: no pilight ssdp connection found bumtheduke 10 11,979 03-29-2016, 10:58 AM
Last Post: pilino1234
  Using API webserver send page "message":"failed" fips 1 1,433 01-08-2016, 09:21 AM
Last Post: fips
  API - Curl.... {message:failed} joho 0 1,220 12-04-2015, 01:29 PM
Last Post: joho

Forum Jump:


Browsing: 1 Guest(s)