Default to IP if Connect to Hostname Failed
#1
Hey guys,

Can you default the recorded tv path to the server ip if the hostname failed. I am trying to access pvr over vpn and I can't because the windows client can not resolve my hostname. However, it can access the recorded share using the ip address. Also allow assigning adapter for pc with multiple adapters.

thanks,


Code:
13:46:02 T:3052396   ERROR: AddOnLog: Windows Media Center Client - wingl windx x86 Edition: Couldn't get ServerWMC MAC address from custom addondata, using empty value
13:46:21 T:3052732  NOTICE: PVRManager - PVR::CPVRManager::ResetDatabase - clearing the PVR database
13:46:22 T:3052732  NOTICE: PVRManager - stopping
13:46:25 T:3052396  NOTICE: localGetNetworkResources: Can't read shares for "\\HTPC" by localGetShares(), fallback to standard method
13:46:25 T:3052396  NOTICE: localGetNetworkResources: Can't open network enumeration for "\\HTPC". Error: 1203
13:46:28 T:3052396   ERROR: XFILE::CWin32SMBDirectory::ConnectAndAuthenticate: Can't find "\\HTPC\Recorded TV"
13:46:28 T:3052396   ERROR: AddOnLog: Windows Media Center Client - wingl windx x86 Edition: Recorded tv 'smb://HTPC/Recorded TV' does not exist
13:46:28 T:3052732  NOTICE: PVRManager - PVR::CPVRManager::ResetDatabase - EPG database cleared
13:46:28 T:3052732  NOTICE: PVRManager - PVR::CPVRManager::ResetDatabase - restarting the PVRManager
13:46:28 T:3052732  NOTICE: PVRManager - starting up
13:46:28 T:3050600  NOTICE: Thread PVRManager start, auto delete: false
13:46:28 T:3052780  NOTICE: Thread PVRClient start, auto delete: false
13:46:28 T:3052780   ERROR: AddOnLog: Windows Media Center Client - wingl windx x86 Edition: Using ServerWMC MAC address from custom addondata 'A0:CE:C8:01:D4:26'
13:46:28 T:3052780  NOTICE: localGetNetworkResources: Can't read shares for "\\HTPC" by localGetShares(), fallback to standard method
13:46:28 T:3052780  NOTICE: localGetNetworkResources: Can't open network enumeration for "\\HTPC". Error: 1203
13:46:31 T:3052780   ERROR: XFILE::CWin32SMBDirectory::ConnectAndAuthenticate: Can't find "\\HTPC\Recorded TV"
13:46:31 T:3052780   ERROR: AddOnLog: Windows Media Center Client - wingl windx x86 Edition: Recorded tv 'smb://HTPC/Recorded TV' does not exist
13:46:36 T:3053148  NOTICE: Thread PVRGUIInfo start, auto delete: false
13:46:36 T:3050600  NOTICE: EPG::CEpgContainer::Start - EPG thread started
Reply
#2
In ServerWMC you set what the "network recorded TV path" is, so you can put the server IP there instead of hostname if you want.

In terms of adapters, are you referring to the client side? I didnt think we used any specific adapter, we just connect to a hostname/IP address and thus would rely on your machines routing etc to be configured to know how to get there?
pvr.wmc TV addon and ServerWMC Backend Development Team
http://bit.ly/ServerWMC
Reply
#3
(2014-10-09, 00:35)scarecrow420 Wrote: In ServerWMC you set what the "network recorded TV path" is, so you can put the server IP there instead of hostname if you want.

Interesting. Wait. So how does my andriod client knows where my recorded tv path is? Andriod OS is know for not playing well with other platform hostname and FQDN. I was told its due to the fact that they always have their DNS set to google. I don't know how true that statement is. But I can honestly say, even if I manually type in my DNS in the device's network adapter config it stills doesn't resolve any hostnames in the local network.

Code:
shell@android:/ $ ping htpc
ping htpc
PING htpc (67.63.55.3) 56(84) bytes of data.
64 bytes from 67.63.55.3: icmp_seq=1 ttl=241 time=86.9 ms
64 bytes from 67.63.55.3: icmp_seq=2 ttl=241 time=84.7 ms
64 bytes from 67.63.55.3: icmp_seq=3 ttl=241 time=85.4 ms
64 bytes from 67.63.55.3: icmp_seq=4 ttl=241 time=88.9 ms
64 bytes from 67.63.55.3: icmp_seq=5 ttl=241 time=86.7 ms

If it isn't too much to ask I would rather you guys handle the hostname and IP as I requested on the backend side. The reason being is I learned the hard way to never use IP addresses in config. I brought an airport extreme to replace my old linsys router and it was a nightmare. Apple doesn't allow users to specify their own IP range. They can only choose from three specified ranges. A lot of my devices and applications were using IP address before and I had to manually reconfigure all them. Huge disaster.

(2014-10-09, 00:35)scarecrow420 Wrote: In terms of adapters, are you referring to the client side? I didnt think we used any specific adapter, we just connect to a hostname/IP address and thus would rely on your machines routing etc to be configured to know how to get there?

I wasn't making a statement. No on the server side. I am not sure how it is being done right now. I just would like it if all traffics go through a selected nic rather than any. I have a nic dedicated to storage and I don't want it to be used for anything else.
Reply
#4
Hey, sorry for the delay in replying, ive been on holidays. But I haven't forgotten about this thread Smile

(2014-10-09, 02:42)breezytm Wrote:
(2014-10-09, 00:35)scarecrow420 Wrote: In ServerWMC you set what the "network recorded TV path" is, so you can put the server IP there instead of hostname if you want.

