riak-ripple / ripple

A rich Ruby modeling layer for Riak, Basho's distributed database
Other
619 stars 152 forks source link

Could not find or open pipes for Riak console #278

Open xn opened 12 years ago

xn commented 12 years ago

/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/ripple-6b5ac7fe139c/riak-client/lib/riak/node/console.rb:49:in `initialize': Could not find or open pipes for Riak console in /tmp/.identity.riak/pipe. (ArgumentError)

bundle exec rake
/home/xn/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -I"lib:lib:test" -I"/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib" "/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb" "test/**/*_test.rb" 
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/soap4r-24601670d998/lib/xsd/charset.rb:13: warning: variable $KCODE is no longer effective
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/soap4r-24601670d998/lib/soap/property.rb:68: warning: encoding option is ignored - u
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/soap4r-24601670d998/lib/soap/property.rb:69: warning: encoding option is ignored - u
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/soap4r-24601670d998/lib/soap/property.rb:70: warning: encoding option is ignored - u
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/ripple-6b5ac7fe139c/riak-client/lib/riak/node/console.rb:49:in `initialize': Could not find or open pipes for Riak console in /tmp/.identity.riak/pipe. (ArgumentError)
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/ripple-6b5ac7fe139c/riak-client/lib/riak/node/console.rb:22:in `new'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/ripple-6b5ac7fe139c/riak-client/lib/riak/node/console.rb:22:in `open'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/ripple-6b5ac7fe139c/riak-client/lib/riak/node/control.rb:71:in `attach'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/ripple-6b5ac7fe139c/riak-client/lib/riak/test_server.rb:67:in `maybe_attach'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/ripple-6b5ac7fe139c/riak-client/lib/riak/test_server.rb:38:in `start'
    from /home/xn/sites/att-identity/test/support/ripple_test_server.rb:18:in `setup'
    from /home/xn/sites/att-identity/test/test_helper.rb:22:in `<top (required)>'
    from /home/xn/sites/att-identity/test/lib/oauth2/models/application_test.rb:2:in `require'
    from /home/xn/sites/att-identity/test/lib/oauth2/models/application_test.rb:2:in `<top (required)>'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in `require'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in <main>'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:9:in `each'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:9:in `block in <main>'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `select'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `<main>'
rake aborted!
Command failed with status (1): [/home/xn/.rvm/rubies/ruby-1.9.2-p290/bin/r...]
sudo riak attach
Attempting to restart script through sudo -u riak
Attaching to /tmp/riak/erlang.pipe.1 (^D to exit)

