Error creating virtual host in Trema(ruby)

Asked 2 years ago, Updated 2 years ago, 117 views

I could do up to 6 chapters referring to the site of TREMA(https://yasuhito.github.io/trema-book/), but when I tried to do it with the git command clone(https://github.com/trema/patch_panel.git), the following host relationship error occurs:

[root@localhost patch_panel]#./bin/trema run./lib/patch_panel.rb-c patch_panel.conf
RTNETLINK answers:File exists
/opt/rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/phut-0.7.5/lib/phut/shell_runner.rb:5:in`sh':sudo ip link add name patch_panel_1 type veth peer name host1 failed.(RuntimeError)
    from/opt/rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/phut-0.7.5/lib/phut/virtual_link.rb:99:in `add'
    from/opt/rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/phut-0.7.5/lib/phut/virtual_link.rb:67:in `run'
    from/opt/rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/phut-0.7.5/lib/phut/virtual_link.rb:15:in `each'
    from/opt/rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/phut-0.7.5/lib/phut/virtual_link.rb:15:in `each'
    from/opt/rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/phut-0.7.5/lib/phut/configuration.rb:44:in `block in run'
    from/opt/rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/phut-0.7.5/lib/phut/configuration.rb:43:in `each'
    from/opt/rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/phut-0.7.5/lib/phut/configuration.rb:43:in `run'
    from/opt/rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/trema-0.9.0/lib/trema/command.rb:110:in `block in start_phut'

The environment is CentOS 7.Thank you for your cooperation.

ruby centos

2022-09-30 21:32

1 Answers

sh': sudo ip link add name patch_panel_1 type veth peer name host1 failed. (RuntimeError)

I think the above error is a shell command execution error.
To try, manually execute the error-prone command from the terminal to see the error message displayed.

 sudo ip link add name patch_panel_1 type veth peer name host1

The error content may change the response, but if the error means that patch_panel_1 already exists, you should manually delete it by sudo ip link delete... and then run trema.


2022-09-30 21:32

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.