The ferret logs

Hi.

We’ve had some problems with ferret not being able to load our classes
(stack trace below for the curious).

I nailed it down to a deployment issue, where an old instance of ferret
drb was running. I don’t understand the details quite yet, but the
result was the the old ferret was never shutdown during redeployment,
and attempts were made to start up a new one.

Anywho, I stumbled acroess the ferret_server.log and ferret_index.log,
is it correctly understood, that ferret_server.log is basically the drb
server output, while ferret_index.log is the index manager output?

A bonus question, what’s the best way to determine that your application
(using acts_as_ferret) is currently running against the drb server
rather than the file system?

Thanks! :slight_smile:

Morten

uninitialized constant Ticket
(druby://127.0.0.1:9009)
./script/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active_support/dependencies.rb:266:in
load_missing_constant' (druby://127.0.0.1:9009) ./script/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:452:inconst_missing’
(druby://127.0.0.1:9009)
./script/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active_support/dependencies.rb:464:in
const_missing' (druby://127.0.0.1:9009) ./script/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/inflector.rb:250:inconstantize’
(druby://127.0.0.1:9009)
./script/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active_support/core_ext/string/inflections.rb:148:in
constantize' (druby://127.0.0.1:9009) ./script/../config/../vendor/plugins/acts_as_ferret/lib/ferret_server.rb:112:inwith_class’
(druby://127.0.0.1:9009)
./script/…/config/…/vendor/plugins/acts_as_ferret/lib/ferret_server.rb:78:in
ensure_index_exists' /data/fiddle/current/config/../vendor/plugins/acts_as_ferret/lib/remote_index.rb:16:insend’
/data/fiddle/current/config/…/vendor/plugins/acts_as_ferret/lib/remote_index.rb:16:in
method_missing' /data/fiddle/current/config/../vendor/plugins/acts_as_ferret/lib/act_methods.rb:182:inacts_as_ferret’
/data/fiddle/current/config/…/app/models/ticket.rb:37

On Wed, Oct 03, 2007 at 10:08:32PM +0200, Morten wrote:

Anywho, I stumbled acroess the ferret_server.log and ferret_index.log,
is it correctly understood, that ferret_server.log is basically the drb
server output, while ferret_index.log is the index manager output?

exactly. ferret_server.log is written by the DRb part of acts_as_ferret,
while ferret_index.log is written by the indexing code common to local
and DRb mode.

A bonus question, what’s the best way to determine that your application
(using acts_as_ferret) is currently running against the drb server
rather than the file system?

If your log level (set in ferret_server.yml) is on debug,
ferret_server.log should have an entry for each method call received via
DRb.

In your application, you may check Model.aaf_configuration[:remote] to
see if remote access is active. Besides that, your app should refuse to
start up if it’s configured for remote mode and no server is there.

Cheers,
Jens


Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[email protected] | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa

What is the exact syntax for setting the log level in ferret_server.yml?

On Mon, Oct 22, 2007 at 01:40:13PM -0400, David J. wrote:

What is the exact syntax for setting the log level in ferret_server.yml?

like this:

development:
host: localhost
port: 9010
pid_file: log/ferret.pid
log_file: log/ferret_server_dev.log
log_level: info

debug, warn and error should also work as values. This is only present
in the current trunk of acts_as_ferret for now.

Jens


Jens Krämer
http://www.jkraemer.net/ - Blog
http://www.omdb.org/ - The new free film database