{ok, Client} = riak:local_client().
{ok,{riak_client,'riak@127.0.0.1',undefined}}
(riak@127.0.0.1)2> 
sudo riak  version
Attempting to restart script through sudo -u riak
riak (1.1.0 2012-02-19) Debian x86_64
bundle list
Gems included by the bundle:
  * activemodel (3.0.5)
  * activesupport (3.0.5)
  * adapter (0.5.2)
  * adapter-redis (0.5)
  * adapter-riak (0.5 0804769)
  * addressable (2.2.6)
  * archive-tar-minitar (0.5.2)
  * beefcake (0.3.7)
  * builder (2.1.2)
  * bundler (1.0.22)
  * capistrano (2.9.0)
  * capybara (1.1.2)
  * capybara-json (0.1.2)
  * capybara-webkit (0.10.0)
  * childprocess (0.2.3)
  * chunky_png (1.2.5)
  * colorize (0.5.8)
  * columnize (0.3.6)
  * compass (0.11.5)
  * crack (0.3.1)
  * daemons (1.1.4)
  * eventmachine (0.12.10)
  * faraday (0.7.5)
  * ffi (1.0.11)
  * ffi-rzmq (0.7.2)
  * foreman (0.26.1)
  * fssm (0.2.7)
  * gherkin-ruby (0.1.0)
  * guard (0.8.8)
  * guard-bundler (0.1.3)
  * guard-rocco (0.0.3)
  * guard-spinach (0.0.1.1)
  * guard-test (0.4.2)
  * guid (0.1.1)
  * haml (3.1.4)
  * hashie (1.2.0)
  * heroku (2.16.1)
  * highline (1.6.8)
  * httpclient (2.2.4)
  * i18n (0.6.0)
  * json (1.6.2)
  * kgio (2.7.0)
  * launchy (2.0.5)
  * linecache19 (0.5.12 869c6a6)
  * mail (2.3.0)
  * mapel (0.1.6)
  * metaclass (0.0.1)
  * mime-types (1.17.2)
  * mocha (0.10.0)
  * multi_json (1.0.4)
  * multipart-post (1.1.4)
  * mustache (0.99.4)
  * net-scp (1.0.4)
  * net-sftp (2.0.5)
  * net-ssh (2.2.1)
  * net-ssh-gateway (1.1.0)
  * newrelic_rpm (3.3.0)
  * nokogiri (1.5.0)
  * oauth (0.4.5)
  * oauth2 (0.5.1)
  * omniauth (1.0.1)
  * omniauth-facebook (1.0.0)
  * omniauth-github (1.0.1)
  * omniauth-oauth (1.0.0)
  * omniauth-oauth2 (1.0.0)
  * omniauth-twitter (0.0.7)
  * polyglot (0.3.3)
  * pony (1.3)
  * racc (1.4.7)
  * rack (1.3.5)
  * rack-contrib (1.1.0)
  * rack-flash (0.1.2)
  * rack-mongrel2 (0.2.4)
  * rack-protection (1.1.4)
  * rack-recaptcha (0.5.0)
  * rack-ssl (1.3.2)
  * rack-test (0.6.1)
  * rack-thumb (0.2.4)
  * raindrops (0.8.0)
  * rake (0.9.2.2)
  * rcov (0.9.11)
  * redcarpet (1.17.2)
  * redis (2.2.2)
  * redis-rack (0.0.0)
  * redis-store (1.0.0.1)
  * rest-client (1.6.7)
  * rexical (1.0.5)
  * riak-client (1.0.0.beta)
  * ripple (1.0.0.beta)
  * rocco (0.8.2)
  * ruby-debug-base19 (0.11.25)
  * ruby-debug-base19x (0.11.30.pre10)
  * ruby-debug19 (0.11.6)
  * ruby_core_source (0.1.5)
  * rubyzip (0.9.5)
  * sass (3.1.11)
  * selenium-webdriver (2.14.0)
  * settings (0.0.3)
  * shotgun (0.9)
  * shoulda (2.11.3)
  * show_me_the_cookies (1.1.0)
  * simple_uuid (0.1.2)
  * sinatra (1.3.1)
  * sinatra-content-for (0.2)
  * sinatra-hashfix (0.1.0)
  * soap4r (1.5.8 2460167)
  * spinach (0.3.0)
  * term-ansicolor (1.0.7)
  * test-unit (2.4.2)
  * thin (1.3.1)
  * thor (0.14.6)
  * tilt (1.3.3)
  * toystore (0.8.2 e6d1b20)
  * treetop (1.4.10)
  * tzinfo (0.3.31)
  * unicorn (4.1.1)
  * vcr (1.11.3)
  * webmock (1.7.8)
  * xpath (0.1.4)

