-
Notifications
You must be signed in to change notification settings - Fork 16
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
Suggestion: alternate ports in install script #253
Comments
As an aside, is the web UI supposed to update the album art, title and song as it changes? Because for me it's never done that. Not in this version or the previous. I wasn't sure if this was a misconfiguration on my part or a glitch. (Maybe this should be its own bug report, but didn't want to flood you if it wasn't) :) |
It is definitely supposed to do this - It works fine on https://cadenceradio.com/, which (typically) runs master. Sounds like there's a break in SSE on your deployments - Perhaps the firewall is blocking the websockets? @kenellorando - What do you think of reimplementing this around Socket.io or something? I remember you mentioned seeing some finnicky behavior out of these before, perhaps moving to a protocol which provides some more guarantees and a fallback to different transports (all the way to polling and JSONP, which is ironically enough our own old implementation - Though it would poll for the change event, not for the metadata/album art) would provide some more robustness here? I know it'll work fine in the browser and in CadenceBot, and I'm fairly certain libraries exist for Golang... Just a thought - If you had problems before, @hiro24 is having problems, and it sounds like I'm probably going to end up having problems when CadenceBot is trying to hold a connection open for days on end to get these events, perhaps we need to consider a robustness improvement on the server/transport side of things - No point in using stuff that makes life harder for all clients and arguably the server at the same time. |
Glad to hear you are still using Cadence! I didn't take into account that Cadence might be used on a host with these ports already in use so that is a valid issue. Another workaround would be to edit the
Of course, that's pretty tedious so I think modifying the installation script would be a good idea. I'll just have to consider to what extent it should be customizable. As the stack is running six services on six different ports, I am not sure if I want to have to prompt the user six additional times. I also might alternatively create official documentation describing how to customize these ports. I'll think about this. |
@hiro24 As to the second issue, my first instinct is it might have to do with the nginx component because you mentioned some ports were changed. There's a specific spot in cadence/config/nginx.conf.example Line 30 in 34db796
If that doesn't work, I think we should collect more information.
|
@hiro24 Also (sorry for all the questions), what browser are you using? SSE is fairly new, it could be your browser doesn't support it (another argument in favor of a stack with support for fallbacks..) |
So worries, @za419, sry been afk most of the day. Line 30 on my nginx.conf matches what you pasted exactly. That is correct, right? As far as https://cadenceradio.com/ I listened to it (JPOP, nice :) ) and I saw the song change. It's not on mine though. I thought maybe it was a browser so I tested it with Edge and Firefox (my normal browser). A word on my setup. I'm using NPM to translate IPs to FQDNs. I have webhook support turned on, and icecast.xml is pointing to the FQDN I have set up for icecast2. This may be a possible cause for the problem. Maybe. |
Also, I noticed on my stream it says current listeners: - Cadence logs shows listeners and updates. From the logs:
|
Definitely sounds to me like it's SSE that's broken - That drives song metadata updates (but not the first load!) and listener casts. Assuming you're running a recent version (5.1+), is your song history also not updating? That's also driven by SSE. If you're running Cadence on something besides port 8080, my guess is that you'll need to change that line in your nginx.conf to have the right port number:
|
So you're correct. History does not update unless I refresh (at which point all the data is current). As far as versions, I'm on Cadence 5.4.2. I tried changing the port as you suggested to my port, but that didn't affect anything. I also attempted changing the next proxy_pass line 3 lines down to match my port also. Neither seemed to do anything. I stopped and started all cadence related services after making the changes. |
As far as SSE, I can send you some logs but I'm not sure which service to check or what I'm looking for. Is there a debug mode I might be able to turn on that might reveal something for you guys? |
Hey-o!
|
So I thought I was on to something there. I changed the proxy_pass lines to the IP of cadence, rather than the name. (I tried both internal IP and port and host IP and host port) This did seem to remove this error message, and I'm now seeing some search database requests in the cadence logs I wasn't seeing before. Unfortunately the good news stops there. The UI is still not auto-updating. |
OK, catching up here again. Just to pause to collect some evidence we have so far:
It sounds like the issue is localized to some configuration in your deployment. Now to just narrow down the issue a little more. Do you see this problem regardless of if you access cadence from your custom NPM FQDN, and if you access cadence from |
Unfortunately I can't test this from localhost. It's running on a headless Linux server. |
Hm, I'm almost out of ideas. I don't think we can isolate the issue with complete certainty with the presence of the other NPM component. Based on our evidence though, that component seems to be the most likely culprit. I'll think out loud here. Radio data transfer normally looks like this:
And if I understand your individual setup correctly, it looks like this:
Originally, when I created the My recommendations (it sounds tedious but the only ways I can think to narrow down any further): try to replicate your Cadence stack on a computer with a GUI so you can browse to it twice: once configured without the NPM component and once with it. While I'm not totally sure what the NPM component is doing, I will also remind that the Nginx component in Cadence is capable of handling any DNS you might provide it (provided in step 5 in the installer). |
So I'm trying to figure out how to step around NPM in this case. I had the IP tied to radio2. and icecast2.xml pointed to that as the hostname. This results in no playback at all. I've tried changing this to just be the IP address instead to see if it gave better results. But I can't get that to play. I've tried setting it to the IP address of icecast2, liquidsoap and even the host's IP. One thing I did notice was that it shows the connected link on the web interface lists https. If I go to the host IP at http on port 8000 I can get where I think it wants me to be going. But I can't for https. For whatever reason it's not listening as https. NPM fixed this for me. Did I maybe miss something somewhere? |
There seem to be multiple compounding issues which make this difficult. I'll approach this in a line by line style now that may be helpful to debug things.
This is because all components normally only talk to each by container name, provided by Docker's DNS. When you update the Another example, I provide
Similar to above, with an IP address, it needs to be whatever address you expect to be able to reach your stream from your computer's browser. If it's an IP, you'll need to provide the port of Icecast too (default 8000).
It sounds like your npm component is some kind of automagic-HTTPS reverse proxy. The vanilla Cadence stack right now doesn't support HTTPS out of the box, and my https://cadenceradio.com deployment is only HTTPS because of Cloudflare. I again suggest we purge this component from the setup completely because we can't isolate issues effectively. We should also forgo HTTPS for now until we get it working on HTTP. Since we're in a broken state right now anyway, I think it's best to start over fresh with the installation script, and provide it only default options. From there, let's see if you can just browse to your server's IP address. |
As an aside, I'll also start to think about a future version of Cadence nginx with optional support for HTTPS out of the box, to automate these types of setups. (to have built-in support for the purpose of the npm component) |
Just tried the new install script, pretty nice!
I imagine I ran into a problem others might. Default ports are in use. Wasn't a big deal to work around, I just reconfigured host port in portainer. But it would be helpful to be able to specify this in the install script.
Ultimately I had to run cadence on something other than 8080 and nginx on something other than 80.
Please consider an option to configure host ports for services in install.sh
Thanks for the great installer!
The text was updated successfully, but these errors were encountered: