Skip to content
masteinhauser edited this page Oct 15, 2012 · 15 revisions

Troubleshooting

IOS and HTTPS certificates

Adobe Air on IOS does not prompt for the untrusted CA certificate. As a work around you will need to email yourself the public CA certificate that signed the foreman's certificate request. If you're using your puppet certificate in your apache config. Just email yourself the CA public certificate (not key) /var/lib/puppet/ssl/certs/ca.pem. Once this is installed restart remoteadmin and the communication will be established with foreman. On the puppetmaster the file would be /var/lib/puppet/ssl/ca/ca_crt.pem. If you're using some other 3rd party CA you will need the CA's public certificate, but then again it might not be needed since it's trusted.

Steps to fix:

  1. email yourself the ca.pem or ca_crt.pem file to your IOS device
  2. Accept and Install certificate from the email
  3. restart remoteadmin after certificate has been installed to use Https

Using 3rd party keyboards such as swift3 causes issues with text input

Currently there is an issue with using swift3 that causes issues with text input. This is an issue with adobe air and android. As a workaround you can temporarily disable swift3.

Timeouts on Reports

I have noticed that with environments that have a large number of reports take forever to return the results (more than 60 seconds) due to the amount of reports (my case was 80K reports). Essentially if you can't see the reports from the Foreman web console than Remote Admin will suffer the same issues. Optionally you can increase the timeout from the default 30 seconds in the Profile View but the real issue still remains.

You can set up a cron task to automatically clear reports older than a certain amount with the following rake tasks:

  1. Expire all reports after 7 days
rake reports:expire days=7 RAILS_ENV="production" 
  1. Expire all non-interesting reports after 1 day
rake reports:expire days=1 status=0 RAILS_ENV="production" 

Remote Admin Version 0.6 requires Foreman Release 1.0+

I changed a few things regarding the foreman API in the 0.6 release that requires you to have Foreman 1.0. If you're not ready to upgrade to Foreman 1.0 there are a few workarounds that can ensure Remote Admin works with the older 0.4.2 version.

You need to make a bookmark called "ok hosts"

  1. Click on hosts tab
  2. For the search field enter : last_report > "35 minutes ago" and status.enabled = true and status.applied = 0 and status.failed = 0 and status.pending = 0
  3. click search
  4. click on search down arrow and bookmark the search and name it "ok hosts".
  5. No need to restart the service as this is done through the GUI.

Also the most important, go into your foreman directory and replace the following line in the file: foremandir/app/controllers/hosts_controller.rb (line 43)

format.json { render :json => search.all(:select => "hosts.name", :include => included_associations).map(&:name) }

with

format.json { render :json => search.includes(included_associations).to_json({:only => [:name, :id, :hostgroup_id, :operatingsystem_id]}) }

then restart foreman web service

Update the bookmarks controller

app/controllers/bookmarks_controller.rb #index method

from :

def index
    @bookmarks = Bookmark.paginate(:page => params[:page])

    respond_to do |format|
      format.html
    end
  end

with :

def index
    @bookmarks = Bookmark.paginate(:page => params[:page])

    respond_to do |format|
      format.html
      format.json { render :json => @bookmarks }
    end
  end