New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kodi doesn't honor <hosts> in advancedsettings.xml #15469
Comments
noone? |
Same @ LibreElec 9.2 (Kodi 18.3) @ Raspberry Pi4 KODI has a very aggressive handling of DNS. (LibreElec, Pi4) Workaround: delete resolv.conf, create new resolv.conf (at startup) with OWN DNS server wants to be rejected after some seconds (time enough to open to Netshare and cache this DNS). DNS-push via VPN (openvpn via autostart.sh) is completely ignored. Routing into my LAN behind VPN works. Apparently, it is fixed here defines how DNS resolution is allowed to work and with which server is spoken. Only resolv.conf -> nameserver x.y.z.a. If this fix were removed, then or at least hosts.conf would work immediately. |
Im having the same issue |
The issue is also in version 18,8 and 19, On Windows 10, Kubuntu 20.04, Fire TV Stick and Android TV |
Same here. Tested Kodi 18.9 on SONY Android TV, Android TV Box, and Windows 7. |
as.xml was never implemented for stuff like this. It simply adds host->ip entries inside Kodi's internal DNS-cache but the DNS cache is actually only used by the NFS client (and LAN-check). So it means it also doesn't work for other network filesystems: smb, http, webdav etc. I also don't get why you need this? You might as well stick the IP directly in the database-sections. Or perhaps you could use Kodi's path substitution? This doesn't mean that should be fixed or its comment should be improved, but perhaps it can offer a workaround for now? |
I suspect when you want to use SSL, you're better off with a hostname or you might have cert validation issues. |
Just to make my case clear: The audio/video files are stored in the same NAS. my settings for the DB in advancedsettings.xml are The sources.xml file has entries like this:
|
To be honest: I don't really see the problem. It's only for convenience that you can configure the hostname->IP mapping in a single place, right? But then the question comes to mind: How often do you change the host's IP? I suspect it's a one time thing, so that means setting an IP in 2 config files: advancedsettings.xml and sources.xml, no biggy imo. |
You're correct but it's a little bit more complicated. |
are you able to test my proposed fix? |
I have a bit other setting, but the same problem. I have two nas systems on two locations with the same files. But to keep track of the view status of every file. I have created only one database on one of the nas systems. So the trick is to tell kodi that both systems are the same. Because if both nas systems have not the same name, they will be treated in the database as different file locations. So i use the tag for the file server and the fixed ip for the db server. But because that don't function i have used my fritzbox to do the same... |
@wsnipex Sorry but i cannot test it. |
why is that? |
Because i don't know what i have to do. How can i test it ? I suppose i need a new executable ? |
which OS and hardware do you use? We can provide test builds for most platforms, but linux |
I could test it on linux or windows. I have tried to compile it on kubuntu. After fetching your patch, kodi dont start anymore, only matrix screen... |
did you build this branch? https://github.com/wsnipex/xbmc/tree/hosts |
Ok i have found the error. The fault win an extra entry in advacedsettings.xml not related to this topic. Now it works witch your patch |
@wsnipex |
Thats strange if i add the msql database entrys from the older config. Kodi dont start anymore. |
@mytril you‘re testing with an old commit, as your log reveals. the pr has been updated meanwhile and i can confirm it‘s working for mysql in its current state. |
@howie-f Ok will try it. |
@howie-f Yes now it works |
Tested win64 version. In the log file there are entries for for every file/directory in the DB like the following: This message appeared on screen: "This file is no longer available. Would you like to remove from the library ?". |
I kinda expected this. Contrary to curl (for http/ftp), there is no way to fake a DNS server for SMB and MySQL. Kodi is not a DNS server, the best we can do is replace the name with the IP. The resulting URL is smb://192.168.1.201/videos/movies |
On my setup with smb and mysql it works. All Videos play and i can resume them on other devices too. Maybe there are other problems with your setup like permission problems? Or have you a problem with lowercase or uppercase letters in your path? |
@mytril I don't think it's an uppercase/lowercase issue because when the O/S does the resolving everything works fine. Are the file paths in your DB referenced as "smb://ip.address/path" or by "smb://hostname/path" ? |
I am on Linux and didn't need to reboot. But i can try it on windows 10.
|
Maybe i wasn't clear enough. The DB works fine. The problem is that kodi cannot find the video files when i press play. |
Yes i can confirm it. On Linux it works but on Windows 10 i get an error if i want to add the source. He cant find the Host. |
windows doesn't use samba, but windows native SMB. If it works in linux, it should work on all other platform but windows as well. |
use DNS cache for samba and mysql. (fixes #15469)
Bug report
Describe the bug
Here is a clear and concise description of what the problem is:
<videodatabase>
and<musicdatabase>
doesn't care about what is defined in previous<hosts>
in advancedsettings.xml.Expected Behavior
Here is a clear and concise description of what was expected to happen:
If a host is defined in advancedsettings it should use it.
Actual Behavior
It doesn't matter what is defined in
<hosts>
. Kodi doesn't use it anyway.To Reproduce
Steps to reproduce the behavior:
In advancedsettings.xml:
A1. Define a host with the actual/right hostname (in my case "SC-NAS") but wrong IP.
A2. Use the hostname above when defining a mysql database.
A3. Start Kodi.
A4. Kodi should not find the database because of the hostname points to the wrong IP, but it does.
B1. Define a host with the wrong hostname (lets say "TEST") but with the right IP.
B2. Use the hostname above when defining a mysql database.
B3. Start Kodi.
B4. Kodi should now find the database because of the hostname points to the right IP, but it doesn't.
Debuglog
The debuglog can be found here:
Debug with right hostname and wrong IP: https://paste.kodi.tv/erusocarat.kodi
Debug with wrong hostname and right IP: https://paste.kodi.tv/quqokufupu.kodi
Additional context or screenshots (if appropriate)
Here is some additional context or explanation that might help:
Also when referring to a
smb://hostname
in sources.xml doesn't care about what is defined under<hosts>
.The problem was discovered when Windows 10 removed SMB1 by default and the hostname wasn't autodiscovered in Windows under a period, before it was fixed.
The same problem is in Kodi 17.x
Your Environment
Used Operating system:
Android
iOS
Linux
OSX
Raspberry-Pi
Windows
Windows UWP
Operating system version/name: 10 Education edition (10.0.17763.253)
Kodi version: 18.0
note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.
The text was updated successfully, but these errors were encountered: