Losing connection

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #494
    Anonymous
    Inactive

    Hi ther I am pretty new to firefly and I have a Roku M2000 on order that should arrive this afternoon (they seem to still be available in Auastralia).

    I plan on running mt-daap from my linux box which also acts as a firewall/router and a file server. Since i dont have the Roku just yet I am just setting up the linux daemon and testing it with itunes on a windows PC.The details of the linux machine are:

    Distro – fedora core 5
    NIC’s – eth0 connects to internet eth1 is LAN 192.168.0.1
    Using avahi daemon (although the RPM forced me to install howl, it is not enabled or running)

    The firewall is setup to allow all traffic from 192.168.0.0/24 looking at the firewall logs I dont see any rejections coming the LAN subnet, only hits on public addresses.

    Now I have installed mt-daapd from the stable RPM and compiled it and in both cases I end up with the same problem. The itunes client sees the mt-daapd server just fine and can stream MP3’s from it. However after near an hour the server is no longer seen on iTunes. Restarting iTunes does not fix this the only way to see the server again is to restart the mt-daapd daemon.

    On these forums I saw another person who had a similar problem which turned out to be a NIC that needed to be set to promiscous mode. I tried that this morning and within an hour I saw the server disappear in iTunes again.
    As a side note looking in the system logs I see that around the time the server disappered there is an entry “mt-daapd[8370] Client 192.168.0.99 disconnected”

    Any ideas?

    #5836
    rpedde
    Participant

    @anthony-td wrote:

    Any ideas?

    Server disappears and only reappears when restarting is almost always because multicast is firwalled. Specifically from 224.0.0.251 on port 5353.

    — Ron

    #5837
    Anonymous
    Inactive

    Ok i am using firestarter for the firewall.

    I have added the following to the user defined section of the firewall:

    $IPT -A INPUT -s 224.0.0.0/8 -d 0/0 -j ACCEPT
    $IPT -A INPUT -s 0/0 -d 224.0.0.0/8 -j ACCEPT
    $IPT -A OUTPUT -s 224.0.0.0/8 -d 0/0 -j ACCEPT
    $IPT -A OUTPUT -s 0/0 -d 224.0.0.0/8 -j ACCEPT

    These are pre applied when the firewall starts up, so they are on top of the input and output chains.

    Correct me if I am wrong but that should all all multicast both in and out of both networks?

    I have found that this problem reproduces itself within an hour and fifteen minutes so i still have 45 minutes to wait to see if this fixes it. Will let you know.

    #5838
    Anonymous
    Inactive

    Just confirmed that did not fix it – 1h15min later the server has disappeared from the client.

    I am now very quickly running out of options.

    #5839
    Anonymous
    Inactive

    Just to add some more info:

    It is not an hour and quartoer thing – that is how long it takes itunes to drop the server. I have ot have itunes up and running when I start the mtdaapd for iTunes to see it. If i immediatly restart iTunes it does not see the server.

    As an experiment I installed fedore on another PC i have and installed mt-daapd on that one and it works perfectly. I then installed my firewall tool (firestarter) and it did not work – however i did see hits on the firewall for the mDNS port. Enabling that port fixed it. On my main PC however i dont see hits on that port and the port is wode open.

    I am thinking of rebuilding the machine over the weekend with a spare drive and then incrementally installing everything.

    #5840
    rpedde
    Participant

    @anthony-td wrote:

    As an experiment I installed fedore on another PC i have and installed mt-daapd on that one and it works perfectly. I then installed my firewall tool (firestarter) and it did not work – however i did see hits on the firewall for the mDNS port. Enabling that port fixed it. On my main PC however i dont see hits on that port and the port is wode open.

    Not sure, but those symptoms are in line with firewall issues. Is it possible to uninstall firestarter on that box?

    #5841
    Anonymous
    Inactive

    Ok after formatting my linux installation and performing an entire reinstall I got it up and working. Then after installing firestarter it borke again. It would appear that no motter what rules you put into firestarter, when you enable the connection sharing (NAT) it breaks mt-daapd.

    I have rsorted to another firewall package (jay’s firewall) that has a primitive UI but works well anyway.

    Thanks for the help

    Anthony

    #5842
    eschoeller
    Participant

    I am having the same problem, however I haven’t been able to determine the amount of time mt-daapd stays visible.

    I find it hard to imagine that it is a firewall problem as I have this:

    -I INPUT 1 –source 0/0 –destination 0/0 –jump ACCEPT

    in my INPUT chain, So I am accepting all packets. mt-daapd disappears from itunes after a certain period of time, and restarting mt-daapd makes it reappear. I am using avahi, could this be the problem?

    #5843
    eschoeller
    Participant

    I am using mt-daapd with avahi and dbus support.

    I’m running on gentoo linux svn 1376. I was using a firewall (just a set of rules, nothing like shorewall etc) and ran into the same problem described above.

    I removed the firewall completely, aka, no rules and default policies of ACCEPT, and the connection still dropped.

    I started the server at 14:53, and it dissappeared at 16:02 – so this was an hour and 9 minutes as opposed to the hour and 15 mentioned above.

    I will continue to restart the server throughout the day and time when the connection drops.

    Besides the firewall, what else could cause this dropout?

    #5844
    rpedde
    Participant

    @eschoeller wrote:

    I am using mt-daapd with avahi and dbus support.

    I wonder if it is a howl-compat problem with avahi? Not to try and dodge blame, but just as a thought.

    I keep meaning ot add the native avahi interface, just haven’t done it. Maybe this is a push to make me do that.

    — Ron

    #5845
    eschoeller
    Participant

    It dropped off the face of the planet again.

    started server: 16:10
    mt-daaped dissapears from itunes: 17:21

    I was hoping that the times would be identical, this time it was an hour and 11 minutes.

    Short of adding static entries to the avahi dnsconfd service files, what else can I do?

    I was not running -d 9 at the time, so I have limited log info.

    #5846
    rpedde
    Participant

    @eschoeller wrote:

    I was hoping that the times would be identical, this time it was an hour and 11 minutes.

    It won’t be. It will depend on how the ttl of the pre-caching announcement that avahi makes, combined with how often the client (or any other client) does a dns-sd query for that machine.

    Short of adding static entries to the avahi dnsconfd service files, what else can I do?

    Forget short of… that’s the best test. If it sticks when added to statically, then we know the problem is either an avahi-compat problem, or a problem in the eventloop on the rendezvous code on the mt-daapd side.

    Either way, it’s a good test.

    #5847
    eschoeller
    Participant

    creating a static entry did not resolve the issue.
    To be more specific, the service appears in iTunes after mt-daapd is restarted, but if iTunes is closed and re-opened, it does not appear.
    Using either the static entry or the one provided by mt-daapd exhibit the same behavior.

    I’ve been here before with my last install, it always seems that it is a miracle when mDNS is working reliably.

    I believe this means that I still have a networking problem of some sort. I am running mt-daaped within a security context provided by linux-vserver. I realize this inevitably complicates things, but no other services seem to have issues with it, the security context has an interface alias assigned to it but no loopback. Some services need to explicity be told to bind to the alias IP, so they don’t try to bind to 0.0.0.0 or 127.0.0.1.

    Any thoughts?

    #5848
    rpedde
    Participant

    @eschoeller wrote:

    creating a static entry did not resolve the issue.
    To be more specific, the service appears in iTunes after mt-daapd is restarted, but if iTunes is closed and re-opened, it does not appear.

    That’s unquestionably a firewall issue. What happens is when the server registers, the mdns daemon pre-caches listening mdns clients by announcing startup. The mdns clients resolvers are supposed to cache that announcement. So when iTunes is open and you start mt-daapd, you see the pre-cache announcement.

    If you close iTunes and start iTunes, iTunes does an mdns-sd query. If it gets no response from the server, then it shows up nothing.

    Since it’s clear the server can send packets (since it shows up when it starts up), it must be that is doesn’t see the mdns-sd query. Usually that’s a firewall issue, since many firewalls forget that 224.0.0.0/4 are local addresses (certainly 224.0.0.0/24 are, anyway).

    I’ve been here before with my last install, it always seems that it is a miracle when mDNS is working reliably.

    Probably because everyone else uses broadcast resolutions since multicast seems so universally overlooked/broken.

    Some services need to explicity be told to bind to the alias IP, so they don’t try to bind to 0.0.0.0 or 127.0.0.1.

    I don’t think that’s the case here — it’s sending packets, so the networking can’t be totally broken.

    How does the networking work on that? Is the vserver interface a bridged interface, or something like that?

    #5849
    eschoeller
    Participant

    It’s basically an interface alias in linux. ie. eth0:1 etc. the virtual server context gets assigned as many aliases as it needs.

    I have no firewall rules at all. The default policies for all chains are ACCEPT. There isn’t much else I can do to remove the firewall, unless I recompile the kernel w/o iptables support at all.

    In the past I have just run an mdns server on the host O/S, not on the individual virtual server actually running mt-daapd, that worked but was not ideal. I thought maybe this time around i’d finally nail this.

    I’m removing netfilter from the kernel completely to see what happens.

Viewing 15 posts - 1 through 15 (of 18 total)
  • The forum ‘Setup Issues’ is closed to new topics and replies.