Error Running Trema (0.10.1) in CentOS

Asked 2 years ago, Updated 2 years ago, 80 views

OpenFlow Programming

in Trema

After completing the installation of Trema with reference to the above site, I received the following error:
I have tried various things with command.rb, but I still don't know the result.I'd appreciate it if you could help me.
The environment is CentOS 7.

[root@localhosthello_trema]#./bin/trema run./lib/hello_trema.rb-ctrema.conf
/opt/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/trema-0.10.1/lib/trema/command.rb: 153: in `create_pid_file': HelloTrema is already running. (RuntimeError)
    from/opt/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/trema-0.10.1/lib/trema/command.rb:29:in `run'
    from/opt/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/trema-0.10.1/bin/trema: 68:in `block(2 levels) in<module:App>'
    from/opt/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.13.4/lib/gli/command_support.rb:126:in`call'
    from/opt/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.13.4/lib/gli/command_support.rb: 126:in `execute'
    from/opt/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.13.4/lib/gli/app_support.rb:296:in `block in call_command'
    from/opt/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.13.4/lib/gli/app_support.rb:309:in `call'
    from/opt/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.13.4/lib/gli/app_support.rb:309:in`call_command'
    from/opt/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.13.4/lib/gli/app_support.rb:83:in `run'
    from/opt/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/trema-0.10.1/bin/trema:291:in`<module:App>'
    from/opt/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/trema-0.10.1/bin/trema:14:in`<module:Trema>'
    from/opt/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/trema-0.10.1/bin/trema:11:in`<top(required)>'
    from./bin/trema:29:in `load'
    from./bin/trema:29:in`<main>'

ruby centos

2022-09-30 20:13

1 Answers

As far as the terma/command.rb source is concerned, FileTest.exists?pid_file is true, so there seems to be an exception.
If you are directly touching command.rb, run line 153 with the following modifications:

 puts "DEBUG:#{pid_file}"
raise"#{name} is already running. "if running?

If you run it, you will see the pid_file path to the terminal, so
Verify that pid_file does not exist.If so, delete it and try again.

However, pid_file should be in the temporary directory, so it should normally change every time it boots.In any case, I think you can isolate it by putting in a debug print.


2022-09-30 20:13

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.