FAQ
Hi...I'm seeing the following error when my micro bosh vm starts up and the
cli tries to ping it or when I deploy a new cf-release vm and it tries to
ping director on my micro bosh vm:

E, [2013-07-23T01:57:37.356368 #6256] [task:116] ERROR -- : unknown message
{"method"=>{"json_class"=>"Symbol", "s"=>"ping"}, "arguments"=>[],
"reply_to"=>"director.c7fd3b27-7532-4cbd-9bb5-26826641fc14.5bf26f77-4797-4292-907b-59cae5850916"}

I notice that if I change the lookup method in the agent's handler.rb to
look like this it works:

def lookup(method)
       #processors[method["s"]]
       @processors[method]
     end

So I'm wondering if I have a new/old version of a gem or ruby or something.
  Any thoughts?

Thanks,
Ethan

Search Discussions

  • Ekmerril at Jul 23, 2013 at 11:56 am
    Sorry, actually the change to handler.rb looks like this. However this
    then causes other messages to break in the communication flow, i.e. it
    seems like the other messages would work with the original lookup code. I
    also see that the message itself comes across differently in each case. In
    the case where my change works the message is non-escaped json and when the
    original code works it is escaped.

    def lookup(method)
           processors[method["s"]]
           #@processors[method]
         end

    Ethan
  • Ekmerril at Jul 23, 2013 at 12:26 pm
    Sorry, one more post to help clarify (I think). It appears that the
    problem is with the json of the message is being formed. The following is
    what the agents are getting:

    {"method"=>{"json_class"=>"Symbol", "s"=>"ping"}

    And really what they're expecting seems to be:

    {"method"=>"ping"}

    I'm searching around on this and it looks like it might be a gem versioning
    problem but if you guys know offhand please let me know.

    Ethan
  • Ferran Rodenas at Jul 23, 2013 at 1:38 pm
    What version of agent_client gem are you using?

    - Ferdy


    2013/7/23 <ekmerril@gmail.com>
    Sorry, one more post to help clarify (I think). It appears that the
    problem is with the json of the message is being formed. The following is
    what the agents are getting:

    {"method"=>{"json_class"=>"**Symbol", "s"=>"ping"}

    And really what they're expecting seems to be:

    {"method"=>"ping"}

    I'm searching around on this and it looks like it might be a gem
    versioning problem but if you guys know offhand please let me know.

    Ethan
  • Ekmerril at Jul 23, 2013 at 2:06 pm
    On my micro_bosh vm and the cf vm's I bring up it is 1.5.0.pre.3. These
    come from my new stemcell which I built using rake from the bosh source.

    On my CLI vm it is 1.5.0.pre.805. This comes from the directions here:

    http://docs.cloudfoundry.com/docs/running/bosh/setup/

    Ethan
  • Ekmerril at Jul 23, 2013 at 8:32 pm
    As a temp work around I ended up changing a section of handle_message in
    handler.rb to this:

           method = msg['method']
           if method["s"]
             method = method["s"]
           end

    Would still like some guidance on this if possible as I obviously don't
    want to change core code for my bosh deployment.

    Thanks!
    Ethan
  • Ferran Rodenas at Jul 23, 2013 at 10:48 pm
    IIRC there was a bug in older json gems (it creates arbitrary symbols). Can
    you please check what version of json gem are you using? both on your CLI
    vm and on your microBosh vm? I believe the issue was solved in 1.7.7 (this
    is the version I'm using actually BTW).

    - Ferdy


    2013/7/23 <ekmerril@gmail.com>
    As a temp work around I ended up changing a section of handle_message in
    handler.rb to this:

    method = msg['method']
    if method["s"]
    method = method["s"]
    end

    Would still like some guidance on this if possible as I obviously don't
    want to change core code for my bosh deployment.

    Thanks!
    Ethan

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupbosh-dev @
postedJul 23, '13 at 2:29a
activeJul 23, '13 at 10:48p
posts7
users2

2 users in discussion

Ekmerril: 5 posts Ferran Rodenas: 2 posts

People

Translate

site design / logo © 2021 Grokbase