Interesting. Wait. So how does my andriod client knows where my recorded tv path is?
This is how it works: In the PVR addon settings within XBMC on the client side, you configure the Server address (hostname or IP) and port. The client makes a connection to this address and then serverWMC sends back data. When you watch a live or recorded stream, ServerWMC sends back a string containing the SMB path of the WTV/TS file. This path is configured on the ServerWMC side on the folders tab.


(2014-10-09, 02:42)breezytm Wrote: Andriod OS is know for not playing well with other platform hostname and FQDN. I was told its due to the fact that they always have their DNS set to google. I don't know how true that statement is. But I can honestly say, even if I manually type in my DNS in the device's network adapter config it stills doesn't resolve any hostnames in the local network.
To take a slight detour, when you say you manually type your DNS in - what (build/software/device) is your DNS server? Unless you have an actual DNS service with names registered for your windows PCs, they probably can see each other via WINS rather than DNS, and your DNS server (assuming its just your router or something similar) is not actually a configurable DNS server as much as it just forwards every connected client's DNS out to your ISP's DNS servers etc. This is generally why name resolution works among non domain windows PCs but not across to other operating systems. If you have a "proper" DNS server/service then I'd expect name resolution to work across all devices including linux/android if you configure them to use that DNS service.(assuming youve configured the hostnames for the various PCs in DNS or have it self registering etc).


(2014-10-09, 02:42)breezytm Wrote: If it isn't too much to ask I would rather you guys handle the hostname and IP as I requested on the backend side. The reason being is I learned the hard way to never use IP addresses in config. I brought an airport extreme to replace my old linsys router and it was a nightmare. Apple doesn't allow users to specify their own IP range. They can only choose from three specified ranges. A lot of my devices and applications were using IP address before and I had to manually reconfigure all them. Huge disaster.
This is what was confusing me... how can we handle the IP ourselves on the server side? We actually don't know what our IP is... we know the local IP of each network device in the server PC but we don't really know which network interface a client connection dame through, nor how that client actually accessed us (eg it could be via NAT or a VPN or whatever else). We don't know (or care?) how the client got to us, we just know that a client connected to our open socket, and sent us a valid request, which we then responded to via that open socket. I suppose it is a limitation of the current setup that all clients no matter who/where they are and how they were able to connect to us, get given the same SMB path to the recording files. Conceivably we could support being able to set/override the base SMB path for each particular client, so you could support hostnames for machines that could resolve it, IP addresses for those that cant, special name/IP for machines that were over a VPN or NAT'ed connection and so on. I guess a further enhancement to that would be to have the client send in what address it used to contact the server and have the server incorporate that hostname into the SMB paths it sends back. Thus giving the "per client" ability without having to actually specify IP addresses and overrides on the server side. That of course does mean changes to the client side code though. Ill have a ponder on this...

(2014-10-09, 02:42)breezytm Wrote:
(2014-10-09, 00:35)scarecrow420 Wrote: In terms of adapters, are you referring to the client side? I didnt think we used any specific adapter, we just connect to a hostname/IP address and thus would rely on your machines routing etc to be configured to know how to get there?

I wasn't making a statement. No on the server side. I am not sure how it is being done right now. I just would like it if all traffics go through a selected nic rather than any. I have a nic dedicated to storage and I don't want it to be used for anything else.
Since on the server side we just open a socket and accept incoming connections wherever they come from, I don't think this is a problem. ServerWMC doesn't send anything out, it only sends data back through the socket that was established by the client connecting in... so in your case, no data will traverse your storage network unless you have a routing problem where your clients are also attached to the storage network and are routing to the serverWMC machine (the IP/hostname as configured in XBMC PVR addon settings) via the storage network you don't want them to use. As long as your client routes to the server name/address are set to use the network interface you want, there shouldnt be a problem.
pvr.wmc TV addon and ServerWMC Backend Development Team
http://bit.ly/ServerWMC
Reply
#5
Thanks for clarifying @scarecrow420 . What I mean by DNS was my router's DNS. Manually typed in my router IP address in the DNS field in the Fire TV network configuration page.

As far as the nic goes, I was thinking perhaps you guys can add the option to select which nic to use rather than whichever one is detected first. Yes I went the cheap way. I am using the same switch for storage as well Smile
When I have app using autodetect, sometimes they respond on the storage nic and I didn't want the same thing to happen with SWMC.
Reply
#6
(2014-11-04, 19:29)breezytm Wrote: Thanks for clarifying @scarecrow420 . What I mean by DNS was my router's DNS. Manually typed in my router IP address in the DNS field in the Fire TV network configuration page.
Cool, it's unlikely your router has it's own DNS server and would allow resolving the local hostnames between windows/Linux/etc on your home network. More likely it just forwards any DNS requests to the upstream DNS the router is using (from your ISP). That said some routers do have a DNS server ability where you could specify the hostnames/IP bindings and then you would get DNS resolution of your home devices. There are also custom firmwares for some model routers that add this ability

(2014-11-04, 19:29)breezytm Wrote: As far as the nic goes, I was thinking perhaps you guys can add the option to select which nic to use rather than whichever one is detected first. Yes I went the cheap way. I am using the same switch for storage as well Smile
When I have app using autodetect, sometimes they respond on the storage nic and I didn't want the same thing to happen with SWMC.
Hmm I still don't see what we can do. If you have 2 NICs even if on the same switch, they each have a separate IP address. As long as you configure your XBMC clients to talk to the IP address of the server's network NIC rather than storage NIC I cant see how you would ever have traffic going out the storage NIC?
pvr.wmc TV addon and ServerWMC Backend Development Team
http://bit.ly/ServerWMC
Reply

Logout Mark Read Team Forum Stats Members Help
Default to IP if Connect to Hostname Failed0