---
:http_port: 9000
:pb_port: 9002
:host: 127.0.0.1
:env:
  :riak_core:
    :ring_creation_size: 64
    :http:
    - - 127.0.0.1
      - 9000
    :slide_private_dir: /tmp/.identity.riak/slide-data
    :ring_state_dir: /tmp/.identity.riak/ring
    :platform_bin_dir: /tmp/.identity.riak/bin
    :platform_etc_dir: /tmp/.identity.riak/etc
    :platform_log_dir: /tmp/.identity.riak/log
    :platform_data_dir: /tmp/.identity.riak/data
    :handoff_port: 8080
  :riak_kv:
    :storage_backend: :riak_kv_eleveldb_backend
    :map_js_vm_count: 8
    :reduce_js_vm_count: 6
    :hook_js_vm_count: 2
    :mapper_batch_size: 5
    :js_max_vm_mem: 8
    :js_thread_stack: 16
    :riak_kv_stat: true
    :legacy_stats: false
    :vnode_vclocks: true
    :http_url_encoding: :on
    :legacy_keylisting: false
    :mapred_system: :pipe
    :add_paths:
    - /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/ripple-6b5ac7fe139c/riak-client/erl_src
    :allow_strfun: true
    :map_cache_size: 0
    :pb_port: 9002
    :pb_ip: 127.0.0.1
  :riak_search:
    :enabled: true
    :search_backend: :riak_search_test_backend
  :luwak:
    :enabled: true
  :merge_index:
    :buffer_rollover_size: 1048576
    :max_compact_segments: 20
    :data_root: /tmp/.identity.riak/data/merge_index
  :eleveldb:
    :data_root: /tmp/.identity.riak/data/leveldb
  :bitcask:
    :data_root: /tmp/.identity.riak/data/bitcask
  :lager:
    :crash_log_size: 65536
    :error_logger_redirect: true
    :handlers:
      :lager_file_backend:
      - - /tmp/.identity.riak/log/error.log
        - :error
      - - /tmp/.identity.riak/log/console.log
        - :info
    :crash_log: /tmp/.identity.riak/log/crash.log
  :riak_sysmon:
    :process_limit: 30
    :port_limit: 30
    :gc_ms_limit: 50
    :heap_word_limit: 10485760
  :sasl:
    :sasl_error_logger: false
:root: /tmp/.identity.riak
:source: /usr/sbin
:vm:
  +K: true
  +A: 64
  -smp: enable
  +W: w
  -env ERL_MAX_PORTS: 4096
  -env ERL_FULLSWEEP_AFTER: 0
  -env ERL_CRASH_DUMP: /tmp/.identity.riak/log/erl_crash.dump
  -name: riak620134@127.0.0.1
  -setcookie: '41324_649470'

any ideas?

seancribbs commented 12 years ago

@xn Did you try deleting the generated directory and retrying? Also note that the test server will not work per-se with LevelDB. Unless you've monkey-patched the drop method, it expects the test backends to be used.

ntalbott commented 12 years ago

Another thing to check is to see if you already have a test beam process running; if you do, try killing it and then re-running.

xn commented 12 years ago

Thanks for the comments. Deleted sudo rm -rf /tmp/.identity.riak Then re-ran the tests...

