Page 1 of 1

IP address in Browser works but myname.subsonic.org does not

PostPosted: Sun Sep 05, 2010 11:19 pm
by joemangrove
I have spent the last couple of hours trying to figure this out. If I type in myname.subsonic.org, I can not connect; it just redirects to http://127.0.1.1:4040/ and errors out.

However, if I type in my external ip + :4040 I can connect with no problems.

Any help will be appreciated.

Joe

PostPosted: Mon Sep 06, 2010 8:24 am
by delcypher
You need to check what IP address your subsonic address points to.

In Windows (command prompt), Mac OSX or Linux (Terminal) you can run the following command which will tell you what IP address is associated with your domain name.

Code: Select all
nslookup subsonic.org


You will get an answer that looks something like this.

Code: Select all
Non-authoritative answer:
Name:   subsonic.org
Address: 97.74.125.134


Also try using this service (http://www.kloth.net/services/nslookup.php) too as your local DNS server may be returning the incorrect IP address for some reason.[/url]

PostPosted: Mon Sep 06, 2010 9:58 pm
by kermit22
It is also possible that your router doesn't route external DNS names to your local network when you are inside of your local network. I'm not sure if you have tried it from outside of your local network or not, but if you would like me to try it you can PM me your subsonic.org address and I can try it out for you.

PostPosted: Tue Sep 07, 2010 6:11 pm
by whackly
I am having a similar issue. I first had everything installed on a windows machine using port 3385 with the ports forwarded in the router. <myname1>.subsonic.org worked whether I was at home (on wifi) or out (3g or wifi elsewhere).

After deciding I liked subsonic and it would work for me I installed in on my freenas box. I uninstalled it from my windows machine and set subsonic on the freenas box to <myname2>.subsonic.org and forwarded port 4040 on the router. When I connect to tadwhackly.subsonic.org from outside my home network it works fine. However, if I try to reach it from within my home wifi I get a message saying "Host name may not be null". Obviously if I connect to <lan IP>:4040 from withing my home network it works fine.

The weird thing is that it seems to work fine on my wife's phone (same model phone running same os - android 2.1) with <myname2>.subsonic.org whether inside or outside the local network BUT if I try to connect to <myname2>.subsonic.org using the subair app on my home desktop i get "0: HTTP request error".

I uninstalled the subsonic app from my phone, deleted the subsonic folder, and re-installed it. The result is the same.

Anybody got an idea wtf is going on?

PostPosted: Wed Sep 08, 2010 5:53 pm
by hornetjockey
This is a cross-post of mine from another thread. It may be relevant. I'm not sure if the phone apps use a proxy or not, which may explain why your wife's phone isn't affected...

I have noticed that the subsonic.org DNS service seems to make a silly assumption; I'm still working to confirm this.

I assume your scenario is something like this:

Two or more computers behind the same NAT router, one is your sever, the others are your workstations.

When accessing myserver.subsonic.org from outside your LAN, it correctly directs you to your router's IP, and assuming you have port forwarding set up correctly, it brings up your subsonic server.

When accessing myserver.subsonic.org from inside your LAN, the subsonic DNS service sees this and directs you to localhost, assuming that you are connecting to your server, FROM your server.

If that were the case, redirecting your browser to localhost would work, but if you are on a workstation that is not hosting subsonic, it fails.

The assumption seems to be that if the subsonic DNS service sees your request coming from the IP currently registered with them, that you are coming from the same host. The inclusion of NAT in the equation makes this assumption false and silly. DynDNS doesn't do this, which is why I've switched.

That's what seems to be happening to me. It's entirely possible that I've completely blown your problem out of proportion, too.

PostPosted: Wed Sep 08, 2010 6:45 pm
by mgrant
the subsonic redirection follows these rules:

1. If you are on a different network segment than your subsonic server it will redirect to the public IP address.

2. If you are on the same network segment as your subsonic server it will redirect to the IP address of the subsonic server.

The complication is in determining the IP addresses. Try this on your subsonic server.

Code: Select all
hostname


then

Code: Select all
ping <whatever_the_hostname_above_returned>


In many cases the hostname for your subsonic server will resolve to a localhost IP address 127.x.x.x (usually 127.0.1.1 or 127.0.0.1)

If this is the case for you, you can easily fix it by changing your hostfile. On windows this file is in c:\windows\system32\drivers\etc\hosts. On linux it's in /etc/hosts

If you need more info search the forums for my earlier post on this issue.

-mg