Official Android App -- Cannot Access Server on Internal Net

Third-party modifications and add-ons, Apps and Clients

Moderator: moderators

Official Android App -- Cannot Access Server on Internal Net

Postby svet-am » Wed Jul 16, 2014 3:40 pm

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).
svet-am
 
Posts: 12
Joined: Wed Jul 16, 2014 3:33 pm

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

Postby GJ51 » Wed Jul 16, 2014 4:04 pm

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.
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

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

Postby svet-am » Thu Jul 17, 2014 3:09 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.
svet-am
 
Posts: 12
Joined: Wed Jul 16, 2014 3:33 pm

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

Postby GJ51 » Thu Jul 17, 2014 4:56 am

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.
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

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

Postby svet-am » Thu Jul 17, 2014 12:12 pm

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.
svet-am
 
Posts: 12
Joined: Wed Jul 16, 2014 3:33 pm

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

Postby GJ51 » Thu Jul 17, 2014 2:08 pm

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.
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

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

Postby svet-am » Thu Jul 17, 2014 2:21 pm

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?
svet-am
 
Posts: 12
Joined: Wed Jul 16, 2014 3:33 pm

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

Postby GJ51 » Thu Jul 17, 2014 2:41 pm

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.
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

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

Postby svet-am » Fri Jul 18, 2014 2:20 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.
svet-am
 
Posts: 12
Joined: Wed Jul 16, 2014 3:33 pm

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

Postby daneren2005 » Fri Jul 18, 2014 3:36 am

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
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

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

Postby GJ51 » Fri Jul 18, 2014 3:49 am

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.
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

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

Postby svet-am » Fri Jul 18, 2014 4:00 pm

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.
svet-am
 
Posts: 12
Joined: Wed Jul 16, 2014 3:33 pm

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

Postby daneren2005 » Fri Jul 18, 2014 4:25 pm

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.
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

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

Postby svet-am » Fri Jul 18, 2014 4:28 pm

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.
svet-am
 
Posts: 12
Joined: Wed Jul 16, 2014 3:33 pm

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

Postby GJ51 » Fri Jul 18, 2014 5:26 pm

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.
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 Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 15 guests