Foreman integration fail


#1

I trying to connect foreman 1.8.1 but is appear the following error message could not load data http://ipaddres is your server down?, was rake apipie:cache run when using apipie:cache? (typicall production settings)

Asking to foreman-installer about api i found the following

–foreman-apipie-task Rake task to generate API documentation.
Use ‘apipie:cache’ on 1.7 or older, ‘apipie:cache:index’ on 1.8 or newer. (default: “apipie:cache:index”)

Apparently the new version is using now apipie:cache:index not anymore apipie:cache only is anyway to connect our foreman with manageiq?


#2

Any ideas guys how to integrate foreman 1.8.1 or we need to downgrade to 1.7?


#3

@kbrock, @bdunne, @gmccullough Would one of you please respond when you get a chance.


#4

We do not rake to cache these files since users can add and remove foreman servers at any time.

We currently cache the apipie to /var/www/miq/vmdb/tmp/foreman
You can see where we set this name in connection.rb.

The apipie gem (foreman’s client gem) asks for the api version on every request. If that version changes, it should fetch a new json file. If you notice, the json file name is a sha of the server name and version, so they can handle multiple foreman instances.

Questions:

  • Are you running this on an appliance?
  • Have you been running with a different version of foreman successfully before?
  • Could you stop your server, delete the foreman files, and see if that clears up your problem?
  • Also, I notice that 1.8.2 was just released. If you upgrade to this, does this fix your problem?

I will look into getting an environment with the latest foreman up and running.

Thanks,
Keenan


#5

About you questions
Are you running this on an appliance?
No in a separated Server

Have you been running with a different version of foreman successfully before?
Yes foreman 1.7.4

Could you stop your server, delete the foreman files, and see if that clears up your problem?
Is not existing files on ManageIQ /tmp directory

Also, I notice that 1.8.2 was just released. If you upgrade to this, does this fix your problem?
Yes still the issue.


#6

Thank you Mario,

Curious that the resource description is not downloading. It should be automatic.

I am still trying to get a copy of the latest foreman up and running pointing at some servers.

Are there any other foreman related stack traces in the logs?
Thanks


#7

Hi kbrock
I found my issue and because

the problem was when i setup foreman into manageiq in the url i put https:// instead of only http:// when i replace for http:// and select verify peer certificate all is working back is strange why was working before with https:// without verify the certificate but now is working fine :slight_smile:


#8

So glad you found the solution.

  1. If you go into firefox or chrome and visit https:// in a browser, does it show foreman?
    This will tell you if your foreman server is listening to https.

If that does not work, then that is the root of the problem.
But if that does work, would you try one more thing?
2. Point manageiq to foreman with https:/// and verify certificate unchecked.

Does this work?
Do you get an error?
Does the error make sense?


#9

If you go into firefox or chrome and visit https:// in a browser, does it show foreman?
Yes foreman is running in https:// no http://

  1. Point manageiq to foreman with https:/// and verify certificate unchecked.
    that is when the error occur to me

Does this work?
no
Do you get an error?
is your server down?, was rake apipie:cache run when using apipie:cache? (typicall production settings)

Does the error make sense?
well for me doesn’t make any sense if i choice https:// instead of http:// must be work.

I try also https:// tick the box for the certificate same issue and error
is your server down?, was rake apipie:cache run when using apipie:cache? (typicall production settings)


#10

I’m a little confused on this error.

What version of manageiq are you running? There was a bug that didn’t respect that checkbox, but that was a while ago, and since you were able to hook up to an older version of foreman, then that would probably rule that out.

On the latest version of manageiq, we were able to point this to foreman 1.8.2 using an https://hostname reference as long as verify ssl cert was disabled. (you can’t verify a self signed cert)

strange


#11

The version i’m running is the following
Version botvinnik-1-rc4.20150611051833_337c03a

If i try point to my foreman 1.8.2 via https:// untick the ssl check not working at all but if i point http:// ticking the ssl verification works great


#12

@kbrock @Mario_Gamboa Meet this issue on ManageIQ dagra-2 and Foreman 1.12.3. The foreman server is listen 80, did not work with http for URL and without verify the certificate.