Mark Taylor
Mark Taylor

Reputation: 39

(Error in makefile)RTNETLINK answers: File exists

This is my makefile:

delay:
    tc qdisc add dev eth0 root netem delay 0ms
test4_s_delay:delay
    ./a.out 10 10 1 2 3 1 1 20 | tee server_delay.txt

However, I am getting the following error on execution of the makefile:

root@superwii-laptop:/home/superwii/Desktop/Amogh# make test4_s_delay
tc qdisc add dev eth0 root netem delay 0ms
RTNETLINK answers: File exists
make: *** [delay] Error 2

I am unable to get past this error. Please help.

Upvotes: 4

Views: 1875

Answers (3)

user3795084
user3795084

Reputation: 1

use replace instead of add

tc qdisc replace dev eth0 root netem delay. Man page for tc says :

replace performs a nearly atomic remove/add on an existing node id. If the node does not exist yet it is created.

Upvotes: 0

veimis
veimis

Reputation: 71

You would get this error, if qdisc root node already exists.
Try deleting the root qdisc

sudo tc qdisc del dev eth0 root

and try again

Upvotes: 7

codaddict
codaddict

Reputation: 455380

Looks like your executable tc is exiting with non-zero value of 2.

Try running the command tc qdisc add dev eth0 root netem delay 0ms and see if it runs fine.

Upvotes: 0

Related Questions