Cannot access Subsonic over Internet of on Android app.

Need help? Post your questions here.

Moderator: moderators

Cannot access Subsonic over Internet of on Android app.

Postby garyjmellor » Sun May 22, 2011 12:56 pm

Hi all,

Problem Description: I am unable to listen to Subsonic over the Internet e.g. at work or using the Android app.

Troubleshooting Steps: I registered my server using <server_name>.subsonic.org and made sure to pay for this using the donate feature. I have also ensured that port forwarding is working correctly (both by manual configuration and by letting Subsonic automatically update my router using UPnP). When trying to access my server over the Internet from, say, work the request to http://<server_name>.subsonic.org effectively gives me page not found. I had a firewall on my server which I turned off temporarily and this was not the issue either. On the Android app, all I get is either a network error and it attempts to reconnect 4 times or else it connects and simply tells me that there is no music - which there is since I can see it when I connect locally.

Playback Application and version: I am streaming using the native Subsonic web interface.

Subsonic Version: 4.4 (build 2169) – February 6, 2011.

Server Version: jetty-6.1.x, java 1.6.0_22, Linux (28.9 MB / 88.9 MB)

Android platform: Gingerbread 2.3.3 on HTC Desire HD running Subsonic v2.7.

Hardware Platform: I'm using a Linux Ubuntu 11.04 server (Natty) and mounting a NAS drive. The NAS drive is a Western Digitial My Book 1TB.

Java Memory Limit: SUBSONIC_ARGS="--max-memory=100"

Problem Filename: N/A

Output from ffmpeg -i: N/A

Log file: Log file reports no errors. It does report "No UPnP router found" which is correct as I manually configured port forwarding after the auto config didn't work i.e. couldn't access Subsonic over the Internet.

Another curious thing, if I go to the Home page of Subsonic and click 'Configure Network Settings' I see the Network page. I disabled the 'Automatically configure you router...' option. If I leave the 'Access your server over the Internet...' setting at http://<server_name>.subsonic.org and click 'Save' a message regarding successful registration is shown but get a connection timeout too.

Any help to sort this out would be gratefully received as I'm wanting to use this as a replacement for Spotify now that they have effectively ended free listening.

Best regards

Gary
garyjmellor
 
Posts: 21
Joined: Sun May 22, 2011 12:33 pm

Postby GJ51 » Sun May 22, 2011 1:44 pm

Most problems are due to improper setup on the router. Setting a fixed internal ip address for the server and proper port forwarding rules on the router are essential for long term stability.

Never use port 80 or 443 - ISP's often use or block them and these are also the default ports on WHS for the remote login page. 8080,8081, work fine. 808X always works. I've seen others use different port numbers that have caused install failures.

READ: http://monroeworld.com/android/subsonic/ This is the Windows tutorial but most of the concepts apply to any setup. Specific setup instructions for other Operating Systems are available in the Tutorials section. http://forum.subsonic.org/forum/viewforum.php?f=6 and on the Subsonic website at http://www.subsonic.org/pages/installation.jsp

In Subsonic Settings/Network - UNCHECK " Automatically configure your router to allow incoming connections to Subsonic (using UPnP or NAT-PMP port forwarding)." make sure to hit the SAVE button, you may have to scroll down to see it depending on your screen size. UPnP or Plug & Pray works sometimes, but not very often and you're better off learning what's going on anyway. You're dipping your toe into the network mgmt. thing anyway, might as well learn what's going on as home networks don't get simpler as time goes on. As your network gets more complex, you're going to have to learn this stuff! No time like the present.

Manually assign a fixed intenal IP and static route to your server at the upper end of the address range of the router, out of the way of DHCP, e.g. 192.168.1.254

Set up your router manually. uPNP might work, but most often it doesn't. Learing how to do it will be a skill you'll love having as your network grows.

Check the Subsonic Control Panel to make sure it's using the right port you're going to use. I typically use 8080 - 440, 8081 - 441, etc. Skip 8083 - 443 to avoid conflicts with WHS.

Set up port forwarding in your router to direct traffic on the selected port to your server. Consult your router documentation to do this, they are all a bit different.

Learn your external IP address assigned by your ISP. Go to http://www.canyouseeme.org/ enter your SS port number and click the Check box to be sure the Subsonic port is open.

Test your setup by entering your external IP:port# to see if it connects. e.g. http://98.117.185.5:8084/ If it works, you're good to go.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby garyjmellor » Sun May 22, 2011 1:55 pm

Thanks for the reply. I have a manually assigned IP for my server 192.168.0.3 (forgot to mention that in my first post). I just checked the link you sent and port 80 is blocked but 4040 is not. How do I tell Subsonic to use a different port other than 80 please? Also, what is WHS?
garyjmellor
 
