Page 1 of 1

Streaming interruption problem

PostPosted: Wed Jun 06, 2012 3:13 pm
by DaveWut
Hi there,

Once again, I would like to thanks the creator of subsonic, this is a wonderful creation and it is highly useful for me. Since the last bug I reported (viewtopic.php?f=5&t=8894), I made a donation and I found another problem. So yeah, I'm here to talk about it.

Since the first time I installed Subsonic on my server, I had always used a SSL connection to my server. On that time, I used the port 442 to listen, stream and watch my stuff on my server. It has always worked and all streams has never fail to me, it was fluid. Recently, I tried something new... and it causes a huge problem when streaming. I hope you guys will be able to help me. Let me explain in details what's going on.

So, as I said, I tried something new on my server. Apache2 already use port 80 and 443 for is own use, so I was unable to use a standard port for subsonic. This problem prevented me to listen my music at my job, because the port 442 is blocked by default. As you guys know, companies often open the standard ports 80 and 443 for browsing purposes, it is necessary, so I decided to look for a solution to my problem without compromising my apache2 server. So I found this subject on your forum : viewtopic.php?t=8525 and I applied what it said to my server. It was a success, the proxy successfully worked. I force a SSL connection through Internet and then, locally, redirect traffic on subsonic on port 442 under the http protocol.

Well now you're wondering what's the problem? Well, there is it: Streaming is damn slow and often never finish to completely load what you're listening. This behavior prevents me to listen music without being interupted. On the top of that, if the stream stops, it forever stops, you need to reclick on the "play" button to have a CHANCE to listen to the complete track without interuption. I tried a lot of things, search a lot for my problem and I never found what could solve this damn thing.

So well, enough explaining what's going on, here's a lot of information that will help us to solve the problem.
1 - First of all, here's the apache2 configuration:
Code: Select all
<VirtualHost *:80>
   ServerName music.myhost.ca
   ServerAlias music.myhost.ca
   ErrorLog /var/log/apache2/subsonic-error.log
   CustomLog /var/log/apache2/subsonic-access.log combined

   DocumentRoot /var/Server/Apache2/www_null
</VirtualHost>

# music.myhost.ca (ssl)
<VirtualHost *:443>
  ServerName music.myhost.ca

  DocumentRoot /var/Server/Apache2/www_empty
  SSLProxyEngine On
  SSLEngine on
  SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
  SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
# SSLCertificateChainFile /etc/ssl/example.com.cacert.pem

  <IfModule mod_proxy.c>
     ProxyRequests Off
     ProxyPass / http://localhost:442/
     ProxyPassReverse / http://localhost:442/
  </IfModule>
</VirtualHost>

2 - When using Wireshark to catch all packets between my local host and the subsonic server, we can see a shit load of TCP packet errors. I wonder if there's a reason or if this is normal.
3 - At first, when the proxy was configured, I blocked the port 442 from the external network. It certainly force people to use https://music.myhost.ca/ instead of http://myhost.ca:442, but it was to damn unstable. So I opened the port and then the streaming was more bearable. At the same time, I made a second test... I compared the streaming with both addresses, I figured out that streaming directly from the source address (myhost.ca:442) was perfectly fluid.
4 - Downloading my music has the SAME effects. When I start downloading, the first 1.6 - 1.8 MB are downloaded and then BAM, it stops!
5 - I figured out the birate constantly changes by itself when streaming... I wonder why.

If you guys need to do tests on my server, please PM me, I will be pleased to give you credentials and the address.

Thanks a lot!
Dave

Re: Streaming interruption problem

PostPosted: Wed Jun 06, 2012 4:01 pm
by BKKKPewsey
I am not even going to attempt to help as this is way above my pay scale
but it might be helpful to post the output from the Wireshark log which might give a clue.
:mrgreen:

Re: Streaming interruption problem

PostPosted: Thu Jun 07, 2012 12:36 pm
by DaveWut
Hi,

Once I'll have the time I'll post the wireshark logs. I need to test it in a distant network to make my test fully legit, so I'm gonna ask one of my friends if I can remotely connect on their computer.
In the same way, is there's a little possibility the server isn't working correctly because jetty is too much unstable?

Thanks!
Dave

Re: Streaming interruption problem

PostPosted: Fri Jun 29, 2012 12:50 am
by DaveWut
Hi,

Here's finally my Wireshark logs. These logs are already filtered with both the server IP and the local IP address. I can't really understand what these logs means, but well, this is really the last thing I can provide if we want to be able to find the problem. You can find the logs at this address: http://davewut.ca/public/FilteredStreamPackets.zip

In these logs, the local IP address is 192.168.0.194 (client) and the external IP address is 174.88.245.97 (server). If you want to make sure you only see these in the logs, you can apply this filter: ip.addr == 192.168.0.194 && ip.addr == 174.88.245.97.

I hope you guys can help me!
Thank you very much!

Re: Streaming interruption problem

PostPosted: Fri Jun 29, 2012 5:13 am
by GJ51
I must admit up front that by the time I decide to post in a thread like this it's because I'm totally mystified by great lengths some users go to with the overcomplexification process. I also confess that I have no experience with the double reverse proxy with a half-gainer and a full twist process.

in any event, my distillation of the problem to it's simplest form is that you have a server, hosting Subsonic somewhere, presumably in your domicile, that you can't maintain a connection to when you're at your workplace.

Two simple qusstions come to mind that might be helpful:

When you're at work have you ever connected to another Subsonic server that is known to otherwise work? Does the known "good" server exhibit the same behavior as yours?

When you connect to your server from a different environment, still outside your network, do you get the same problem or does the issue disappear?

I would recommend trying to connect to the Subsonic demo server while at work to see if it exhibits the same problems. You are also welcome to test caonnecting to my server if you'd like. Just send me a PM for creds if that will help.

You might also look at:

viewtopic.php?f=6&t=9747

Re: Streaming interruption problem

PostPosted: Fri Jun 29, 2012 1:21 pm
by DaveWut
Hi GJ51,

I've sent you credentials to my subsonic server, so you can try it and check if there's anything wrong. Your first question made me thing indeed if there's any problems elsewhere from my work or at home. I often use Subsonic there and no where else. In rare cases, I will use it somewhere else, but as I remember, the proxy wasn't working at that time. At home, subsonic works flawlessly... but well, I'm locally connected to it, so its speed isn't limited by my Internet connection. I have indeed a dedicated server, working on Ubuntu 12.04 LTS x64 edition and it's also connected to a decent Internet connection: 25 Mb/sec down | 7 Mb/sec up.

As I already wrote... I thing, before I implemented the proxy thing, everything was working without any problems. The thing is, I was limited at work, but I was still able to access it through a specific way. On another perspective, I wanted to allow some of my friends to access it easily, because writing a port in the address bar isn't user friendly at all.

So I tested my server again here at work, and there's still the same problem... oh and wow, I just found that my problem affects the web pages itself while loading. I tried your demo server, and nope, I can't see any issues...

For the topic you just sent me, yes this is one of the example I used to create my own proxy at home with the help of apache2. As you can see in my first message in this topic, my apache configuration for the virtual host only serves as a proxy, but also force a SSL connection with the server. I wonder if subsonic loves this. I want to force a SSL connection because LDAP usernames and passwords are passed in clear through http and I don't like this at all.

Please take some time to try out my server and compare it to yours and the demo server. I also would like to try yours when I'm at work, it would be interesting.
Thanks for your help! It's greatly appreciated!

Dave