I am trying to register an image for econe usage with ‘econe-register’ and then to fetch it with ‘econe-describe-images’.
The commands were issued like so: econe-register 32 -K econe_test -S <hashedPW> -v -U https:/<MyAwesomeURL>/EC2
Both command output the following error:
econe-register: #<REXML::ParseException: Missing end tag for 'img' (got "body")
Line: 20
Position: 445
Last 80 unconsumed characters:
>
/usr/share/ruby/rexml/parsers/baseparser.rb:338:in `pull_event'
/usr/share/ruby/rexml/parsers/baseparser.rb:183:in `pull'
/usr/share/ruby/rexml/parsers/treeparser.rb:22:in `parse'
/usr/share/ruby/rexml/document.rb:287:in `build'
/usr/share/ruby/rexml/document.rb:43:in `initialize'
/usr/local/share/gems/gems/amazon-ec2-0.9.17/lib/AWS.rb:344:in `new'
/usr/local/share/gems/gems/amazon-ec2-0.9.17/lib/AWS.rb:344:in `aws_error?'
/usr/local/share/gems/gems/amazon-ec2-0.9.17/lib/AWS.rb:300:in `block in make_request'
/usr/share/ruby/net/http.rb:852:in `start'
/usr/local/share/gems/gems/amazon-ec2-0.9.17/lib/AWS.rb:274:in `make_request'
/usr/local/share/gems/gems/amazon-ec2-0.9.17/lib/AWS.rb:324:in `response_generator'
/usr/local/share/gems/gems/amazon-ec2-0.9.17/lib/AWS/EC2/images.rb:94:in `register_image'
/usr/lib/one/ruby/cloud/econe/EC2QueryClient.rb:299:in `register_image'
/usr/bin/econe-register:63:in `block (2 levels) in <main>'
/usr/lib/one/ruby/cli/command_parser.rb:449:in `call'
/usr/lib/one/ruby/cli/command_parser.rb:449:in `run'
/usr/lib/one/ruby/cli/command_parser.rb:76:in `initialize'
/usr/bin/econe-register:36:in `new'
/usr/bin/econe-register:36:in `<main>'
...
Missing end tag for 'img' (got "body")
Line: 20
Position: 445
Last 80 unconsumed characters:
Line: 20
Position: 445
Last 80 unconsumed characters:
Ok, I think the problem is that you are running econe server using the ‘/EC2’ path and the server expects the requests on ‘/’.
You can try rewriting the path in the server configuration or just changing the code in the econe server:
from
post '/' do
result, rc = $ec2_app.do_http_request(params)
treat_response(result, rc)
end
get '/' do
result, rc = $ec2_app.do_http_request(params)
treat_response(result, rc)
end
to
post '/EC2' do
result, rc = $ec2_app.do_http_request(params)
treat_response(result, rc)
end
get '/EC2' do
result, rc = $ec2_app.do_http_request(params)
treat_response(result, rc)
end
My econe server configuration has the “ssl_server” option set to “https:///EC2”. I thought that would be recognized path-wise by the econe-server.rb. Is there a reason it is not?
There’s no special reason for it. The thing is that the ssl_server option is used to generate the Signature for the authentication, it could be also used to enable path based routes.
However, if you deploy an SSL proxy on top of econe server, you would need the path for the signature, but no path for the requests in the server. So probably, we would need an extra option for it.