Posts: 21
Joined: Sun May 22, 2011 12:33 pm

Postby GJ51 » Sun May 22, 2011 4:19 pm

I'm not sure about Linix instalations as I only use Windows, but on the Windows desktop of the host computer there is an icon in the system tray that I can right-click and open the SS Control Panel. Once in the Control Panel the port settings are on the Settings tab.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Employer firewall issue?

Postby tvlenthe » Sun May 22, 2011 4:37 pm

I've found that my employer blocks most ports except 80 (the normal HTTP port). One way to check if this is your issue is to use the browser on the server machine to access the full internet address (i.e. your_name.subsonic.org:4040) and see whether or not that works. If it does, the issue is with your company's firewall, not your setup. If all else fails, you could change your local port to 80 which should pass through your corporate firewall.
tvlenthe
 
Posts: 3
Joined: Sun May 22, 2011 3:33 pm

Postby itsthesource » Sun May 22, 2011 9:20 pm

To change the port for ubuntu linux you'll want to update /etc/default/subsonic.

Enter subsonic --help for a list of valid arguments. Also don't forget to update your iptables & port forwarding on your router when you assign it to a new port.
User avatar
itsthesource
 
Posts: 22
Joined: Thu Jan 06, 2011 2:30 am
Location: Richmond, VA

Postby garyjmellor » Mon May 23, 2011 7:50 am

Thanks for all the replies folks. I changed the port number to 8081 and still couldn't get this working despite changing everything accordingly for port fowarding. I'm not using HTTPS until I can get HTTP working. Can someone tell me the correlation between Subsonic using 4040 and setting up 8081 up for port fowarding as this isn't clear to me?
garyjmellor
 
Posts: 21
Joined: Sun May 22, 2011 12:33 pm

Postby GJ51 » Mon May 23, 2011 2:03 pm

It's just a matter of choice. 808X are commonly used port assignments and have always worked for me, which is why I recommend using this range of addresses for websites. If you are forwarding 8081 then you must change SS to listen on the same port. If you configure to use 8081, then 4040 will NOT be used. On the other hand, if you have SS configured to use 4040, then it is 4040 that you should forward to the host system.

Which port yu decide to use is just a matter of choice, but the port assignment must be consistent.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby garyjmellor » Mon May 23, 2011 2:33 pm

Hi and thanks again for posting back. I used 8081 and still cannot get access outside my home network. I don't geddit - I'm a software tester by trade and I'm familiar with networking (I've got port forwarding working before for other services). This one has me stumped but I'll stick at it. I'm going to post back later this evening if I get chance to work on it some more...before my wife says I'm neglecting her ;o)
garyjmellor
 
Posts: 21
Joined: Sun May 22, 2011 12:33 pm

Postby GJ51 » Mon May 23, 2011 3:04 pm

Go to http://www.canyouseeme.org/ enter your SS port number and click the Check box to be sure the Subsonic port is open.


IF you can open the local instance on the host PC, then it's almost always in setting up the router properly. Every router is different and some are really quircky in the way they want to be set up to forward a port correctly, My Verizon Westell is really obtuse, and even after using it for 2 yrs. I still make mistakes where I think I have something entered correctly, but it just doesn't work right. Then I go back and change one little thing and everything is OK. Sometimes, it's just more of an "art" than a science.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby garyjmellor » Mon May 23, 2011 3:20 pm

I'm sure absolutely right. I setup Subsonic on my router as a serrive using 8081 (my new port as per your recommendation). I then set this service up as a rule on my firewall so it will let request through. I then set up port forwarding. No cigar. I've not configured port forwarding on this particular router before but I used canyouseeme and it reports that it can see the service on 8081 - I just can't access it (except internally)! Bah! I'm not even sure I need to set the firewall up or even set Subsonic up as a custom service - it was just a hunch that I'd need to do that. I also followed the manual instructions for configuring my specific router manually step-by-step and to the letter. It definitely lies at the router I'm sure of it but I'm b*ggered if I know whereabouts. I'm going to take a fresh look at it this evening and hopefully with a refreshed brain I might just instantly realise what the error is.
garyjmellor
 
Posts: 21
Joined: Sun May 22, 2011 12:33 pm

Postby garyjmellor » Mon May 23, 2011 3:24 pm