** Invoke default (first_time)
** Invoke test (first_time)
** Execute test
/home/xn/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -I"lib:lib:test" -I"/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib" "/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb" "test/**/*_test.rb" 
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/soap4r-24601670d998/lib/xsd/charset.rb:13: warning: variable $KCODE is no longer effective
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/soap4r-24601670d998/lib/soap/property.rb:68: warning: encoding option is ignored - u
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/soap4r-24601670d998/lib/soap/property.rb:69: warning: encoding option is ignored - u
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/soap4r-24601670d998/lib/soap/property.rb:70: warning: encoding option is ignored - u
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/ripple-6b5ac7fe139c/riak-client/lib/riak/util/tcp_socket_extensions.rb:54:in `wait_for_service_termination_with_timeout': Socket did not terminate within 10 seconds (SocketError)
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/ripple-6b5ac7fe139c/riak-client/lib/riak/node/control.rb:202:in `wait_for_shutdown'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/ripple-6b5ac7fe139c/riak-client/lib/riak/node/control.rb:37:in `stop'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/ripple-6b5ac7fe139c/riak-client/lib/riak/test_server.rb:47:in `stop'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/ripple-6b5ac7fe139c/riak-client/lib/riak/node/generation.rb:44:in `delete'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bundler/gems/ripple-6b5ac7fe139c/riak-client/lib/riak/node/generation.rb:12:in `recreate'
    from /home/xn/sites/att-identity/test/support/ripple_test_server.rb:17:in `setup'
    from /home/xn/sites/att-identity/test/test_helper.rb:22:in `<top (required)>'
    from /home/xn/sites/att-identity/test/lib/oauth2/models/application_test.rb:2:in `require'
    from /home/xn/sites/att-identity/test/lib/oauth2/models/application_test.rb:2:in `<top (required)>'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in `require'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in <main>'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:9:in `each'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:9:in `block in <main>'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `select'
    from /home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `<main>'
rake aborted!
Command failed with status (1): [/home/xn/.rvm/rubies/ruby-1.9.2-p290/bin/r...]
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/file_utils.rb:82:in `ruby'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `ruby'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/testtask.rb:99:in `block (2 levels) in define'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:60:in `verbose'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/testtask.rb:98:in `block in define'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/xn/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/home/xn/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bin/rake:19:in `load'
/home/xn/.rvm/gems/ruby-1.9.2-p290@identity/bin/rake:19:in `<main>'
Tasks: TOP => default => test
xn commented 12 years ago

I do see that the test is trying to connect @ /tmp/.identity.riak and the console attaches to: /tmp/riak/erlang.pipe.1

ntalbott commented 12 years ago

@xn did you get this working? If not, can you create a small test project that shows the issue?

rafaelss commented 12 years ago

I'm having the same issue in an app I just started. so I created this small test project here: https://github.com/rafaelss/riak_issue_278 and here is the console output: https://github.com/rafaelss/riak_issue_278/blob/master/README.rdoc

I'm using ripple from git since latest release requires activemodel 3.0.x

let me know if you need something else.

martinstreicher commented 12 years ago

I had this issue after running the ripple rspec suite. To recover, I ran

    ps aux | grep riak 

and killed every process. I also deleted /tmp/usr and deleted _./tmp/riak_testserver. I could then run my app's rspec suite again.

mrinterweb commented 12 years ago

I ran into a similar problem and the way I was able to fix the problem was to, from the rails app root, rm -rf tmp/riak_test_server/ then kill the process called beam.smp. After I did these things, I did not encounter the problem.

ntalbott commented 12 years ago

Yes, this is a recurring issue that I haven't had a chance to investigate yet; I think it has to do with things not getting shut down properly if/when the machine reboots, but I'm not sure. Regardless of what's causing it, we need to add some code to recognize the situation when the test server is starting up and clean out the broken artifacts if necessary.

varchar commented 12 years ago

I can verify that this does still occur with beta2. Not sure which one of the above steps finally fixed the problem

tmcgilchrist commented 11 years ago

For what it's worth I'm also seeing this issue with beta2 and riak 1.2.1 on Mac OSX.

I fixed it by doing:

bavaro commented 11 years ago

We experience intermittent test failures running tests:

On RHEL 6 Using JRuby 1.7.1

Linux themachinename 2.6.32-220.7.1.el6.x86_64 #1 SMP Fri Feb 10 15:22:22 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

riak (1.2.1 2012-10-15) RedHat x86_64

jruby 1.7.1 (1.9.3p327) 2012-12-03 30a153b on Java HotSpot(TM) 64-Bit Server VM 1.7.0_09-b05 [linux-amd64]

Gemfile excerpt

gem 'rails', '3.2.9' gem 'riak-client', '1.1.0' gem 'ripple', :git => 'http://github.com/basho/ripple.git', :ref => '676cf259590ad000511202a7fa95cd0327ac8d9d'

Ripple.yml

test: http_port: 46270 min_port: 46271 host: 127.0.0.1 source: /usr/sbin root: /tmp/riak_test_server js_source_dir: <%= Rails.root + "app/mapreduce" %>

