Error: bad URI(is not URI?)

katello

#1

Problem:
When I run following command
hammer -v -d repository synchronize --id 3 --source-url http://epel.mirror.digitalpacific.com.au/7/x86_64/

It gives error “Error: bad URI(is not URI?)”
Expected outcome:
repo should start syncing.
Foreman and Proxy versions:
katello 3.8
Foreman and Proxy plugin versions:

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)

logs

[ERROR 2018-12-03T16:09:15 API] bad URI(is not URI?): 172.18.2xx.xx:3xxx
[DEBUG 2018-12-03T16:09:15 API] #<URI::InvalidURIError: bad URI(is not URI?): 172.18.2xx.xx:3xxx>
[DEBUG 2018-12-03T16:09:15 Exception] Using exception handler HammerCLIKatello::ExceptionHandler#handle_general_exception
[ERROR 2018-12-03T16:09:15 Exception] Error: bad URI(is not URI?): 172.18.2xx.xx:3xxx
Could not synchronize the repository:
Error: bad URI(is not URI?): 172.18.2xx.xx:3xxx
[ERROR 2018-12-03T16:09:15 Exception]


#2

Looks like you don’t have a schema in your config file (either /etc/hammer/cli.modules.d/foreman.yml or ~/.hammer/cli.modules.d/foreman.yml).

What I suspect you have:

:foreman:
  :host: 172.18.2xx.xx:3xxx

What you should have:

:foreman:
  :host: http://172.18.2xx.xx:3xxx