android client won't connect

Need help? Post your questions here.

Moderator: moderators

android client won't connect

Postby texaganian » Fri Jan 14, 2011 3:46 am

Just installed (& registered) a subsonic server. Everything is rosy EXCEPT my android client won't connect.

I can connect fine from browsers on PCs or a browser on my droid but when I configure the android client and use the Test Connection function it returns a dialog which just says "A network error occurred".

The only out of the ordinary thing is that the server is running on a non-standard (but still unprivileged) port.

Is there any log or anything to get more details on the failure?
texaganian
 
Posts: 10
Joined: Fri Jan 14, 2011 3:38 am

Postby texaganian » Fri Jan 14, 2011 10:36 pm

Turns out to be two problems... the Subair client won't connect either.

Anybody have any suggestions?
texaganian
 
Posts: 10
Joined: Fri Jan 14, 2011 3:38 am

Postby texaganian » Sat Jan 15, 2011 8:20 pm

This is driving me absolutely nuts. Browser connections work absolutely fine but nothing I do can convince the Android client (or Subair) to connect.

I'm running subsonic on port 4202 on a CentOS 5.5 virtual machine with a local IPTables firewall on my internal network. I have a static public IP address and my routing is done by a pair of OpenBSD virtual machines running PF.

The necessary PF filter and redirection rules are in place on the routers. The necessary IPTables rules are in place on the subsonic server.

Connections from web browsers work perfectly but the Android client just says "Connection failure. A network error occurred." (and Subair just spins... it never connects nor throws an error).

I've tried the Android connection both via WiFi to the internal network and via 3G to the external IP.

I added rules to allow redirecting port 80 to port 4202 on the subsonic server in case the Android client and Subair didn't like specifying the port number. Works from browsers but still not with Android client or Subair.

I added rules to allow udp connections in addition to tcp. Still no love.

Anybody have any clue what may be causing the failures? Does the android client write logs anywhere that might help me chase down the problem? What about Subair?

I've been intending to look at Subsonic for a long time but only finally did a few days ago. I am HUGELY impressed but its not of use to me if I can't get the android client to work.
texaganian
 
Posts: 10
Joined: Fri Jan 14, 2011 3:38 am

Postby texaganian » Tue Jan 18, 2011 6:46 pm

OK, I am able to get it all working now... but only as long as I used port 80.

Does anybody know if the android client or SubAir are supposed to be able to support other ports?
texaganian
 
Posts: 10
Joined: Fri Jan 14, 2011 3:38 am

Postby bushman4 » Tue Jan 18, 2011 6:48 pm

My android client supports other ports fine... I have it configured with three different servers, all on non-80 ports.

Glenn
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA

Postby texaganian » Thu Jan 20, 2011 3:30 am

How are you specifying the port in the android client?

i've tried both "w.x.y.z:xx" and "w.x.y.z xx" but neither worked.

The server, firewall & router configs are known good because it all works fine from a browser, just not from the android client.
texaganian
 
Posts: 10
Joined: Fri Jan 14, 2011 3:38 am

Postby GJ51 » Thu Jan 20, 2011 5:24 am

First read: http://monroeworld.com/android/subsonic/

Never use port 80 - ISP's often use it or block it. 8080,8081, work fine.

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.

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, 8081, etc.

Set up port forwarding in your router to direct traffic on the selected port to your server.

Learn your external IP address assigned by your ISP.

Test your setup by entering your external IP:port# to see if it connects. e.g.

http://24.88.76.61:4040/

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 GJ51 » Thu Jan 20, 2011 5:27 am

What error msg do you get from the Android client. Does your phone connect to the demo site? has anyone else tried to access your site from another desktop or Android?
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: android client won't connect

Postby gismo » Fri Jul 13, 2012 10:23 pm

I'm struggling to connect to my server from my android phone (SGS2). Funny enough, although I've unchecked Automatically configure your router to allow incoming connections to Subsonic (using UPnP or NAT-PMP port forwarding). so the status says port forwarding disabled, the CanYouSeeMe.org site says it sees service on the port 8081 I'm using.

Now, if I type gismo.subsonic.org in the browser I can log in no problem at all, but if I type the external IP address and the port number,
it just gets to a timeout :roll:

I can connect to my server using 3G/GPRS alright, but the wifi is a no-go for now. I can connect to demo server using wifi and 3G/GPRS.

What am I doing wrong?

Thanks for any clues
gismo
 
Posts: 1
Joined: Fri Jul 13, 2012 7:43 am

Re: android client won't connect

Postby GJ51 » Mon Jul 16, 2012 5:53 pm

Some routers have trouble resolving an address the references an address inside the same network. That is, if your on wifi, inside your network using the external address to try to get to the server inside the same network, the router may not make the connection. I've never had that happen but I've seen others claim that it was an issue for them.

Go to your server, open a command prompt and enter c:\ ipconfig /all to determine your INTERNAL ip address. Then in the Android setup enter the internal address:port number.

So you can have a 3g definition: http://86.46.134.244:8081

and an internal wifi definition:http://192.168.1.XXX:8081

HTH
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


Return to Help

Who is online

Users browsing this forum: No registered users and 15 guests