Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running a ruby app via cocaine-tool #5

Open
faucct opened this issue Apr 17, 2016 · 4 comments
Open

Running a ruby app via cocaine-tool #5

faucct opened this issue Apr 17, 2016 · 4 comments

Comments

@faucct
Copy link

faucct commented Apr 17, 2016

Hello, I am trying to run a simple ruby app like the qr-code generator from the tutorial (https://github.com/cocaine/cocaine-vagrant) and I can't understand some things.

  1. What should I write in manifest.json so the app could be started? I have used this configuration and cocaine-tool app start tells me everything is fine:
# manifest.json
{
  "slave": "main.rb"
}

It seems like it does not work at all, because in case of python app I see this when do an http request and call ps:

cocaine  11614  2166  3 12:40 ?        00:00:00 python /var/spool/cocaine/qr/app.py --app qr --endpoint /var/run/cocaine/qr.2166 --locator precise64:10053 --uuid da02ac97-7637-4c9

And this is the case of ruby app and the request hangs until I cocaine-tool app stop the ruby app:

cocaine  11613  2166  0 12:40 ?        00:00:00 [service/node] <defunct>
  1. How can I debug those things? I have found a --debug all option for cocaine-tool commands but it does not seem useful at all. Also, I was trying to read the /var/log/cocaine-python-proxy.log file and its content was not any more helpful:
[2016-04-17 12:18:00,526] INFO    : Start asynchronous reconnect ruby
[2016-04-17 12:18:00,528] INFO    : Reconnect ruby 37678096 to 127.0.1.1:45734 successfully.
[2016-04-17 12:18:00,528] INFO    : Next update 37678096 after 199 second
[2016-04-17 12:18:01,304] INFO    : Start asynchronous reconnect ruby
[2016-04-17 12:18:01,306] INFO    : Reconnect ruby 37676560 to 127.0.1.1:45734 successfully.
[2016-04-17 12:18:01,306] INFO    : Next update 37676560 after 193 second
[2016-04-17 12:18:03,523] INFO    : Move to inactive queue ruby 127.0.1.1:45734 from pool with active 7
[2016-04-17 12:18:05,528] INFO    : Start asynchronous reconnect ruby
[2016-04-17 12:18:05,530] INFO    : Reconnect ruby 38567504 to 127.0.1.1:45734 successfully.
[2016-04-17 12:18:05,530] INFO    : Next update 38567504 after 147 second
  1. Here is my simple app code I wrote looking at your python example and cocaine-framework-ruby gem:
# main.rb
require 'cocaine'

worker = Cocaine::WorkerFactory.create
worker.on 'generate' do |tx_channel, rx|
  # ...
end
worker.run

Still I have no idea what can I do inside a block to respond with something: in cocaine-framework-ruby gem it is said that Cocaine::TxChannel is a Writer channel and should be used for patching the response, but the problem is that it does not have any public methods on it.

@faucct
Copy link
Author

faucct commented Apr 20, 2016

Okay, I have managed to run my ruby app through the python app and discovered crashlog, but something crazy is going on here - it looks like something is incrementing the message id for no reason. Here are the logs I get:

vagrant@precise64:/vagrant/examples/ruby$ cocaine-tool crashlog list -n ruby
     Timestamp                  Time                            UUID                
  1461182540664530    Wed Apr 20 20:02:20 2016  6b897694-b3b0-41be-8ea7-c0434a74df23
  1461182803461751    Wed Apr 20 20:06:43 2016  693c8e6a-d304-44d5-bd0a-b3c7a932a500
  1461182981592310    Wed Apr 20 20:09:41 2016  9e424f7a-0b63-43c9-a8e5-5de6047e55ed
  1461183052842028    Wed Apr 20 20:10:52 2016  0029860d-c3ed-4712-a1cf-0a62e6c887db
  1461183110097774    Wed Apr 20 20:11:50 2016  6ac2f57b-6a40-44f7-9a4c-30ef5d7e57cf
  1461183222773302    Wed Apr 20 20:13:42 2016  b7becc7c-792f-4161-8228-3b6df92fa721
  1461184638136516    Wed Apr 20 20:37:18 2016  18db7600-b9bf-4ea6-bb5d-b296697dc03e
  1461184722650364    Wed Apr 20 20:38:42 2016  72fcc7a3-bd05-4ae0-9be3-e2fe256d3fa2
  1461184896835595    Wed Apr 20 20:41:36 2016  44823094-b8ff-4d1a-803a-24249ad0a2ee
  1461184922933705    Wed Apr 20 20:42:02 2016  e24b1928-2402-4fe9-8466-f7ce831dcb75
  1461184967872328    Wed Apr 20 20:42:47 2016  807b5fd4-c9fb-4b94-81fc-8c6cd48dfbaf
  1461184991586138    Wed Apr 20 20:43:11 2016  f2e3e06f-cd0e-4bca-8ed5-5b3a12849ec5
  1461185731891770    Wed Apr 20 20:55:31 2016  b251f347-5d7d-4664-bab7-08261d3e3815
vagrant@precise64:/vagrant/examples/ruby$ cocaine-tool crashlog view -n ruby -t 1461184638136516
I, [2016-04-20T20:37:18.115276 #3197]  INFO -- : Celluloid 0.17.3 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
D, [2016-04-20T20:37:18.131762 #3197] DEBUG -- : Options: {:protocol=>0, :app=>"ruby", :endpoint=>"/var/run/cocaine/ruby.2621", :locator=>"precise64:10053", :uuid=>"18db7600-b9bf-4ea6-bb5d-b296697dc03e"}
D, [2016-04-20T20:37:18.132719 #3197] DEBUG -- : Setting default Locator endpoints to ["precise64:10053"]
D, [2016-04-20T20:37:18.134907 #3197] DEBUG -- : Starting worker 'ruby' with uuid '18db7600-b9bf-4ea6-bb5d-b296697dc03e' at '/var/run/cocaine/ruby.2621'
D, [2016-04-20T20:37:18.135234 #3197] DEBUG -- : <- Handshake
D, [2016-04-20T20:37:18.135514 #3197] DEBUG -- : <- Heartbeat
D, [2016-04-20T20:37:18.136089 #3197] DEBUG -- : -> Message(1, 0, [], [])
W, [2016-04-20T20:37:18.136141 #3197]  WARN -- : Received unknown message: [1, 0, []]
D, [2016-04-20T20:37:18.136225 #3197] DEBUG -- : -> Message(3, 2, ["generate"], [])
E, [2016-04-20T20:37:18.136362 #3197] ERROR -- : Actor crashed!
ArgumentError: wrong number of arguments (given 1, expected 2)
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/cocaine-framework-ruby-69070f475f60/lib/cocaine/cocaine.rb:504:in `terminate'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/cocaine-framework-ruby-69070f475f60/lib/cocaine/cocaine.rb:453:in `received'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28:in `public_send'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28:in `dispatch'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/call/async.rb:7:in `dispatch'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/cell.rb:50:in `block in dispatch'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/cell.rb:76:in `block in task'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:339:in `block in task'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/task.rb:44:in `block in initialize'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/task/fibered.rb:14:in `block in create'
vagrant@precise64:/vagrant/examples/ruby$ cocaine-tool crashlog view -n ruby -t 1461184722650364
I, [2016-04-20T20:38:42.633186 #3234]  INFO -- : Celluloid 0.17.3 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
D, [2016-04-20T20:38:42.646442 #3234] DEBUG -- : Options: {:protocol=>0, :app=>"ruby", :endpoint=>"/var/run/cocaine/ruby.2621", :locator=>"precise64:10053", :uuid=>"72fcc7a3-bd05-4ae0-9be3-e2fe256d3fa2"}
D, [2016-04-20T20:38:42.646555 #3234] DEBUG -- : Setting default Locator endpoints to ["precise64:10053"]
D, [2016-04-20T20:38:42.648195 #3234] DEBUG -- : Starting worker 'ruby' with uuid '72fcc7a3-bd05-4ae0-9be3-e2fe256d3fa2' at '/var/run/cocaine/ruby.2621'
D, [2016-04-20T20:38:42.648589 #3234] DEBUG -- : <- Handshake
D, [2016-04-20T20:38:42.648840 #3234] DEBUG -- : <- Heartbeat
D, [2016-04-20T20:38:42.649477 #3234] DEBUG -- : -> Message(1, 0, [], [])
W, [2016-04-20T20:38:42.649531 #3234]  WARN -- : Received unknown message: [1, 0, []]
D, [2016-04-20T20:38:42.649611 #3234] DEBUG -- : -> Message(3, 3, ["generate"], [])
D, [2016-04-20T20:38:42.649650 #3234] DEBUG -- : Invoking new 3 channel with generate event
D, [2016-04-20T20:38:42.649672 #3234] DEBUG -- : Defined 'write' method for tx channel
D, [2016-04-20T20:38:42.649694 #3234] DEBUG -- : Defined 'error' method for tx channel
D, [2016-04-20T20:38:42.649707 #3234] DEBUG -- : Defined 'close' method for tx channel
D, [2016-04-20T20:38:42.650007 #3234] DEBUG -- : -> Message(4, 3, ["\x95\xA3GET\xA8/123/123\xA8HTTP/1.1\x99\x92\xA3_ga\xBAGA1.1.557806193.1432130462\x92\xAFAccept-Language\xA2ru\x92\xAFAccept-Encoding\xADgzip, deflate\x92\xAAConnection\xAAkeep-alive\x92\xA6Accept\xDA\u0000?text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\x92\xAAUser-Agent\xDA\u0000tMozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17\x92\xA4Host\xAFlocalhost:48080\x92\xA6Cookie\xBE_ga=GA1.1.557806193.1432130462\x92\xADCache-Control\xA9max-age=0\xA0"], [])
D, [2016-04-20T20:38:42.650053 #3234] DEBUG -- : Invoking new 4 channel with ??GET?/123/123?HTTP/1.1???_ga?GA1.1.557806193.1432130462??Accept-Language?ru??Accept-Encoding?gzip, deflate??Connection?keep-alive??Accept??text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8??User-Agent?tMozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17??Host?localhost:48080??Cookie?_ga=GA1.1.557806193.1432130462??Cache-Control?max-age=0? event
D, [2016-04-20T20:38:42.650073 #3234] DEBUG -- : Defined 'write' method for tx channel
D, [2016-04-20T20:38:42.650091 #3234] DEBUG -- : Defined 'error' method for tx channel
D, [2016-04-20T20:38:42.650103 #3234] DEBUG -- : Defined 'close' method for tx channel
W, [2016-04-20T20:38:42.650128 #3234]  WARN -- : Event '??GET?/123/123?HTTP/1.1???_ga?GA1.1.557806193.1432130462??Accept-Language?ru??Accept-Encoding?gzip, deflate??Connection?keep-alive??Accept??text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8??User-Agent?tMozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17??Host?localhost:48080??Cookie?_ga=GA1.1.557806193.1432130462??Cache-Control?max-age=0?' is not registered
D, [2016-04-20T20:38:42.650173 #3234] DEBUG -- : <- [4, 5, [-1, "event '\x95\xA3GET\xA8/123/123\xA8HTTP/1.1\x99\x92\xA3_ga\xBAGA1.1.557806193.1432130462\x92\xAFAccept-Language\xA2ru\x92\xAFAccept-Encoding\xADgzip, deflate\x92\xAAConnection\xAAkeep-alive\x92\xA6Accept\xDA\u0000?text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\x92\xAAUser-Agent\xDA\u0000tMozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17\x92\xA4Host\xAFlocalhost:48080\x92\xA6Cookie\xBE_ga=GA1.1.557806193.1432130462\x92\xADCache-Control\xA9max-age=0\xA0' is not registered"]]
vagrant@precise64:/vagrant/examples/ruby$ cocaine-tool crashlog view -n ruby -t 1461184722650364
I, [2016-04-20T20:38:42.633186 #3234]  INFO -- : Celluloid 0.17.3 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
D, [2016-04-20T20:38:42.646442 #3234] DEBUG -- : Options: {:protocol=>0, :app=>"ruby", :endpoint=>"/var/run/cocaine/ruby.2621", :locator=>"precise64:10053", :uuid=>"72fcc7a3-bd05-4ae0-9be3-e2fe256d3fa2"}
D, [2016-04-20T20:38:42.646555 #3234] DEBUG -- : Setting default Locator endpoints to ["precise64:10053"]
D, [2016-04-20T20:38:42.648195 #3234] DEBUG -- : Starting worker 'ruby' with uuid '72fcc7a3-bd05-4ae0-9be3-e2fe256d3fa2' at '/var/run/cocaine/ruby.2621'
D, [2016-04-20T20:38:42.648589 #3234] DEBUG -- : <- Handshake
D, [2016-04-20T20:38:42.648840 #3234] DEBUG -- : <- Heartbeat
D, [2016-04-20T20:38:42.649477 #3234] DEBUG -- : -> Message(1, 0, [], [])
W, [2016-04-20T20:38:42.649531 #3234]  WARN -- : Received unknown message: [1, 0, []]
D, [2016-04-20T20:38:42.649611 #3234] DEBUG -- : -> Message(3, 3, ["generate"], [])
D, [2016-04-20T20:38:42.649650 #3234] DEBUG -- : Invoking new 3 channel with generate event
D, [2016-04-20T20:38:42.649672 #3234] DEBUG -- : Defined 'write' method for tx channel
D, [2016-04-20T20:38:42.649694 #3234] DEBUG -- : Defined 'error' method for tx channel
D, [2016-04-20T20:38:42.649707 #3234] DEBUG -- : Defined 'close' method for tx channel
D, [2016-04-20T20:38:42.650007 #3234] DEBUG -- : -> Message(4, 3, ["\x95\xA3GET\xA8/123/123\xA8HTTP/1.1\x99\x92\xA3_ga\xBAGA1.1.557806193.1432130462\x92\xAFAccept-Language\xA2ru\x92\xAFAccept-Encoding\xADgzip, deflate\x92\xAAConnection\xAAkeep-alive\x92\xA6Accept\xDA\u0000?text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\x92\xAAUser-Agent\xDA\u0000tMozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17\x92\xA4Host\xAFlocalhost:48080\x92\xA6Cookie\xBE_ga=GA1.1.557806193.1432130462\x92\xADCache-Control\xA9max-age=0\xA0"], [])
D, [2016-04-20T20:38:42.650053 #3234] DEBUG -- : Invoking new 4 channel with ??GET?/123/123?HTTP/1.1???_ga?GA1.1.557806193.1432130462??Accept-Language?ru??Accept-Encoding?gzip, deflate??Connection?keep-alive??Accept??text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8??User-Agent?tMozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17??Host?localhost:48080??Cookie?_ga=GA1.1.557806193.1432130462??Cache-Control?max-age=0? event
D, [2016-04-20T20:38:42.650073 #3234] DEBUG -- : Defined 'write' method for tx channel
D, [2016-04-20T20:38:42.650091 #3234] DEBUG -- : Defined 'error' method for tx channel
D, [2016-04-20T20:38:42.650103 #3234] DEBUG -- : Defined 'close' method for tx channel
W, [2016-04-20T20:38:42.650128 #3234]  WARN -- : Event '??GET?/123/123?HTTP/1.1???_ga?GA1.1.557806193.1432130462??Accept-Language?ru??Accept-Encoding?gzip, deflate??Connection?keep-alive??Accept??text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8??User-Agent?tMozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17??Host?localhost:48080??Cookie?_ga=GA1.1.557806193.1432130462??Cache-Control?max-age=0?' is not registered
D, [2016-04-20T20:38:42.650173 #3234] DEBUG -- : <- [4, 5, [-1, "event '\x95\xA3GET\xA8/123/123\xA8HTTP/1.1\x99\x92\xA3_ga\xBAGA1.1.557806193.1432130462\x92\xAFAccept-Language\xA2ru\x92\xAFAccept-Encoding\xADgzip, deflate\x92\xAAConnection\xAAkeep-alive\x92\xA6Accept\xDA\u0000?text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\x92\xAAUser-Agent\xDA\u0000tMozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17\x92\xA4Host\xAFlocalhost:48080\x92\xA6Cookie\xBE_ga=GA1.1.557806193.1432130462\x92\xADCache-Control\xA9max-age=0\xA0' is not registered"]]
vagrant@precise64:/vagrant/examples/ruby$ cocaine-tool crashlog view -n ruby -t 1461184896835595
I, [2016-04-20T20:41:36.817879 #3272]  INFO -- : Celluloid 0.17.3 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
D, [2016-04-20T20:41:36.831117 #3272] DEBUG -- : Options: {:protocol=>0, :app=>"ruby", :endpoint=>"/var/run/cocaine/ruby.2621", :locator=>"precise64:10053", :uuid=>"44823094-b8ff-4d1a-803a-24249ad0a2ee"}
D, [2016-04-20T20:41:36.831206 #3272] DEBUG -- : Setting default Locator endpoints to ["precise64:10053"]
D, [2016-04-20T20:41:36.833256 #3272] DEBUG -- : Starting worker 'ruby' with uuid '44823094-b8ff-4d1a-803a-24249ad0a2ee' at '/var/run/cocaine/ruby.2621'
D, [2016-04-20T20:41:36.833753 #3272] DEBUG -- : <- Handshake
D, [2016-04-20T20:41:36.834151 #3272] DEBUG -- : <- Heartbeat
D, [2016-04-20T20:41:36.834958 #3272] DEBUG -- : -> Message(1, 0, [], [])
W, [2016-04-20T20:41:36.835033 #3272]  WARN -- : Received unknown message: [1, 0, []]
D, [2016-04-20T20:41:36.835296 #3272] DEBUG -- : -> Message(3, 4, ["generate"], [])
E, [2016-04-20T20:41:36.835424 #3272] ERROR -- : Actor crashed!
Exception: received push event on unknown 3 session
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/cocaine-framework-ruby-69070f475f60/lib/cocaine/cocaine.rb:495:in `push'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/cocaine-framework-ruby-69070f475f60/lib/cocaine/cocaine.rb:457:in `received'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28:in `public_send'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28:in `dispatch'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/call/async.rb:7:in `dispatch'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/cell.rb:50:in `block in dispatch'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/cell.rb:76:in `block in task'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:339:in `block in task'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/task.rb:44:in `block in initialize'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/task/fibered.rb:14:in `block in create'
vagrant@precise64:/vagrant/examples/ruby$ cocaine-tool crashlog view -n ruby -t 1461184922933705
I, [2016-04-20T20:42:02.914799 #3309]  INFO -- : Celluloid 0.17.3 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
D, [2016-04-20T20:42:02.930053 #3309] DEBUG -- : Options: {:protocol=>0, :app=>"ruby", :endpoint=>"/var/run/cocaine/ruby.2621", :locator=>"precise64:10053", :uuid=>"e24b1928-2402-4fe9-8466-f7ce831dcb75"}
D, [2016-04-20T20:42:02.930172 #3309] DEBUG -- : Setting default Locator endpoints to ["precise64:10053"]
D, [2016-04-20T20:42:02.931959 #3309] DEBUG -- : Starting worker 'ruby' with uuid 'e24b1928-2402-4fe9-8466-f7ce831dcb75' at '/var/run/cocaine/ruby.2621'
D, [2016-04-20T20:42:02.932284 #3309] DEBUG -- : <- Handshake
D, [2016-04-20T20:42:02.932528 #3309] DEBUG -- : <- Heartbeat
D, [2016-04-20T20:42:02.933251 #3309] DEBUG -- : -> Message(1, 0, [], [])
W, [2016-04-20T20:42:02.933303 #3309]  WARN -- : Received unknown message: [1, 0, []]
D, [2016-04-20T20:42:02.933387 #3309] DEBUG -- : -> Message(3, 5, ["generate"], [])
E, [2016-04-20T20:42:02.933500 #3309] ERROR -- : Actor crashed!
Exception: received push event on unknown 3 session
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/cocaine-framework-ruby-69070f475f60/lib/cocaine/cocaine.rb:495:in `push'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/cocaine-framework-ruby-69070f475f60/lib/cocaine/cocaine.rb:459:in `received'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28:in `public_send'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28:in `dispatch'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/call/async.rb:7:in `dispatch'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/cell.rb:50:in `block in dispatch'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/cell.rb:76:in `block in task'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:339:in `block in task'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/task.rb:44:in `block in initialize'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/task/fibered.rb:14:in `block in create'
vagrant@precise64:/vagrant/examples/ruby$ cocaine-tool crashlog view -n ruby -t 1461184967872328
I, [2016-04-20T20:42:47.855513 #3346]  INFO -- : Celluloid 0.17.3 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
D, [2016-04-20T20:42:47.869425 #3346] DEBUG -- : Options: {:protocol=>0, :app=>"ruby", :endpoint=>"/var/run/cocaine/ruby.2621", :locator=>"precise64:10053", :uuid=>"807b5fd4-c9fb-4b94-81fc-8c6cd48dfbaf"}
D, [2016-04-20T20:42:47.869513 #3346] DEBUG -- : Setting default Locator endpoints to ["precise64:10053"]
D, [2016-04-20T20:42:47.870978 #3346] DEBUG -- : Starting worker 'ruby' with uuid '807b5fd4-c9fb-4b94-81fc-8c6cd48dfbaf' at '/var/run/cocaine/ruby.2621'
D, [2016-04-20T20:42:47.871192 #3346] DEBUG -- : <- Handshake
D, [2016-04-20T20:42:47.871364 #3346] DEBUG -- : <- Heartbeat
D, [2016-04-20T20:42:47.871765 #3346] DEBUG -- : -> Message(1, 0, [], [])
W, [2016-04-20T20:42:47.871926 #3346]  WARN -- : Received unknown message: [1, 0, []]
D, [2016-04-20T20:42:47.872053 #3346] DEBUG -- : -> Message(3, 6, ["generate"], [])
E, [2016-04-20T20:42:47.872182 #3346] ERROR -- : Actor crashed!
Exception: received push event on unknown 3 session
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/cocaine-framework-ruby-69070f475f60/lib/cocaine/cocaine.rb:495:in `push'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/cocaine-framework-ruby-69070f475f60/lib/cocaine/cocaine.rb:462:in `received'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28:in `public_send'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28:in `dispatch'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/call/async.rb:7:in `dispatch'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/cell.rb:50:in `block in dispatch'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/cell.rb:76:in `block in task'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:339:in `block in task'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/task.rb:44:in `block in initialize'
    /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/celluloid-0.17.3/lib/celluloid/task/fibered.rb:14:in `block in create'
vagrant@precise64:/vagrant/examples/ruby$ cocaine-tool crashlog view -n ruby -t 1461184991586138
I, [2016-04-20T20:43:11.438242 #3383]  INFO -- : Celluloid 0.17.3 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
D, [2016-04-20T20:43:11.451241 #3383] DEBUG -- : Options: {:protocol=>0, :app=>"ruby", :endpoint=>"/var/run/cocaine/ruby.2621", :locator=>"precise64:10053", :uuid=>"f2e3e06f-cd0e-4bca-8ed5-5b3a12849ec5"}
D, [2016-04-20T20:43:11.451363 #3383] DEBUG -- : Setting default Locator endpoints to ["precise64:10053"]
D, [2016-04-20T20:43:11.453166 #3383] DEBUG -- : Starting worker 'ruby' with uuid 'f2e3e06f-cd0e-4bca-8ed5-5b3a12849ec5' at '/var/run/cocaine/ruby.2621'
D, [2016-04-20T20:43:11.453679 #3383] DEBUG -- : <- Handshake
D, [2016-04-20T20:43:11.454036 #3383] DEBUG -- : <- Heartbeat
D, [2016-04-20T20:43:11.455093 #3383] DEBUG -- : -> Message(1, 0, [], [])
W, [2016-04-20T20:43:11.455203 #3383]  WARN -- : Received unknown message: [1, 0, []]
D, [2016-04-20T20:43:11.455329 #3383] DEBUG -- : -> Message(3, 7, ["generate"], [])
W, [2016-04-20T20:43:11.455381 #3383]  WARN -- : Received unknown message: [3, 7, ["generate"]]
D, [2016-04-20T20:43:11.455495 #3383] DEBUG -- : -> Message(4, 7, ["\x95\xA3GET\xDA\u0000#/?message=Hello,%20cocaine%20world!\xA8HTTP/1.1\x99\x92\xA3_ga\xBAGA1.1.557806193.1432130462\x92\xAFAccept-Language\xA2ru\x92\xAFAccept-Encoding\xADgzip, deflate\x92\xAAConnection\xAAkeep-alive\x92\xA6Accept\xDA\u0000?text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\x92\xAAUser-Agent\xDA\u0000tMozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17\x92\xA4Host\xAFlocalhost:48080\x92\xA6Cookie\xBE_ga=GA1.1.557806193.1432130462\x92\xADCache-Control\xA9max-age=0\xA0"], [])
W, [2016-04-20T20:43:11.455559 #3383]  WARN -- : Received unknown message: [4, 7, ["\x95\xA3GET\xDA\u0000#/?message=Hello,%20cocaine%20world!\xA8HTTP/1.1\x99\x92\xA3_ga\xBAGA1.1.557806193.1432130462\x92\xAFAccept-Language\xA2ru\x92\xAFAccept-Encoding\xADgzip, deflate\x92\xAAConnection\xAAkeep-alive\x92\xA6Accept\xDA\u0000?text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\x92\xAAUser-Agent\xDA\u0000tMozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17\x92\xA4Host\xAFlocalhost:48080\x92\xA6Cookie\xBE_ga=GA1.1.557806193.1432130462\x92\xADCache-Control\xA9max-age=0\xA0"]]
D, [2016-04-20T20:43:11.455663 #3383] DEBUG -- : -> Message(6, 7, [], [])
W, [2016-04-20T20:43:11.455713 #3383]  WARN -- : Received unknown message: [6, 7, []]
vagrant@precise64:/vagrant/examples/ruby$ cocaine-tool crashlog view -n ruby -t 1461185731891770
I, [2016-04-20T20:55:31.741836 #3425]  INFO -- : Celluloid 0.17.3 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
D, [2016-04-20T20:55:31.761108 #3425] DEBUG -- : Options: {:protocol=>0, :app=>"ruby", :endpoint=>"/var/run/cocaine/ruby.2621", :locator=>"precise64:10053", :uuid=>"b251f347-5d7d-4664-bab7-08261d3e3815"}
D, [2016-04-20T20:55:31.761242 #3425] DEBUG -- : Setting default Locator endpoints to ["precise64:10053"]
D, [2016-04-20T20:55:31.763036 #3425] DEBUG -- : Starting worker 'ruby' with uuid 'b251f347-5d7d-4664-bab7-08261d3e3815' at '/var/run/cocaine/ruby.2621'
D, [2016-04-20T20:55:31.763782 #3425] DEBUG -- : <- Handshake
D, [2016-04-20T20:55:31.764020 #3425] DEBUG -- : <- Heartbeat
D, [2016-04-20T20:55:31.764715 #3425] DEBUG -- : -> Message(1, 0, [], [])
W, [2016-04-20T20:55:31.764776 #3425]  WARN -- : Received unknown message: [1, 0, []]
D, [2016-04-20T20:55:31.764879 #3425] DEBUG -- : -> Message(3, 8, ["generate"], [])
W, [2016-04-20T20:55:31.764927 #3425]  WARN -- : Received unknown message: [3, 8, ["generate"]]
D, [2016-04-20T20:55:31.765030 #3425] DEBUG -- : -> Message(4, 8, ["\x95\xA3GET\xDA\u0000#/?message=Hello,%20cocaine%20world!\xA8HTTP/1.1\x99\x92\xA3_ga\xBAGA1.1.557806193.1432130462\x92\xAFAccept-Language\xA2ru\x92\xAFAccept-Encoding\xADgzip, deflate\x92\xAAConnection\xAAkeep-alive\x92\xA6Accept\xDA\u0000?text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\x92\xAAUser-Agent\xDA\u0000tMozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17\x92\xA4Host\xAFlocalhost:48080\x92\xA6Cookie\xBE_ga=GA1.1.557806193.1432130462\x92\xADCache-Control\xA9max-age=0\xA0"], [])
W, [2016-04-20T20:55:31.765088 #3425]  WARN -- : Received unknown message: [4, 8, ["\x95\xA3GET\xDA\u0000#/?message=Hello,%20cocaine%20world!\xA8HTTP/1.1\x99\x92\xA3_ga\xBAGA1.1.557806193.1432130462\x92\xAFAccept-Language\xA2ru\x92\xAFAccept-Encoding\xADgzip, deflate\x92\xAAConnection\xAAkeep-alive\x92\xA6Accept\xDA\u0000?text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\x92\xAAUser-Agent\xDA\u0000tMozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17\x92\xA4Host\xAFlocalhost:48080\x92\xA6Cookie\xBE_ga=GA1.1.557806193.1432130462\x92\xADCache-Control\xA9max-age=0\xA0"]]
D, [2016-04-20T20:55:31.765182 #3425] DEBUG -- : -> Message(6, 8, [], [])
W, [2016-04-20T20:55:31.765243 #3425]  WARN -- : Received unknown message: [6, 8, []]

@kobolog
Copy link
Member

kobolog commented Apr 20, 2016

Hey @3Hren can you help here?

@3Hren
Copy link
Member

3Hren commented Apr 20, 2016

Well, seems like this 9d680e3 commit ruins everything since it just returns ancient behavior for reasons I can't understand myself. Maybe I was drunk or something else.

I'll retest and probably revoke this commit. For now, try 0.12.0-rc22 version, should help.

@faucct
Copy link
Author

faucct commented Apr 21, 2016

I guess I have found the main problem: the highest cocaine-core version contained in the package repo from the example is 0.11.0. It seems that it is not compatible with this gem of version 0.12.*. Now I am trying to build the cocaine-core from source by the guide you have and it fails. Nevermind, that was related to a low amount of memory I was giving to the VM. Still, is there any repo I could install the up-to-date version of cocaine-core instead of building it from the source?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants