Debian7 and tc qdisc issue : RTNETLINK answers: No such file or directory

16,647

RTNETLINK answers: No such file or directory is tc's way of saying that it can't find something - in this case: most probably the htb scheduler. To test and make sure try

modprobe sch_htb

You will probably get an error.

And this probably means that your VPS provider is not using the default kernels from debian upstream. They usually provide you with a list of kernels to chose from, but I'd expect all of them to be crippled like the one running. You will not be able to change the kernel they are using, but there is chance (though not a big one) they haven't disabled module loading in the kernel. In that case you can try to build and install the htb module. You can try using ModuleAssistant for that.

If all else fails, contact the customer support.

Share:
16,647

Related videos on Youtube

Raphael Laurent
Author by

Raphael Laurent

Updated on September 18, 2022

Comments

  • Raphael Laurent
    Raphael Laurent over 1 year

    I've been searching for few days now but couldn't find the solution to my problem.

    I have a VPS running Debian 7, and I have root access.

    I am trying to add some traffic shaping (using HTB), so the first line I tried to type was this one :

    tc qdisc add dev tun0 root handle 1: htb default 10
    

    But it appears to be wrong somehow, because I get the following error :

    RTNETLINK answers: No such file or directory
    

    My ifconfig shows an interface tun0, so it exists. I also tried on venet0 anyway and it fails with the same error.

    When I do tc qdisc list I have only the following rule :

    qdisc pfifo_fast 0: dev tun0 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
    

    I really can't find what's wrong.

    NB : I upgraded the package iproute (according to Debian's doc, it's where tc is), but it didn't do any better.

  • Raphael Laurent
    Raphael Laurent almost 10 years
    I already installed ModuleAssistant, but couldn't find the HTB module. The command is : m-a a-i htb, right? (also tried sch_htb and a whole bunch of other stuff, no more success)
  • skarap
    skarap almost 10 years
    I see. You'll have to try and do it manually then. Take a look at cyberciti.biz/tips/…
  • Raphael Laurent
    Raphael Laurent almost 10 years
    I tried following some of these steps, but I can't even find the kernel-headers. I'll try to send a request to the support of the VPS.
  • skarap
    skarap almost 10 years
    What's the full kernel version?
  • Raphael Laurent
    Raphael Laurent almost 10 years
    2.6.32-042stab092.2
  • skarap
    skarap almost 10 years
    Take a look here openvz.org/Download/kernel/rhel6/042stab092.2 . Though - it's an openvz kernel (so your VPS is an openvz container without it's own kernel if I'm not mistaken) which probably means adding a new module is pretty close to impossible..
  • Raphael Laurent
    Raphael Laurent almost 10 years
    Thank you very much, I consider the problem solved (I'll see with the support of my VPS provider what can be done, or change provider for this special task). I now have a better understanding on what's going on.
  • Raphael Laurent
    Raphael Laurent almost 10 years
    (I cannot grant the bounty before another 9 hours, but will do)
  • Syed Aqeel Ashiq
    Syed Aqeel Ashiq over 8 years
    I can run 'modprobe sch_netem` command, it doesn't give any errors. Also lsmod | grep -i sch_netem returns sch_netem 17306 0. But still qdisk change command gives me error: RTNETLINK answers :No such file or directory
  • Mona Jalal
    Mona Jalal over 8 years
    I don't get any error with ` modprobe sch_htb` but what does it exactly do ? I get the error as in the question however.
  • skarap
    skarap over 8 years
    modprobe loads the specified kernel module into the kernel. In original author's case that module was missing from their system. If is not failing in your case (double-check with lsmod | grep sch_htb), then it is another problem. You could check to make sure the interface name is correct.