Skip to content

Instantly share code, notes, and snippets.

@shiv3
Created January 11, 2017 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shiv3/f5e8cf9ca0402111e0ffa15b8342de73 to your computer and use it in GitHub Desktop.
Save shiv3/f5e8cf9ca0402111e0ffa15b8342de73 to your computer and use it in GitHub Desktop.
tremaでコケたときメモ
hojo@ubuntu:~/trema/learning_switch$ ./bin/trema run ./lib/multi_learning_switch.rb -c trema.multi.conf       
RuntimeError: MultiLearningSwitch is already running (/tmp/MultiLearningSwitch.pid).
        /home/hojo/.bundle/ruby/2.3.0/trema-50b5a383bb73/lib/trema/command.rb:161:in `create_pid_file'
        /home/hojo/.bundle/ruby/2.3.0/trema-50b5a383bb73/lib/trema/command.rb:25:in `run'
        /home/hojo/.bundle/ruby/2.3.0/trema-50b5a383bb73/bin/trema:64:in `block (2 levels) in <module:App>'
        /var/lib/gems/2.3.0/gems/gli-2.13.4/lib/gli/command_support.rb:126:in `execute'
        /var/lib/gems/2.3.0/gems/gli-2.13.4/lib/gli/app_support.rb:296:in `block in call_command'
        /var/lib/gems/2.3.0/gems/gli-2.13.4/lib/gli/app_support.rb:309:in `call_command'
        /var/lib/gems/2.3.0/gems/gli-2.13.4/lib/gli/app_support.rb:83:in `run'
        /home/hojo/.bundle/ruby/2.3.0/trema-50b5a383bb73/bin/trema:284:in `<module:App>'
        /home/hojo/.bundle/ruby/2.3.0/trema-50b5a383bb73/bin/trema:21:in `<module:Trema>'
        /home/hojo/.bundle/ruby/2.3.0/trema-50b5a383bb73/bin/trema:16:in `<top (required)>'
        ./bin/trema:17:in `load'
        ./bin/trema:17:in `<main>'
hojo@ubuntu:~/trema/learning_switch$ rm /tmp/MultiLearningSwitch.*                                            
hojo@ubuntu:~/trema/learning_switch$ ./bin/trema run ./lib/multi_learning_switch.rb -c trema.multi.conf
/var/lib/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/source/git.rb:193:in `rescue in load_spec_files': git://gi
thub.com/trema/pio.git (at develop@e29c289) is not yet checked out. Run `bundle install` first. (Bundler::GitE
rror)
        from /var/lib/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/source/git.rb:190:in `load_spec_files'
        from /var/lib/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/source/path.rb:95:in `local_specs'
        from /var/lib/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/source/git.rb:161:in `specs'
        from /var/lib/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/lazy_specification.rb:61:in `__materialize__'
        from /var/lib/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/spec_set.rb:91:in `block in materialize'
        from /var/lib/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/spec_set.rb:88:in `map!'
        from /var/lib/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/spec_set.rb:88:in `materialize'
        from /var/lib/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:174:in `specs'
        from /var/lib/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:233:in `specs_for'
        from /var/lib/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:19:in `setup'
        from /var/lib/gems/2.3.0/gems/bundler-1.13.7/lib/bundler.rb:101:in `setup'
        from /var/lib/gems/2.3.0/gems/phut-0.7.7/lib/phut/../../bin/vhost:5:in `<main>'
RuntimeError: bundle exec sudo /var/lib/gems/2.3.0/gems/phut-0.7.7/lib/phut/../../bin/vhost run -n host1-1 -I 
host1-1 -i 192.168.0.1 -m 1c:39:79:6d:18:f7 -a 192.168.0.1/1c:39:79:6d:18:f7,192.168.0.2/b2:92:7b:58:53:4e,192
.168.0.3/b2:09:58:8c:c1:f9,192.168.0.4/58:12:12:12:29:45,192.168.0.5/ad:cd:d3:85:31:e7,192.168.0.6/9d:53:08:6e
:59:07,192.168.0.7/8f:22:b6:85:73:69,192.168.0.8/f4:ce:c6:49:80:61 -P /tmp -L /tmp -S /tmp failed.
        /var/lib/gems/2.3.0/gems/phut-0.7.7/lib/phut/shell_runner.rb:5:in `sh'
        /var/lib/gems/2.3.0/gems/phut-0.7.7/lib/phut/vhost.rb:60:in `run'
        /var/lib/gems/2.3.0/gems/phut-0.7.7/lib/phut/vhost.rb:29:in `each'
        /var/lib/gems/2.3.0/gems/phut-0.7.7/lib/phut/vhost.rb:29:in `each'
        /var/lib/gems/2.3.0/gems/phut-0.7.7/lib/phut/configuration.rb:44:in `block in run'
        /var/lib/gems/2.3.0/gems/phut-0.7.7/lib/phut/configuration.rb:43:in `each'
        /var/lib/gems/2.3.0/gems/phut-0.7.7/lib/phut/configuration.rb:43:in `run'
        /home/hojo/.bundle/ruby/2.3.0/trema-50b5a383bb73/lib/trema/command.rb:119:in `block in start_phut'
  

みたいなことになったとき

apt-get install libffi-dev
bundle install --path git://github.com/trema/pio.git

でなんとかなる

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment