Troubleshooting
Version 12 (Corey Osman, 08/04/2011 09:34 pm)
| 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 | 10 | Corey Osman | |
| 19 | 10 | Corey Osman | h1. I want to switch from SQLite to Mysql and maintain my data |
| 20 | 10 | Corey Osman | |
| 21 | 11 | Corey Osman | I found this article that may help you out |
| 22 | 10 | Corey Osman | |
| 23 | 10 | Corey Osman | http://blog.heroku.com/archives/2007/11/23/yamldb_for_databaseindependent_data_dumps/ |
| 24 | 10 | Corey Osman | |
| 25 | 7 | Corey Osman | h1. I use puppet enterprise, what now? |
| 26 | 7 | Corey Osman | |
| 27 | 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. |
| 28 | 12 | Corey Osman | Basically you need to tell foreman to use the PE provided ruby library instead. Your not required to run the puppet version of ruby either as many distros now ship with ruby 1.8.7. |
| 29 | 7 | Corey Osman | |
| 30 | 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. |
| 31 | 1 | a. rpm -ivh pe-ruby-devel-1.8.7.302-1.el5.i386.rpm |
|
| 32 | 8 | Ohad Levy | # Update your path variable to use the ruby version PE ships with (export PATH=/opt/puppet/bin:$PATH) |
| 33 | 8 | Ohad Levy | # Check to make sure your PATH was updated ("which gem" should return /opt/puppet/bin/gem) |
| 34 | 8 | Ohad Levy | # gem install json |
| 35 | 8 | Ohad Levy | # gem install rest-client |
| 36 | 7 | Corey Osman | (install the gem database driver you use) |
| 37 | 8 | Ohad Levy | # gem install sqlite3 or gem install mysql ( you may have additional dependencies that would need to be resolved first) |
| 38 | 7 | Corey Osman | |
| 39 | 7 | Corey Osman | Some of the gem dependencies can be resolved by installing the development library for that package (example: mysql-devel) |
| 40 | 7 | Corey Osman | |
| 41 | 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. |
| 42 | 7 | Corey Osman | |
| 43 | 7 | Corey Osman | You can get a list of the currently installed gems by using: gem list. |
| 44 | 1 | ||
| 45 | 10 | Corey Osman | If your running the foreman init script or /etc/sysconfig/foreman configuration file. You may need to update apache/passenger configurations that point to the PE ruby version. |
| 46 | 6 | Corey Osman | |
| 47 | 6 | Corey Osman | |
| 48 | 2 | Ohad Levy | h1. error: Entry 'some file' not uptodate. Cannot merge. |
| 49 | 2 | Ohad Levy | |
| 50 | 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. |
| 51 | 2 | Ohad Levy | |
| 52 | 2 | Ohad Levy | If you don't think that you edited this file (e.g. db/schema.rb) it is usually safe to do: |
| 53 | 2 | Ohad Levy | <pre> |
| 54 | 2 | Ohad Levy | git checkout 'some file' |
| 55 | 2 | Ohad Levy | </pre> |
| 56 | 2 | Ohad Levy | |
| 57 | 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: |
| 58 | 2 | Ohad Levy | <pre> |
| 59 | 2 | Ohad Levy | git pull |
| 60 | 2 | Ohad Levy | </pre> |
| 61 | 3 | Ohad Levy | |
| 62 | 3 | Ohad Levy | h1. Strange errors with passenger |
| 63 | 3 | Ohad Levy | |
| 64 | 3 | Ohad Levy | Passenger executes foreman, based on the owner of the config/environmnets.rb file, make sure that this use can actually access: |
| 65 | 3 | Ohad Levy | * puppet configuration files |
| 66 | 3 | Ohad Levy | * sqlite database (if using sqlite) |
| 67 | 3 | Ohad Levy | * write to log, tmp directories |
| 68 | 3 | Ohad Levy | |
| 69 | 3 | Ohad Levy | see source:extras/puppet/foreman for complete puppet based setup for Foreman. |
| 70 | 4 | Bash Shell | |
| 71 | 4 | Bash Shell | |
| 72 | 4 | Bash Shell | |
| 73 | 4 | Bash Shell | h1. error: Could not send facts to Foreman: wrong Content-Length format (RuntimeError) |
| 74 | 4 | Bash Shell | |
| 75 | 4 | Bash Shell | You might see this error if you run the HTTP push facts script or the sample external nodes script. |
| 76 | 4 | Bash Shell | This is most likely due to older version of the mongrel gem. Please try and update your gems. |
| 77 | 4 | Bash Shell | |
| 78 | 4 | Bash Shell | <pre> |
| 79 | 4 | Bash Shell | gem update mongrel |
| 80 | 4 | Bash Shell | </pre> |
| 81 | 5 | Lukas Zapletal | |
| 82 | 5 | Lukas Zapletal | h1. Is my Foreman instance running? |
| 83 | 5 | Lukas Zapletal | |
| 84 | 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: |
| 85 | 5 | Lukas Zapletal | |
| 86 | 5 | Lukas Zapletal | <pre> |
| 87 | 5 | Lukas Zapletal | $ curl -k -H "Accept: application/json" http://instance:3000/status |
| 88 | 5 | Lukas Zapletal | {"status":200,"result":"ok","db_duration_ms":"5"} |
| 89 | 5 | Lukas Zapletal | </pre> |
| 90 | 9 | Dis Connect | |
| 91 | 9 | Dis Connect | |
| 92 | 9 | Dis Connect | h1. How do I enable debugging? |
| 93 | 9 | Dis Connect | |
| 94 | 9 | Dis Connect | Edit config/environments/production.rb and uncomment "config.log_level = :debug" |
