Troubleshooting
Version 9 (Dis Connect, 04/19/2011 09:36 am)
| 1 | 3 | Ohad Levy | {{toc}} |
|---|---|---|---|
| 2 | 3 | Ohad Levy | |
| 3 | 1 | h1. rake aborted! |
|
| 4 | 1 | ||
| 5 | 1 | I get the following error while running rake db:migrate |
|
| 6 | 1 | <pre> |
|
| 7 | 1 | rake aborted! |
|
| 8 | 1 | undefined method `reenable' for <Rake::Task db:schema:dump => [environment]>:Rake::Task |
|
| 9 | 1 | </pre> |
|
| 10 | 1 | ||
| 11 | 1 | this means you have an old version of rake (older than 0.87), you can verify it by typing: |
|
| 12 | 1 | <pre> |
|
| 13 | 1 | rake --version |
|
| 14 | 1 | </pre> |
|
| 15 | 1 | ||
| 16 | 1 | Usually this error is "safe" to ignore, however, it is recommended to upgrade to rake >= 0.87 |
|
| 17 | 2 | Ohad Levy | |
| 18 | 7 | Corey Osman | h1. I use puppet enterprise, what now? |
| 19 | 7 | Corey Osman | |
| 20 | 7 | Corey Osman | As of PE version 1.0, foreman won't install easily without a few modifications. Since PE ships with its own version of Ruby you will need to install a few gems. |
| 21 | 7 | Corey Osman | Basically you need to tell foreman to use the PE provided ruby library instead. |
| 22 | 7 | Corey Osman | |
| 23 | 8 | Ohad Levy | # You first need to install the pe-ruby-devel package that ships with PE. You can find this in your packages folder wherever you extracted PE. |
| 24 | 1 | a. rpm -ivh pe-ruby-devel-1.8.7.302-1.el5.i386.rpm |
|
| 25 | 8 | Ohad Levy | # Update your path variable to use the ruby version PE ships with (export PATH=/opt/puppet/bin:$PATH) |
| 26 | 8 | Ohad Levy | # Check to make sure your PATH was updated ("which gem" should return /opt/puppet/bin/gem) |
| 27 | 8 | Ohad Levy | # gem install json |
| 28 | 8 | Ohad Levy | # gem install rest-client |
| 29 | 7 | Corey Osman | (install the gem database driver you use) |
| 30 | 8 | Ohad Levy | # gem install sqlite3 or gem install mysql ( you may have additional dependencies that would need to be resolved first) |
| 31 | 7 | Corey Osman | |
| 32 | 7 | Corey Osman | Some of the gem dependencies can be resolved by installing the development library for that package (example: mysql-devel) |
| 33 | 7 | Corey Osman | |
| 34 | 7 | Corey Osman | I found it difficult to install the sqlite3 gem because of dependency hell so I just setup mysql instead which was far easier to setup. Additionally mysql is much more scalable than sqlite. |
| 35 | 7 | Corey Osman | |
| 36 | 7 | Corey Osman | You can get a list of the currently installed gems by using: gem list. |
| 37 | 7 | Corey Osman | |
| 38 | 7 | Corey Osman | If your running the foreman init script or /etc/sysconfig/foreman configuration file. You may need to update configurations that point to the ruby version in those files. |
| 39 | 6 | Corey Osman | |
| 40 | 6 | Corey Osman | |
| 41 | 2 | Ohad Levy | h1. error: Entry 'some file' not uptodate. Cannot merge. |
| 42 | 2 | Ohad Levy | |
| 43 | 2 | Ohad Levy | If you downloaded Foreman from source (git), it could be that some of the files you have modified (or were modified automatically) conflicts with another file Foreman wants to upgrade. |
| 44 | 2 | Ohad Levy | |
| 45 | 2 | Ohad Levy | If you don't think that you edited this file (e.g. db/schema.rb) it is usually safe to do: |
| 46 | 2 | Ohad Levy | <pre> |
| 47 | 2 | Ohad Levy | git checkout 'some file' |
| 48 | 2 | Ohad Levy | </pre> |
| 49 | 2 | Ohad Levy | |
| 50 | 2 | Ohad Levy | This will revert the file to its previous condition (as in the repo at the time of checkout) and now you should be able to get the latest version by: |
| 51 | 2 | Ohad Levy | <pre> |
| 52 | 2 | Ohad Levy | git pull |
| 53 | 2 | Ohad Levy | </pre> |
| 54 | 3 | Ohad Levy | |
| 55 | 3 | Ohad Levy | h1. Strange errors with passenger |
| 56 | 3 | Ohad Levy | |
| 57 | 3 | Ohad Levy | Passenger executes foreman, based on the owner of the config/environmnets.rb file, make sure that this use can actually access: |
| 58 | 3 | Ohad Levy | * puppet configuration files |
| 59 | 3 | Ohad Levy | * sqlite database (if using sqlite) |
| 60 | 3 | Ohad Levy | * write to log, tmp directories |
| 61 | 3 | Ohad Levy | |
| 62 | 3 | Ohad Levy | see source:extras/puppet/foreman for complete puppet based setup for Foreman. |
| 63 | 4 | Bash Shell | |
| 64 | 4 | Bash Shell | |
| 65 | 4 | Bash Shell | |
| 66 | 4 | Bash Shell | h1. error: Could not send facts to Foreman: wrong Content-Length format (RuntimeError) |
| 67 | 4 | Bash Shell | |
| 68 | 4 | Bash Shell | You might see this error if you run the HTTP push facts script or the sample external nodes script. |
| 69 | 4 | Bash Shell | This is most likely due to older version of the mongrel gem. Please try and update your gems. |
| 70 | 4 | Bash Shell | |
| 71 | 4 | Bash Shell | <pre> |
| 72 | 4 | Bash Shell | gem update mongrel |
| 73 | 4 | Bash Shell | </pre> |
| 74 | 5 | Lukas Zapletal | |
| 75 | 5 | Lukas Zapletal | h1. Is my Foreman instance running? |
| 76 | 5 | Lukas Zapletal | |
| 77 | 5 | Lukas Zapletal | There is simple status service that returns JSON with "result" message "ok" when the instance is up and running. It also "pings" database and returns lag. Example: |
| 78 | 5 | Lukas Zapletal | |
| 79 | 5 | Lukas Zapletal | <pre> |
| 80 | 5 | Lukas Zapletal | $ curl -k -H "Accept: application/json" http://instance:3000/status |
| 81 | 5 | Lukas Zapletal | {"status":200,"result":"ok","db_duration_ms":"5"} |
| 82 | 5 | Lukas Zapletal | </pre> |
| 83 | 9 | Dis Connect | |
| 84 | 9 | Dis Connect | |
| 85 | 9 | Dis Connect | h1. How do I enable debugging? |
| 86 | 9 | Dis Connect | |
| 87 | 9 | Dis Connect | Edit config/environments/production.rb and uncomment "config.log_level = :debug" |
