-
Notifications
You must be signed in to change notification settings - Fork 115
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
Lost Websocket Connection #274
Comments
Also here on my rpi3 with LibreElec 8.1.0 (Kodi 17.4). Dont know how to get this log above, but i inspect now the zipped logs. |
Any news on this? |
Sadly none - and the problem still exists on Kodi 18.1. And it's well beyond my capabilities to dive into it. N |
Neil, I had the same issue and bumped into this thread. Have you checked that you have enabled remote control like the error message suggests? That resolved the issue for me.
|
Ditto, same issue here. And yes, of course 'Allow programs on other systems to control Kodi' is set. I wouldn't be using Chorus at all if not. And I checked to be sure, no surprise, it is. I'm using Chorus fine, it just pops up this stupid message every few minutes. |
I run into the same problem and could solve it. Make sure that your firewall is allowing incoming traffic for the EventServer listening on the UDP port 9777 (this is the default port as seen in your 'guisettings.xml' file in 'userdata' folder). See https://kodi.wiki/view/EventServer#Event_Clients_and_the_EventServer Make sure that your firewall is allowing incoming traffic for the JSON-RPC API listening on the TCP port 9090 by default. See https://kodi.wiki/view/JSON-RPC_API#WebSocket This also solved local party mode desync of track info reported in #348 |
Shouldn't Chorus2 read from |
To answer my own question: modifying the code as suggested above, is actually not needed… Simply edit update the |
Any chance you can provide some more explicit instructions and what's going on. I admit it's late, but I just read the recent posts and am clueless. I run Chorus on one machine and Kodi on another one the same LAN with precisely zero firewall between them. And yet websockets time out all the frigging time. Next to unusable. Ever single time i visit It have to reload the page and pray ... |
@zedrdave no addon is allowed to read from advancedsettings.xml, chorus is not an exception |
@bernd-wechner In my very specific case, I modified In your case, I have no idea. But what I would try is:
If the port is open on Kodi's side (and you have no firewall), and the browser truly is trying to call the right host and port: I have no idea what might be going wrong, but it sounds like a bug. |
@bernd-wechner I don't know what is the /#settings/web that @zedrdave is referring to, but AFAIK every machine has its own firewall, at least should, and it applies to the local network. On which system are you running Kodi? |
@DjZU I was referring to the web interface's settings page (reachable through that URL), which is a much cleaner way to override the default port. BTW: most typical linux installs do not have a firewall enabled by default (although if @bernd-wechner can confirm that the right port is open, and the web client is really connecting to it, then I'd agree firewall is most likely the answer). |
@zedrdave OK now I understand which setting you mean, I did try it, it works but it is not persistent that's the reason why I came to 'hacking' the .js file. |
I admit I'm a little confused by what's needed. So here's what I can say:
Nothing listening on 9090. I checked the Firefox console quickly on Chorus and indeed cycles of this reported on console:
Here's what I configured in Kodi: Is there somewhere else to turn on the websocket support? Or a log I can check at the Kodi end? Why is nothing listening on 9090 I wonder. Thanks, the learning so far has pointed me ina direction on this annoying issue at least! But I'm not understanding something here about 8080 vs 9090 ... (I mean I can infer one is for HTTP support the other exposes and API over a websocket but I see only config for 808 at the Kodi end and at teh CHorus end I can see both configurable and I see nothing listening on 9090). Update: Removing the Kodi restriction:
So for some reasons init has 9090 open and that begins to explain a lot. Kodi can't open it. Wonder what this is about? I can confirm that on a fresh Ubuntu 20.04 server I see exactly the same. On my client Mint system though:
which is bizarre as one Min 193 system has 1/init listening and the other 1/systemd. Hmmm. It's all tcp6 related so I imagine some stock standard IPv6 service runs on 9090 now? So Google further and blam I found it! I run cockpit on these machines of late: And it uses 9090 and runs as a system service!
Which means indeed I need to configure Kodi to use another port! Brilliant. Your ideas and suggestion have steered me in the right direct of diagnostics. I had zero idea about port 9090! |
And it's solved. I fixed advancedsettings.xml a la: https://kodi.wiki/view/Advancedsettings.xml#jsonrpc By adding:
, restarted Kodi - an unfortunate necessity so I lost my current playlist ;-) and in Chorus on web settings I pointed it to 9091: And watching the Firefox console now:
Thanks ever so much for the pointers! |
Absolutely excellent. Corrected the lost web socket issue. Thanks for the posting the fix. |
Good work Bernd, this fix worked for me. |
This can be closed |
I am having the exact same problem - periodic 'Lost websocket connection' messages - but these instructions did not fix it. I am running the CoreELEC distribution of Kodi 19.3; I created the advancedsettings.xml file in /storage/.kodi/userdata/ and put this in it: I also enabled remote control from other systems. Then I restarted Kodi. In my browser I opened the Kodi page which launched Chorus. In Chorus' 'Web Interface' page I changed the websockets port number to 9091 and saved my changes. The 'Lost websocket connection' message still pops up periodically. What have I missed, or what has changed since Bernd solved this 18 months ago? |
The 'Lost websocket connection' message still pops up periodically. But it reconnects most times after tuning the network settings. Do as root sysctl -p |
if this is still an issue for anyone, please re-open |
Using Chorus2 with kodi 17.1 gives the following error in the browser every couple of minutes:
Lost Websocket Connection
Attempting Websocket reconnect
At each reconnection, the following lines are received at the console ...
`
SCRIPT12008: WebSocket Error: Incorrect HTTP response. Status code 200, OK
%c Failed to connect to websockets, so I am falling back to polling for updates. Which makes things slower and uses more resources. Please ensure you have 'Allow programs on other systems to control Kodi' ENABLED in the Kodi settings (System > Services > Remote control). You may also get this if you are using proxies or accessing via an IP address when localhost will suffice. If websockets normally works, you might just need to refresh your browser. background: #FFFDD9; padding: 0 5px; color: #444; font-weight: bold; font-size: 110%
[object Event]
{
[functions]: ,
proto: { },
AT_TARGET: 2,
bubbles: false,
BUBBLING_PHASE: 3,
cancelable: false,
cancelBubble: false,
CAPTURING_PHASE: 1,
constructor: { },
currentTarget: { },
defaultPrevented: false,
eventPhase: 2,
isTrusted: true,
srcElement: { },
target: { },
timeStamp: 1494316718657,
type: "error"
}
%c Websockets Closed background: #FFFDD9; padding: 0 5px; color: #444; font-weight: bold; font-size: 110%
[object CloseEvent]
{
[functions]: ,
proto: { },
AT_TARGET: 2,
bubbles: false,
BUBBLING_PHASE: 3,
cancelable: false,
cancelBubble: false,
CAPTURING_PHASE: 1,
code: 1006,
constructor: { },
currentTarget: { },
defaultPrevented: false,
eventPhase: 2,
isTrusted: true,
reason: "",
srcElement: { },
target: { },
timeStamp: 1494316718664,
type: "close",
wasClean: false
}
`
This error has also been reported here
The error occurs regardless of browser (IE11, Firefox and Chrome tried) and using Windows and Ubuntu as kodi host.
Any ideas?
Thanks
Neil
The text was updated successfully, but these errors were encountered: