Econe-server fails with json error

I am running OpenNebula 4.8 with econe-server. Some amount of time ago, we believe when we updated to the newest apache, the following error started to show up in econe-server.error:

JSON::ParserError: A JSON text must at least contain two octets!
/usr/lib/ruby/gems/1.8/gems/json-1.4.6/lib/json/common.rb:146:in initia lize' /usr/lib/ruby/gems/1.8/gems/json-1.4.6/lib/json/common.rb:146:innew’
/usr/lib/ruby/gems/1.8/gems/json-1.4.6/lib/json/common.rb:146:in parse' /usr/lib/one/ruby/cloud/econe/keypair.rb:57:inget_keypair’
/usr/lib/one/ruby/cloud/econe/keypair.rb:122:in describe_keypairs' /usr/lib/one/ruby/cloud/econe/econe_application.rb:165:indo_http_reque
st’
/usr/lib/one/ruby/cloud/econe/econe-server.rb:135:in POST /' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:incall

/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in rout e' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:ininst
ance_eval’
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in rout e_eval' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:500:inrout
e!’
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in catc h' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:inrout
e!’
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in each ' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:inrout
e!’
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:601:in disp atch!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:incall
!’
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in inst ance_eval' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:ininvo
ke’
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in catc h' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:ininvo
ke’
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in call !' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:399:incall

/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in c all' /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:incall’
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in
call' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:incall

/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:1005:in syn chronize' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:incall

/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in
call' /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/chunked.rb:15:incall’
/usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/connection.rb:84:in pre _process' /usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/connection.rb:82:incat
ch’
/usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/connection.rb:82:in pre _process' /usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/connection.rb:57:inpro
cess’
/usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/connection.rb:42:in rec eive_data' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256 :inrun_machine’
/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256
:in run' /usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/backends/base.rb:61:in
start’
/usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/server.rb:159:in start' /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/thin.rb:14:inr
un’
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:946:in `run!

/usr/lib/one/ruby/cloud/econe/econe-server.rb:148
JSON::ParserError - A JSON text must at least contain two octets!:


The JSON error is quite generic and it seems to be happening in a variety of ruby applications across the board when you google. Apparently it is connected to the fact that a single number was at one time considered to be good JSON and now it is not anymore.

But I have no idea where in the code we should be looking to see if the error is fixable. Any help?

My opennebula head node is running opennebula 4.8, with the SSL handshake handled by apache httpd version 2.2.15-54.sl6

By the way, the error happens on the econe-describe-instances, econe-describe-keypairs, and a few
other calls. the econe-run-instances command actually still works.


There is another error that shows up in econe-server.log, namely

Fri Oct 07 09:00:04 2016 [E]: Could not create X509 certificate from

That same error is returned to the client whenever a econe- command fails.

Any help is appreciated.

Steve Timm