Test results:

1) Error: test_foo: RuntimeError: Could not find or open pipes for Riak console in /tmp/riak_test_server/pipe.[ Broken pipe - Broken pipe ] /vendor/bundle/jruby/1.9/gems/riak-client-1.1.0/lib/riak/node/console.rb:72:in initialize' /vendor/bundle/jruby/1.9/gems/riak-client-1.1.0/lib/riak/node/console.rb:22:inopen' /vendor/bundle/jruby/1.9/gems/riak-client-1.1.0/lib/riak/node/control.rb:71:in attach' /vendor/bundle/jruby/1.9/gems/riak-client-1.1.0/lib/riak/test_server.rb:69:inmaybe_attach' /vendor/bundle/jruby/1.9/gems/riak-client-1.1.0/lib/riak/test_server.rb:40:in start' /vendor/cache/ripple-676cf259590a/lib/ripple/test_server.rb:14:insetup' /test/test_helper.rb:11:in _callback_before_43' /vendor/bundle/jruby/1.9/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:443:in_run589859293setup2084328715callbacks' org/jruby/RubyBasicObject.java:1659:in __send__' org/jruby/RubyKernel.java:2086:insend' /vendor/bundle/jruby/1.9/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:405:in**run_callback' /vendor/bundle/jruby/1.9/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:390:in_run_setup_callbacks' org/jruby/RubyBasicObject.java:1659:in__send**' org/jruby/RubyKernel.java:2086:insend' /vendor/bundle/jruby/1.9/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:81:inrun_callbacks' /vendor/bundle/jruby/1.9/gems/activesupport-3.2.9/lib/active_support/testing/setup_and_teardown.rb:35:inrun'

crash.log and error.log are empty...

run_erl.log

run_erl [32389] Fri Dec 7 18:59:00 2012 Client expected on FIFO /tmp/riak_test_server/pipe/erlang.pipe.1.r, but can't open (len=2) run_erl [32389] Fri Dec 7 18:59:00 2012 Client expected on FIFO /tmp/riak_test_server/pipe/erlang.pipe.1.r, but can't open (len=2) run_erl [32389] Fri Dec 7 18:59:00 2012 Client expected on FIFO /tmp/riak_test_server/pipe/erlang.pipe.1.r, but can't open (len=1) run_erl [32389] Fri Dec 7 18:59:00 2012 Client expected on FIFO /tmp/riak_test_server/pipe/erlang.pipe.1.r, but can't open (len=1) run_erl [32389] Fri Dec 7 18:59:00 2012 Client expected on FIFO /tmp/riak_test_server/pipe/erlang.pipe.1.r, but can't open (len=1) run_erl [32389] Fri Dec 7 18:59:08 2012 Client expected on FIFO /tmp/riak_test_server/pipe/erlang.pipe.1.r, but can't open (len=2) run_erl [32389] Fri Dec 7 18:59:08 2012 Client expected on FIFO /tmp/riak_test_server/pipe/erlang.pipe.1.r, but can't open (len=1)

erlang_log.1

(riak129268@127.0.0.1)34> (riak129268@127.0.0.1)34> (riak129268@127.0.0.1)34> (riak129268@127.0.0.1)34> (riak129268@127.0.0.1)34> (riak129268@127.0.0.1)34> (riak129268@127.0.0.1)34> (riak129268@127.0.0.1)34> (riak129268@127.0.0.1)34> (riak129268@127.0.0.1)34> (riak129268@127.0.0.1)34> (riak129268@127.0.0.1)34> ok. ok (riak129268@127.0.0.1)35> riak_kv_memory_backend:reset(). ok (riak129268@127.0.0.1)36> riak_search_test_backend:reset(). ok (riak129268@127.0.0.1)37> riak_kv_memory_backend:reset(). ok (riak129268@127.0.0.1)38> riak_search_test_backend:reset(). ok (riak129268@127.0.0.1)39> riak_kv_memory_backend:reset(). ok (riak129268@127.0.0.1)40> riak_search_test_backend:reset(). ok (riak129268@127.0.0.1)41> riak_kv_memory_backend:reset(). ok (riak129268@127.0.0.1)42> riak_search_test_backend:reset(). ok (riak129268@127.0.0.1)43> riak_kv_memory_backend:reset(). ok (riak129268@127.0.0.1)44> riak_search_test_backend:reset(). ok (riak129268@127.0.0.1)45> riak_kv_memory_backend:reset(). ok (riak129268@127.0.0.1)46> riak_search_test_backend:reset(). ok (riak129268@127.0.0.1)47> riak_kv_memory_backend:reset(). ok (riak129268@127.0.0.1)48> riak_search_test_backend:reset(). ok (riak129268@127.0.0.1)49> riak_kv_memory_backend:reset(). ok (riak129268@127.0.0.1)50> riak_search_test_backend:reset(). ok (riak129268@127.0.0.1)51> riak_kv_memory_backend:reset(). ok (riak129268@127.0.0.1)52> riak_search_test_backend:reset(). ok (riak129268@127.0.0.1)53>

console.log

2012-12-07 18:58:59.769 [info] <0.7.0> Application lager started on node 'riak129268@127.0.0.1' 2012-12-07 18:58:59.806 [warning] <0.149.0>@riak_core_ring_manager:reload_ring:231 No ring file available. 2012-12-07 18:58:59.861 [info] <0.155.0>@riak_core_capability:process_capability_changes:529 New capability: {riak_core,vnode_routing} = proxy 2012-12-07 18:58:59.864 [info] <0.155.0>@riak_core_capability:process_capability_changes:529 New capability: {riak_core,staged_joins} = true 2012-12-07 18:58:59.879 [info] <0.7.0> Application riak_core started on node 'riak129268@127.0.0.1' 2012-12-07 18:58:59.903 [info] <0.262.0>@riak_core:wait_for_application:425 Waiting for application riak_pipe to start (0 seconds). 2012-12-07 18:58:59.904 [info] <0.7.0> Application riak_pipe started on node 'riak129268@127.0.0.1' 2012-12-07 18:58:59.927 [info] <0.271.0>@riak_core:wait_for_service:445 Waiting for service riak_kv to start (0 seconds) 2012-12-07 18:58:59.948 [info] <0.283.0>@riak_kv_js_vm:init:76 Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_map) host starting (<0.283.0>) 2012-12-07 18:58:59.953 [info] <0.284.0>@riak_kv_js_vm:init:76 Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_map) host starting (<0.284.0>) 2012-12-07 18:58:59.959 [info] <0.285.0>@riak_kv_js_vm:init:76 Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_map) host starting (<0.285.0>) 2012-12-07 18:58:59.965 [info] <0.286.0>@riak_kv_js_vm:init:76 Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_map) host starting (<0.286.0>) 2012-12-07 18:58:59.972 [info] <0.287.0>@riak_kv_js_vm:init:76 Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_map) host starting (<0.287.0>) 2012-12-07 18:58:59.978 [info] <0.288.0>@riak_kv_js_vm:init:76 Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_map) host starting (<0.288.0>) 2012-12-07 18:58:59.983 [info] <0.289.0>@riak_kv_js_vm:init:76 Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_map) host starting (<0.289.0>) 2012-12-07 18:58:59.989 [info] <0.290.0>@riak_kv_js_vm:init:76 Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_map) host starting (<0.290.0>) 2012-12-07 18:58:59.995 [info] <0.292.0>@riak_kv_js_vm:init:76 Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_reduce) host starting (<0.292.0>) 2012-12-07 18:58:59.999 [info] <0.293.0>@riak_kv_js_vm:init:76 Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_reduce) host starting (<0.293.0>) 2012-12-07 18:59:00.003 [info] <0.294.0>@riak_kv_js_vm:init:76 Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_reduce) host starting (<0.294.0>) 2012-12-07 18:59:00.005 [info] <0.262.0>@riak_core:wait_for_application:419 Wait complete for application riak_pipe (0 seconds) 2012-12-07 18:59:00.009 [info] <0.295.0>@riak_kv_js_vm:init:76 Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_reduce) host starting (<0.295.0>) 2012-12-07 18:59:00.013 [info] <0.296.0>@riak_kv_js_vm:init:76 Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_reduce) host starting (<0.296.0>) 2012-12-07 18:59:00.017 [info] <0.298.0>@riak_kv_js_vm:init:76 Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_reduce) host starting (<0.298.0>) 2012-12-07 18:59:00.020 [info] <0.391.0>@riak_kv_js_vm:init:76 Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_hook) host starting (<0.391.0>) 2012-12-07 18:59:00.030 [info] <0.428.0>@riak_kv_js_vm:init:76 Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_hook) host starting (<0.428.0>) 2012-12-07 18:59:00.133 [info] <0.155.0>@riak_core_capability:process_capability_changes:529 New capability: {riak_kv,vnode_vclocks} = true 2012-12-07 18:59:00.137 [info] <0.155.0>@riak_core_capability:process_capability_changes:529 New capability: {riak_kv,legacy_keylisting} = false 2012-12-07 18:59:00.141 [info] <0.155.0>@riak_core_capability:process_capability_changes:529 New capability: {riak_kv,listkeys_backpressure} = true 2012-12-07 18:59:00.205 [info] <0.155.0>@riak_core_capability:process_capability_changes:529 New capability: {riak_kv,mapred_system} = pipe 2012-12-07 18:59:00.211 [info] <0.155.0>@riak_core_capability:process_capability_changes:529 New capability: {riak_kv,mapred_2i_pipe} = true 2012-12-07 18:59:00.231 [info] <0.525.0>@riak_core:wait_for_application:425 Waiting for application riak_kv to start (0 seconds). 2012-12-07 18:59:00.236 [info] <0.7.0> Application riak_kv started on node 'riak129268@127.0.0.1' 2012-12-07 18:59:00.240 [info] <0.7.0> Application merge_index started on node 'riak129268@127.0.0.1' 2012-12-07 18:59:00.241 [info] <0.538.0>@riak_core:wait_for_service:445 Waiting for service riak_kv to start (0 seconds) 2012-12-07 18:59:00.332 [info] <0.525.0>@riak_core:wait_for_application:419 Wait complete for application riak_kv (0 seconds) 2012-12-07 18:59:00.432 [info] <0.271.0>@riak_core:wait_for_service:439 Wait complete for service riak_kv (0 seconds) 2012-12-07 18:59:00.443 [info] <0.538.0>@riak_core:wait_for_service:439 Wait complete for service riak_kv (0 seconds) 2012-12-07 18:59:00.460 [info] <0.1583.0>@riak_core:wait_for_application:425 Waiting for application riak_search to start (0 seconds). 2012-12-07 18:59:00.462 [info] <0.7.0> Application riak_search started on node 'riak129268@127.0.0.1' 2012-12-07 18:59:00.466 [warning] <0.1590.0>@riak_api_pb_listener:get_port:99 The config riak_kv/pb_port has been deprecated and will be removed. Use riak_api/pb_port in the future. 2012-12-07 18:59:00.466 [warning] <0.1590.0>@riak_api_pb_listener:get_ip:117 The config riak_kv/pb_ip has been deprecated and will be removed. Use riak_api/pb_ip in the future. 2012-12-07 18:59:00.473 [info] <0.7.0> Application riak_api started on node 'riak129268@127.0.0.1' 2012-12-07 18:59:00.476 [info] <0.7.0> Application cluster_info started on node 'riak129268@127.0.0.1' 2012-12-07 18:59:00.479 [info] <0.7.0> Application riak_control started on node 'riak129268@127.0.0.1' 2012-12-07 18:59:00.479 [info] <0.7.0> Application erlydtl started on node 'riak129268@127.0.0.1' 2012-12-07 18:59:00.562 [info] <0.1583.0>@riak_core:wait_for_application:419 Wait complete for application riak_search (0 seconds)

bavaro commented 11 years ago

I ran the tests again and included the debug flags

DEBUG_RIAK_CONSOLE=1 DEBUG_RIAK_TEST_SERVER=1 DEBUG_RIAK_NODE=1 jruby -I:"test" test/unit/foo_test.rb"

Running tests:

Opening write pipe. Opening read pipe. Broken pipe - Broken pipe Opening write pipe. Opening read pipe. Sending command "ok." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)53>Initialized console: #File:/tmp/riak_test_server/pipe/erlang.pipe.1.r #File:/tmp/riak_test_server/pipe/erlang.pipe.1.w Sending command "riak_kv_memory_backend:reset()." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)53>Sending command "riak_search_test_backend:reset()." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)53>ESending command "riak_kv_memory_backend:reset()." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)53>Sending command "riak_search_test_backend:reset()." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)53>.Sending command "riak_kv_memory_backend:reset()." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)53>Sending command "riak_search_test_backend:reset()." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)53>.Sending command "riak_kv_memory_backend:reset()." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)53>Sending command "riak_search_test_backend:reset()." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)53>.

Finished tests in 0.511000s, 7.8278 tests/s, 13.6986 assertions/s.

Finished tests in 0.511000s, 7.8278 tests/s, 13.6986 assertions/s.

1) Error: test_foo:...

bavaro commented 11 years ago

DEBUG_RIAK_CONSOLE=1 DEBUG_RIAK_TEST_SERVER=1 DEBUG_RIAK_NODE=1 jruby -I:"test" test/unit/foo_test.rb

*\ Mocha deprecation warning: Change require 'mocha' to require 'mocha/setup'.

Run options:

Running tests:

Opening write pipe. Opening read pipe. Sending command "ok." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)62>Initialized console: #File:/tmp/riak_test_server/pipe/erlang.pipe.1.r #File:/tmp/riak_test_server/pipe/erlang.pipe.1.w Sending command "riak_kv_memory_backend:reset()." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)62>Sending command "riak_search_test_backend:reset()." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)62>.Sending command "riak_kv_memory_backend:reset()." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)62>Sending command "riak_search_test_backend:reset()." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)62>.Sending command "riak_kv_memory_backend:reset()." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)62>Sending command "riak_search_test_backend:reset()." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)62>.Sending command "riak_kv_memory_backend:reset()." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)62>Sending command "riak_search_test_backend:reset()." Scanning for /(riak129268@127.0.0.1)\d+>\s*/

(riak129268@127.0.0.1)62>.

Finished tests in 0.641000s, 6.2402 tests/s, 17.1607 assertions/s.

4 tests, 11 assertions, 0 failures, 0 errors, 0 skips

bavaro commented 11 years ago

We have decided to move away from using Riak::TestServer until we can dedicate some time to debugging this issue.

mfilej commented 11 years ago

This started appearing sporadically in our travis builds since we upgraded to one of the latest SHAs that use riak-client 1.1.0 instead of 1.0.0.

carmi commented 11 years ago

Has there been any progress on this issue? I'm also getting this error. I can get around it sometimes but it continues to occur occasionally. It'd be really great if there was some way to catch when this error happens and fix whatever is causing it.

kloudLinden commented 11 years ago

I've tried all of the above but still get this everytime: /Users/administrator/.rvm/gems/ruby-1.9.3-p125/gems/riak-client-1.4.1/lib/riak/util/tcp_socket_extensions.rb:42:inwait_for_service_with_timeout': Socket did not open within 10 seconds (SocketError)"