Page 1 of 2

Official Android App -- Cannot Access Server on Internal Net

PostPosted: Wed Jul 16, 2014 3:40 pm
by svet-am
I did some browsing through the forum but didn't see anyone talk about exactly what I'm seeing.

I'm using SubSonic 4.9 (build 3853) – January 23, 2014. It's the paid version. I'm running on CentOS 6.5 x86_64

It's been working *great* for over a year but now I'm running into some trouble with the official Android app that I cannot figure out. I have mine configured to use SSL and I can connect to it and use it without issue via the web both inside my network (either by IP address or local DNS lookup) or via the Internet via my public domain name.

When I use the official Android app, I configure the server by local IP address (in the 10.xxx.xxx.xxx range) and the app says "Connection OK" but when I click to the "library" tab it has repeated network errors and eventually gives up.

If I configure the app to use my public Internet fully qualified domain name, it works just fine. I can hit the Library tab and it sees all of my music and I can play just fine.

Is this a configuration issue or something that I need to change? It used to work until the most recent update to the Android app (sorry, don't have my tablet with me so I don't have the version of the Android app but it's the most recent on Google Play).

Re: Official Android App -- Cannot Access Server on Internal

PostPosted: Wed Jul 16, 2014 4:04 pm
by GJ51
Seems a bit strange ... perhaps your local ip address has been changed by DHCP?

Can you connect within your network using the same local address from another internal device?

If everything works from outside your network, then the server is obviously working inside your network, but not necessarily at the same internal ip address that it was running on previously. Strange I say, because this usually screws up any port forwarding that was set for the original internal ip.

In any case, you need to carefully inspect all addressing and port settings and verify that all is CORRECTLY entered in the app.

Re: Official Android App -- Cannot Access Server on Internal

PostPosted: Thu Jul 17, 2014 3:09 am
by svet-am
GJ51 wrote:Seems a bit strange ... perhaps your local ip address has been changed by DHCP?

Can you connect within your network using the same local address from another internal device?

If everything works from outside your network, then the server is obviously working inside your network, but not necessarily at the same internal ip address that it was running on previously. Strange I say, because this usually screws up any port forwarding that was set for the original internal ip.

In any case, you need to carefully inspect all addressing and port settings and verify that all is CORRECTLY entered in the app.


It's not a DHCP thing. Not only is the server on a static IP, I have the DNS lookup specified manually in my DD-WRT configuration.

I can connect with other apps like SubAir or via HTTP in a browser using the DNS name just fine. In fact, as I type this I'm using SubAir on my internal network via the server's internal DNS name.

It is *only* the Android app that doesn't work.

Re: Official Android App -- Cannot Access Server on Internal

PostPosted: Thu Jul 17, 2014 4:56 am
by GJ51
So if I understand correctly, you're saying that you are running the Android app connected internally on a wifi connection(?) and that you are using the same address and credentials that you can use on a desktop and that a desktop will connect just fine, but the Android app won't - using the identical address.

And again, to be clear, we are talking about using actual ip and port number addressing rather than DNS or redirection, that is, you are using an address like http://10.0.8.5:4040 or the address:port number of the SSL connection.

You are adding the port number, right?

I would start by disabling SSL to determine if there is a problem there, but other than that the next step would be to uninstall the app and re-install it. Yours is the first time I've seen a problem like this reported.

It just doesn't make sense that it would connect fine from outside the network and not connect internally using the actual ip:port# - most connection problems result from port forwarding or addressing errors or firewall issues, which are already solved if you can connect from outside.

Re: Official Android App -- Cannot Access Server on Internal

PostPosted: Thu Jul 17, 2014 12:12 pm
by svet-am
Yes, your understanding is correct.

In the Android app, one doesn't specify <url>/<ip_addr>:<port>, they are separate fields in the configuration. But, they are both correct.

I will try disabling SSL but that's a core bit of functionality in SubSonic that I really like using.

Also, like I said, I think something changed in the app recently because this *was* working until the most recent update to the app.

thanks again for at least making me feel a little less "stupid" about this.

Re: Official Android App -- Cannot Access Server on Internal

PostPosted: Thu Jul 17, 2014 2:08 pm
by GJ51
svet-am wrote:Yes, your understanding is correct.

In the Android app, one doesn't specify <url>/<ip_addr>:<port>, they are separate fields in the configuration. But, they are both correct.

I will try disabling SSL but that's a core bit of functionality in SubSonic that I really like using.

Also, like I said, I think something changed in the app recently because this *was* working until the most recent update to the app.

thanks again for at least making me feel a little less "stupid" about this.


NO - YOUR understanding is incorrect. You can indeed specify the ip:port as the url. That is what I've been asking you to do to test this issue.

In the app - define a new server. Call it Wifi Connection. Use http://INTERNAL_IP:Port# (eg. 192.168.1.50:4040) Then test.

Re: Official Android App -- Cannot Access Server on Internal

PostPosted: Thu Jul 17, 2014 2:21 pm
by svet-am
you're right -- I don't know *what* was thinking. sorry about that. :oops:

it's currently set to https://10.172.128.251:8443 -- this is the internal IP address of the machine. 8443 *is* the port I'm using for SSL.

When in the server configuraiton GUI, if I do "Test Connect" it says "Connection is OK". when I go back to the main screen in the APP and use that server as the desired one (I called it "Home (Internal)") and then tap the Library tab, I get the network errors.

I'm sorry I confused the issue with the detail about the server configuration GUI. It is configured the way you suggested but it's still not working.

Is there a limit in the android app where it can't have more than one SSL server configured?

Re: Official Android App -- Cannot Access Server on Internal

PostPosted: Thu Jul 17, 2014 2:41 pm
by GJ51
No - there isn't any limit and if your getting a connection test without errors then it should be working. I just did a test on my phone - direct to the internal ip without any problem. I think I probably have 10 or so sites defined in my app.

Two points: If you are going direct to the SSL port you have to be sure that you usr https: in the address.

So according to your post above it should work.

Next I would try the http port connection. Just delete the s and change the port # to the http port.

If neither work then it's probably time to delete and re-install the app.

I've tested the Subsonic app on my server using both methods with no issues.

I can't vouch for any license issues when you do this. I have seen reports of some users having issues.

Finally, if you are a steady Subsonic user and would like a more refined app, I would suggest taking a look at Dsub. Very nice app for Subsonic which I use more often than the Subsonic app.

Let me know how it goes for you.

Re: Official Android App -- Cannot Access Server on Internal

PostPosted: Fri Jul 18, 2014 2:20 am
by svet-am
I just had a chance to check the app with standard HTTP on my local network and that doesn't work, either.

I changed the host to http://10.172.128.251:4040

The connection test still says "Connection is OK" but switching to the library view simply times out.

I went one step further and formatted (from the recovery) the Android device and restored from scratch -- it's still doing the same thing after it pushed the updated SubSonic app from the market.

All of my other applications -- web browser, SubAir, Periscope, etc. work just fine in either configuration (HTTP or HTTPS; local or Internet) so I think it *must* be related to the official Android app.

I will take your advice and give DSub a try.

Re: Official Android App -- Cannot Access Server on Internal

PostPosted: Fri Jul 18, 2014 3:36 am
by daneren2005
I doubt it will make much difference as the connection logic is the same between DSub and Subsonic and hasn't changed in about 3 years.

Sent from my Nexus 5 using Tapatalk

Re: Official Android App -- Cannot Access Server on Internal

PostPosted: Fri Jul 18, 2014 3:49 am
by GJ51
Yeah - it's a conundrum - never seen this before.

Hard to isolate as to whether it's the app or the server. Seems very odd that everything works on an external connection but fails when connected inside.

I wonder if does the same thing when connected to a different site over wifi, like the Subsonic demo site.

Re: Official Android App -- Cannot Access Server on Internal

PostPosted: Fri Jul 18, 2014 4:00 pm
by svet-am
DSub had *exactly* the same behavior so now I'm confused.

I don't know what about the server would be "wrong" as it's only the Android app that has trouble. As I've said, other apps (eg, Subair and Periscope) work fine on the internal address.

Re: Official Android App -- Cannot Access Server on Internal

PostPosted: Fri Jul 18, 2014 4:25 pm
by daneren2005
svet-am wrote:DSub had *exactly* the same behavior so now I'm confused.

I don't know what about the server would be "wrong" as it's only the Android app that has trouble. As I've said, other apps (eg, Subair and Periscope) work fine on the internal address.

Can you open the same address on your browser on your phone? My guess is that it is a Android problem (or more specifically, the version of Android on your phone), and not an app problem. The app does some funny logic for https addresses to work around a standard connection not working with self-signed certificates, but for a standard http connection it does nothing but rely on the systems libraries to handle everything.

Re: Official Android App -- Cannot Access Server on Internal

PostPosted: Fri Jul 18, 2014 4:28 pm
by svet-am
daneren2005 wrote:Can you open the same address on your browser on your phone? My guess is that it is a Android problem (or more specifically, the version of Android on your phone), and not an app problem. The app does some funny logic for https addresses to work around a standard connection not working with self-signed certificates, but for a standard http connection it does nothing but rely on the systems libraries to handle everything.


Yes, I can. I can open the browser and go right to the page via the Android browser.

Re: Official Android App -- Cannot Access Server on Internal

PostPosted: Fri Jul 18, 2014 5:26 pm
by GJ51
svet-am wrote:
GJ51 wrote:Seems a bit strange ... perhaps your local ip address has been changed by DHCP?

Can you connect within your network using the same local address from another internal device?

If everything works from outside your network, then the server is obviously working inside your network, but not necessarily at the same internal ip address that it was running on previously. Strange I say, because this usually screws up any port forwarding that was set for the original internal ip.

In any case, you need to carefully inspect all addressing and port settings and verify that all is CORRECTLY entered in the app.


It's not a DHCP thing. Not only is the server on a static IP, I have the DNS lookup specified manually in my DD-WRT configuration.

I can connect with other apps like SubAir or via HTTP in a browser using the DNS name just fine. In fact, as I type this I'm using SubAir on my internal network via the server's internal DNS name.

It is *only* the Android app that doesn't work.


I wondered about this when you posted it. That was why I wanted to bypass the router by using the actual ip address. Is it possible you have something out of the ordinary on your router that might cause problems. There shouldn't have been anything needed to manually configure a DNS entry in the router. Subsonic doesn't use DNS to connect to the vanity name, it uses redirection.

I would also suggest trying to access another Subsonic server while your inside your home network on wifi to see if you have issues. You are welcome to use the guest account on my server:

http://mgp.subsonic.org

use guest to log on for both U&P

If that works, then the problem has to be either the router or the server.

Final suggestion: I would delete the current player on the server associated with your phone and force Subsonic to auto create a new one the next time you log on.