As an aside, do you think the reason (once I've eliminated the current network issue) of the Android app reporting 'No music' (even internally) is due to me using NAS to store my music. Several topics on the forums point to this being a bit hit and miss. I specifically don't want to store my music on the Ubuntu Server so as to minimise the impact a single point of failure would cause if it were to go belly up and I don't want to negate this risk by backing the entire server up to NAS. I like being able to do quick rebuilds of my Ubuntu Server and Ubuntu Desktop so I keep both as light as possible so I can do a complete rebuild in around an hour with updates.
garyjmellor
 
Posts: 21
Joined: Sun May 22, 2011 12:33 pm

Postby GJ51 » Mon May 23, 2011 4:57 pm

I've seen a few instances where a router reboot fixed all. I'm just a Windows guy, but I've always just used the standard SS install to get everything up and running. I've got no idea about setting up custom services.

NAS storage does often create both access and performance issues. It can be done, but the first issue is giving SS access rights to the share on the NAS and with Windows, there have been performance issues with some file formats used by the NAS that have to be translated for use with NTFS.

I've got a lot of network storage capacity and I have SS set up to access public shares. All was working well until I decided it was time to upgrade my network and Server to Active Directory. Oh well, back to the drawing board as SS is no longer accessing the shares that it did before implementing AD. It's going to be an interesting week of troubleshooting, but at least we fixed all our Sharepoint issues. The SS fix should go easier and we hope to be fully back up tonight.

It's always something ...
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby garyjmellor » Mon May 23, 2011 9:21 pm

Hi again, GaryJ

I've now got it working. Hurrah! Well, accessing it via the web externally from another machine anway. I rebuilt my server for fun (I know, I lead such a sheltered existence). I've kept everything at the default and followed your instructions for turning off the UPnP. I made double sure I got port forwarding set up - I think before instead of having just TCP selected I selected TCP/UDP before - maybe that's what the issue was? I still cannot get the Android app working. Testing the connection from within the app works fine - it just doesn't find any music. I've got my NAS mounted at boot time using cifs in Linux and that works fine. It seems that maybe there is some latency in accessing the NAS when using Android as the client. When I have a bit more time I'll try storing a track or two locally on the server and see if they're picked up. That's for another day though. For now, I'll be happy listening to my music at work and waving farewell to Spotify. Thanks very much for your help. One other question: on the portforwarding website it states "Subsonic requires you to forward the 80,4040 ports." - why does it require port 80? Surely it only needs 4040? If I use canyouseeme and put in port 80 I get 'connection refused' presumably my ISP has this blocked. Why then, if this fails can I now access my Subsonic content externally? If test 4040 in the same manner I get 'success'. I thought I understood port forwarding but evidently I have some learning left. If you don't mind, can you explain the significance of port 80 in this setup and it's relationship to 4040? I'd really appreciate it. I also need to spend a bit of time securing my setup too but that'll keep until another day as well. Thanks once again for you help, it's been great. I'm switching my systems off now but if you reply I'll pick it up in the morning (GMT)

Regards

Gary
garyjmellor
 
Posts: 21
Joined: Sun May 22, 2011 12:33 pm

Postby GJ51 » Tue May 24, 2011 2:53 am

You are right that you don't need to use UDP. I don't know if it would cause problems, but you don't need it to get SS running, so I always advise just setting up TCP. In all honesty, discussing network configuration, routers and port forwarding can get VERY confusing. It's for that reason that I mainly try to confine my suggestions to what I know works consistently for SS. Even router manufacturers use confusing language that is often not consisten when they talk about static ip assignmernts, static routes, and the way they design the interface tables for the routers almost always varies from mfgr to mfgr. Because of the way everyone uses varying terms for the various routing functions, and the fact that no two routers are alike, it is more important to get a good conceptual understanding of what is happening on the network, rather than getting to involved in the individual details of every network and router configuration available.

Most gateway devices provided by ISP's are designed to use port 80 for internet traffic. For that reason, many ISP's will block port 80 from being used for server traffic as they don't want residential networks being used in the same way that a business network would be used. Hence, no static ip for most residential plans.

So basically when two computers connect they usually go through port 80 to the router. If the url is requesting a particular port on a network (SS on 4040) the router uses the entry in the port forward table to send the request to the ip address of the host pc that has 4040 open where SS is waiting to respond and answer the request. Thus 80 and 4040 are involved in the sense that the request for 4040 comes through 80 initially. If anything prevents the request from reaching it's destination, there is failure, be it from the port forwarding being set up wrong, the firewall on the pc not being open, or if SS isn't on the right port. The star have to be properly aligned if it's going to work, one link not in the chain leads to fail.

Not seeing any music on Android app:

Subsonic likes everything to be in folders. I recommend all libraries be organized as follows:

X:\Music\Artist\Album\Tracks

If you just have tracks in a root folder as defined in the SS settings, tha\e Android app will not display the tracks. Check your Android phone on the demo server to be sure it is working properly.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Next

Return to Help

Who is online

Users browsing this forum: No registered users and 11 guests