Kodi Community Forum

Full Version: No Network?!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

I'm running 12.1 on my gentoo. The system has full network/internet access. But xbmc doesn't get any access to the network?! It just says "Can't connect to network server". I can't search for any add-ons or anything else that would need an internet connection.

I have no idea where to start debuging :/

Thanks for your help!


Regards,
fame
What is displayed on the following page? SYSTEM > System info > Network
same thing here, using wsnipex xvba branch.
(2013-04-25, 23:25)basco Wrote: [ -> ]same thing here, using wsnipex xvba branch.

Same question as to OP.
make sure you do not have a proxy set. Or inverse if you need a proxy.
i don't use a proxy. (never did).
proxy settings are ok.

sometimes, after a reboot, nework is available in xbmc, but disappears after a minute or so.
while it IS still connected, using ethtool confirms this. and i can still download stuff, but cant download addons in xbmc.

when looking at the settings summary information screen in xbmc, it shows 'busy' at 'oparating system', 'system uptime', 'total uptime' and 'battery level'.... how weird is that?!?
Hey,

sorry for the late answer. It shows:

Link: Not connected
MAC address:
IP address:
Subnet mask:
Gateway:
Primary DNS: 127.0.0.1
Secondary DNS:
Internet: Connected


This doesn't look right. The DNS entry is correct because I'm using a local DNS (dnsmasq). I just realized that the output of ifconfig as the xbmc user looks like this:

Code:
Warning: cannot open /proc/net/dev (No such file or directory). Limited output.
enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.112  netmask 255.255.255.0  broadcast 192.168.2.255
        ether bc:5f:f4:8b:af:c4  txqueuelen 1000  (Ethernet)

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 0  (Local Loopback)

I guess it is somehow connected to the hardened kernel. But that shouldn't be any problem because the user has access to the network:

Code:
xbmc@server ~ $ ping xbmc.org
PING xbmc.org (205.251.128.242) 56(84) bytes of data.
64 bytes from xbmc.org (205.251.128.242): icmp_seq=1 ttl=53 time=128 ms
64 bytes from xbmc.org (205.251.128.242): icmp_seq=2 ttl=53 time=130 ms
64 bytes from xbmc.org (205.251.128.242): icmp_seq=3 ttl=53 time=129 ms
^C
--- xbmc.org ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 128.811/129.569/130.169/0.637 ms

I don't need any proxy and don't have any set. I was able to figure out what the ifconfig output was about and it's fine the way it is.


Edit: It works now. Putting the user in the wheel group (that is normally a group for user who wants to "administrate" some of the components) solved the problem. Imho this shouldn't be needed. I'll try to figure out why this is needed and fill out a bug report.
Wow what is this new network device naming scheme?

http://www.freedesktop.org/wiki/Software...rfaceNames
(2013-04-26, 13:18)basco Wrote: [ -> ]i don't use a proxy. (never did).
proxy settings are ok.

sometimes, after a reboot, nework is available in xbmc, but disappears after a minute or so.
while it IS still connected, using ethtool confirms this. and i can still download stuff, but cant download addons in xbmc.

when looking at the settings summary information screen in xbmc, it shows 'busy' at 'oparating system', 'system uptime', 'total uptime' and 'battery level'.... how weird is that?!?

I have noticed the same behaviors. After a lot of searching I have found that Ubuntu 12.10 has changed how dns requests are handled. Now the local dns server is 127.0.1.1 but XBMC still uses 127.0.0.1. I have tried to find where to change it but dbus hides everything very efficiently.
This should be filed as a bug but in the mean time I need a fix to change dns server. It can not be done in the System->Settings page
thanks for the reply.

in /etc/hosts on my server (Ubuntu 12.04.2 LTS, non XBMC system) i see 127.0.1.1 ...
perhaps changing it in this file on my xbmc system resolves it.
i'll try this tonight on my xbmc system
(2013-04-28, 09:31)fame Wrote: [ -> ]Hey,

sorry for the late answer. It shows:

Link: Not connected
MAC address:
IP address:
Subnet mask:
Gateway:
Primary DNS: 127.0.0.1
Secondary DNS:
Internet: Connected


This doesn't look right. The DNS entry is correct because I'm using a local DNS (dnsmasq). I just realized that the output of ifconfig as the xbmc user looks like this:

Code:
Warning: cannot open /proc/net/dev (No such file or directory). Limited output.
enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.112  netmask 255.255.255.0  broadcast 192.168.2.255
        ether bc:5f:f4:8b:af:c4  txqueuelen 1000  (Ethernet)

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 0  (Local Loopback)

There several things wrong here, normally if your network is configured properly the IP address, subnet mask gateway and primary dns fields would show some values usually associated with how your router is setup.

However what points to a system error or misconfiguration is the fact that the MAC address field is also empty, this is not good. And this is pointing to some configuration error due to fact that your ifconfig output also puts out a warning and is also incomplete. <<-Start to fix this until ifconfig output is 100% complete and correct.

Its definitely not XBMC, whatever your doing to your network is definitely wrong.

uNi
Universal - it makes a lot more sense that XBMC is not populating the fields correctly because of the new naming standards of ethernet adapters.
It might just be looking for eth0-9 or wlan0-9 adapters.

You can see in his code bit that the enp3s0 adapter has an IP address, netmask and broadcast address that seem to be just fine to me. It even includes a MAC address. Wink

The Warning: cannot open /proc/net/dev (No such file or directory). is caused because the ifconfig command was not given as root and the xbmc user had no rights to /proc/.
This is not a misconfiguration at all, but a consequence of a hardened system.

Anyway this is moot as the issue was already solved by adding the user to the wheel group.
It could be interesting to figure out the minimal rights the xbmc user would need to get this working correctly, without resorting to adding the xbmc user to group wheel. I believe the OP was already planning on doing this.
The fact that ifconfig is incorrect and incomplete and spits out a warning is enough to tell me something hes done is wrong, what XBMC outputs there ultimately doesn't matter if the machine is incorrectly configured and or the networking is bummed.

My point is if the OS is correctly configured even if XBMC isnt recognizing the adapter naming etc it would still connect just fine.

He needs to fix his botched configuration when this is done XBMC will connect.

If xbmc source needs patching then to properly recognise old and new ways its a different matter looking at https://github.com/xbmc/xbmc/blob/master...etwork.cpp and https://github.com/xbmc/xbmc/blob/master...kLinux.cpp I dont speak c++ but looks to me where XBMC looks at some of this info.

uNi
(2013-05-02, 15:01)uNiversal Wrote: [ -> ]The fact that ifconfig is incorrect and incomplete and spits out a warning is enough to tell me something hes done is wrong, what XBMC outputs there ultimately doesn't matter if the machine is incorrectly configured and or the networking is bummed.

There is nothing incorrect in the ifconfig output.
The fact that it is incomplete is not a configuration issue or 'networking being bummed', but the way correct way networking looks like for a non-priviliged user in a hardened system.

XBMC most likely just needs more access rights than are being documented and we need to figure out what they are so they can be documented.
XBMC access rights are usually given via adding the user running XBMC to correct groups and by adding custom-actions.pkla Im presuming that the OP has added correct permission to XBMC. as documented.

so this

/etc/polkit-1/localauthority/50-local.d/custom-actions.pkla
Code:
[Actions for xbmc user]
Identity=unix-user:xbmc
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesk​top.udisks.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

and

Code:
usermod --group sudo,cdrom,audio,video,plugdev,fuse xbmc
adduser xbmc users

Are done.

Try

Code:
dhcpcd enp3s0

and

Code:
rc-config list default

uNi
Pages: 1 2