Insights remediation playbook execution fails with an error "Failed to create job. Ensure your systems are registered in Foreman"

Solution Verified - Updated -

Issue

  • Insights remediation playbook execution fails with an error: "Failed to create job. Ensure your systems are registered in Foreman"

  • Below errors can be noticed in production logs. /var/log/foreman/production.log

    **Scenario 1:**
    external method 'search_by_plan_id' failed with error: Failed to open TCP connection to cert-api.access.redhat.com:443 (getaddrinfo:  Name or service not known)  (ScopedSearch::QueryNotSupported)
    
    **Scenario 2:**
    external method 'search_by_plan_id' failed with error: 404 Not Found (ScopedSearch::QueryNotSupported)
    
    **Scenario 3:**
    [E|bac|24be5811] PG::SyntaxError: ERROR:  syntax error at or near "4"
    LINE 1: ...osts.id IN(4,client.example.com.com,2019-05-23 12:20:24 +...
    : SELECT "hosts"."id" FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = $1 AND (( 
    
    **Scenario 4:**
    LINE 1: ... "hosts"."organization_id" = 4 AND (( hosts.id IN())) ORDER ...
                                                                                                                    ^
    : SELECT "hosts"."id" FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 4 AND (( hosts.id IN())) ORDER BY "hosts"."name" ASC (ActiveRecord::StatementInvalid)
    

Environment

  • Red Hat Satellite 6.4 and later versions.
  • Red Hat Insights
  • Red Hat Satellite 6 is connecting via an HTTP proxy server.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In