mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.
http://mixxx.org
Other
4.51k stars 1.28k forks source link

localhost does not work as broadcasting host #6792

Closed mixxxbot closed 2 years ago

mixxxbot commented 2 years ago

Reported by: xorik Date: 2012-12-18T21:09:07Z Status: Expired Importance: Medium Launchpad Issue: lp1091852 Tags: broadcast


Hi! I think connection to icecast2 server was broken some time ago in trunk (I use lp:mixxx).

1) I start icecast2 server on my gento (64 bit)
2) Try to connect with correct params to localhost:8000 (mp3 128, correct mountpoint, login and pass) and got this:
Debug [EngineSideChain 1]: EngineShoutcast: updating from preferences 
Debug [EngineSideChain 1]: Couldn't find shoutcast metadata codec for codec: ""  defaulting to ISO-8859-1. 
Debug [EngineSideChain 1]: Loaded libmp3lame version  3.99.5 
Debug [EngineSideChain 1]: Shoutcast failed connect. Failures: 1 
Debug [EngineSideChain 1]: Shoutcast failed connect. Failures: 2 
Debug [EngineSideChain 1]: Shoutcast failed connect. Failures: 3 
Warning [EngineSideChain 1]: Shoutcast error:  "Please check your connection to the Internet and verify that your username and password are correct."

3) If I try another soft to connect with icecast2 with same params (server, login, pass, sound encoding) (e.g. I tryed mpd), all done correct

I have icecast-2.3.3. I build mixxx with just "scons" in source dir.

mixxxbot commented 2 years ago

Commented by: xorik Date: 2012-12-19T19:50:13Z


Ok, find way to connect to icecast server, just replace "localhost" with "127.0.0.1". I think this is not very user-friendly... Anyway, bug report is invalid and may be closed

mixxxbot commented 2 years ago

Commented by: esbrandt Date: 2012-12-21T08:17:02Z


<quote> 
You can enter the host name either as an IP address or an URL.
</quote> 
http://mixxx.org/manual/latest/chapters/livebroadcasting.html#icecast

It would be preferable if this would actually work. Does Mixxx need the "http://" protocol hint to recognize a valid URL? I agree that allowing just "localhost" would be more user-friendly.

Additionally we should add some specific examples to this part of the manual.

mixxxbot commented 2 years ago

Commented by: rryan Date: 2013-01-30T04:36:55Z


The manual is wrong! You can't input the name as a URL. If you put http://localhost it will fail. However, putting "localhost" should work. I fixed the manual.

mixxxbot commented 2 years ago

Commented by: rryan Date: 2013-01-30T04:38:04Z


xorik -- could you paste the result of /etc/hosts ? I think that some distros are putting 127.0.1.1 as localhost in /etc/hosts for some reason. I'm not sure why that wouldn't work with icecast2 but it's important to note that localhost sometimes does not resolve to 127.0.0.1 on some distros.

mixxxbot commented 2 years ago

Commented by: rryan Date: 2013-01-30T04:42:09Z


FWIW I've seen people in #mixxx either confused about hte lack of support for URLs or having issues with 'localhost' not working.

mixxxbot commented 2 years ago

Commented by: xorik Date: 2013-01-30T05:05:43Z


My /etc/hosts (without comments):

127.0.0.1 notebook localhost.localdomain localhost ::1 notebook localhost6.localdomain6 localhost6 ::1 localhost

mixxxbot commented 2 years ago

Commented by: xorik Date: 2013-01-30T05:06:46Z


$ ping localhost
PING notebook (127.0.0.1) 56(84) bytes of data.
64 bytes from notebook (127.0.0.1): icmp_seq=1 ttl=64 time=0.069 ms
mixxxbot commented 2 years ago

Commented by: rryan Date: 2014-03-15T00:05:34Z


I realized I could reproduce this on my macbook.

My /etc/hosts has this weird entry:

fe80::1%lo0 localhost

libshout was resolving localhost to this entry which was blocking the connection.

mixxxbot commented 2 years ago

Commented by: rryan Date: 2014-03-15T00:07:01Z


Xorik -- in your case it's quite likely libshout was resolving localhost to ::1 instead of 127.0.0.1. Is it possible that your icecast bind-host was 127.0.0.1? In that case libshout would have failed to connect to ::1 because icecast was not listening on that address.

mixxxbot commented 2 years ago

Commented by: ywwg Date: 2014-05-14T22:26:19Z


update?

mixxxbot commented 2 years ago

Commented by: esbrandt Date: 2014-09-09T13:34:49Z


Any news?

mixxxbot commented 2 years ago

Commented by: xorik Date: 2014-09-09T13:47:02Z


Sorry guys, can't check now. Also this bug is not so important for me now, I'll check it later. Thank you

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2017-03-31T06:19:23Z


I free this up for possible GSoC students

mixxxbot commented 2 years ago

Commented by: vicweeks Date: 2017-04-02T01:41:32Z


I'm a potential GSoC student assigned to look into this bug.

After thorough investigation into the issue, and testing with my own broadcasting servers, I have concluded that more information about this specific case is needed.

In particular, I believe this is not so much an issue with the Mixxx implementation of server connection. For instance, whilst testing I also ran into the same error when using localhost to connect to the server. Once I verified that the icecast server was up and running, I checked the other parameters. The issue for me was using the incorrect login/password. Not sure if this is the same for the OP, but I was entering my own admin login/password, as opposed to the specific 'sources' login/password that is set in icecast.xml. Once that was cleared up I was able to broadcast without a problem.

Hope this helps.

mixxxbot commented 2 years ago

Commented by: JosepMaJAZ Date: 2017-04-02T10:35:13Z


Ok, this is the result of my tests:

Windows, Mixxx 2.1 alpha, sever icecast 2 on localhost, connects and works as expected, using "localhost" as the address. guest Linux on a virtual machine, Mixxx 2.0, server icecast on the windows host, connects and works as expected, using the IP address.

Generally, I would say there is no problem, and in fact, earlier in the post it seemed that the bug was not really a bug after all.

What could be an improvement is the handling of addresses. As said also in this post, sometimes users add the "http://" to the host name, and then that does not resolve to a valid address and it cannot connect. It would be an improvement to detect the existence of a protocol address in the text box and strip it out from the text.

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2017-04-03T07:18:32Z


Does this mean we can mark this bug as invalid and open a new one that contains your findings / improvement ideas?

mixxxbot commented 2 years ago

Commented by: xorik Date: 2017-04-03T07:42:41Z


Hi guys. I'm an author of the bug. Unfortunately I can't test it right now. I could try to check status a bit later, maybe in a week. Since the bug is minor, you could close it.

mixxxbot commented 2 years ago

Commented by: janitor Date: 2018-11-21T04:17:33Z


[Expired for Mixxx because there has been no activity for 60 days.]

mixxxbot commented 2 years ago

Issue closed with status Expired.