# Econe cli tools fail with ParseException

**URL:** <https://forum.opennebula.io/t/econe-cli-tools-fail-with-parseexception/1839>\
**Category:** Product Support\
**Created:** [February 24, 2016, 10:54am UTC](https://forum.opennebula.io/t/econe-cli-tools-fail-with-parseexception/1839 "2016-02-24T10:54:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![christian\_huening](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@christian\_huening](https://forum.opennebula.io/u/christian_huening)\
**Post date:** [February 24, 2016, 10:54am UTC](https://forum.opennebula.io/t/econe-cli-tools-fail-with-parseexception/1839/1 "2016-02-24T10:54:17Z")

</div>

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:

```

Any help would be greatly appreciated.

Thanks  
Christian

---

<div class="post-metadata">

**Author:** ![dmolina](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dmolina/32/22_2.png) [@dmolina](https://forum.opennebula.io/u/dmolina)\
**Post date:** [February 25, 2016, 10:33am UTC](https://forum.opennebula.io/t/econe-cli-tools-fail-with-parseexception/1839/2 "2016-02-25T10:33:35Z")

</div>

Hi,

Could you check if there is any error in the logs (oned.log, econe.log, econe.error) after trying to register the image?

---

<div class="post-metadata">

**Author:** ![christian\_huening](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@christian\_huening](https://forum.opennebula.io/u/christian_huening)\
**Post date:** [February 25, 2016, 10:51am UTC](https://forum.opennebula.io/t/econe-cli-tools-fail-with-parseexception/1839/3 "2016-02-25T10:51:57Z")

</div>

Hi,  
sure! The only message showing up related to the call is in econe-server.log and looks like so:

```
Thu Feb 25 11:49:41 2016 [I]: Updating user pool cache.
Thu Feb 25 11:49:41 2016 [I]: ::ffff:<MyIpAddress> - - [25/Feb/2016:11:49:41 +0100] "POST /EC2 HTTP/1.0" 404 453 0.1225
```

---

<div class="post-metadata">

**Author:** ![dmolina](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dmolina/32/22_2.png) [@dmolina](https://forum.opennebula.io/u/dmolina)\
**Post date:** [February 25, 2016, 11:02am UTC](https://forum.opennebula.io/t/econe-cli-tools-fail-with-parseexception/1839/4 "2016-02-25T11:02:52Z")

</div>

There is a 404 error, so it looks like it cannot find the image, could you check oned.log also?

---

<div class="post-metadata">

**Author:** ![christian\_huening](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@christian\_huening](https://forum.opennebula.io/u/christian_huening)\
**Post date:** [February 25, 2016, 11:19am UTC](https://forum.opennebula.io/t/econe-cli-tools-fail-with-parseexception/1839/5 "2016-02-25T11:19:35Z")

</div>

I did, there is nothing happening in oned.log except for the occasional monitoring of VMs, Datastores and Hosts.

---

<div class="post-metadata">

**Author:** ![christian\_huening](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@christian\_huening](https://forum.opennebula.io/u/christian_huening)\
**Post date:** [February 25, 2016, 11:28am UTC](https://forum.opennebula.io/t/econe-cli-tools-fail-with-parseexception/1839/6 "2016-02-25T11:28:20Z")

</div>

Here is a screenshot of the econe-register request and the corresponding content from oned.log:

 ![](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/0/0ff1248fad3729586acd74945200707537375bf4.png)

Is there anything related in oned.log?

---

<div class="post-metadata">

**Author:** ![dmolina](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dmolina/32/22_2.png) [@dmolina](https://forum.opennebula.io/u/dmolina)\
**Post date:** [February 25, 2016, 11:32am UTC](https://forum.opennebula.io/t/econe-cli-tools-fail-with-parseexception/1839/7 "2016-02-25T11:32:56Z")

</div>

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:

> <https://github.com/OpenNebula/one/blob/master/src/cloud/ec2/lib/econe-server.rb#L132>

from

```auto
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

```auto
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

```

---

<div class="post-metadata">

**Author:** ![christian\_huening](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@christian\_huening](https://forum.opennebula.io/u/christian_huening)\
**Post date:** [February 25, 2016, 11:50am UTC](https://forum.opennebula.io/t/econe-cli-tools-fail-with-parseexception/1839/8 "2016-02-25T11:50:23Z")

</div>

Thanks a lot! Working like a charm now!

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?

---

<div class="post-metadata">

**Author:** ![dmolina](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dmolina/32/22_2.png) [@dmolina](https://forum.opennebula.io/u/dmolina)\
**Post date:** [February 25, 2016, 11:56am UTC](https://forum.opennebula.io/t/econe-cli-tools-fail-with-parseexception/1839/9 "2016-02-25T11:56:24Z")

</div>

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.
