Forum: Ferret Drb start configuration error

017ec85fe0c67847267a93f0a6847eae?d=identicon&s=25 Matt Davis (yellowpinky)
on 2009-11-09 08:23
Hi there,

I am using the acts_as_ferret plugin version 0.4.4 with rails 2.3.4 and
am getting an error when try to start the Drb server.

The error appears to be that the unix_daemon cannot open the pid file.
However this only happens if I specify a config value:

pid_file: log/ferret_server.pid

in the ferret_server.yml.  If I do not then the default values from the
ferret_server.rb file are used and the Drb server starts.

The error output is a follows:

/home/yellowpinky/my_project/vendor/plugins/acts_as_ferret/lib/unix_daemon.rb:53:in
`initialize': No such file or directory - log/ferret_server.pi
(Errno::ENOENT)
  from
/home/matt/IdeaProjects/autoissimo/vendor/plugins/acts_as_ferret/lib/unix_daemon.rb:53:in
`open'
  from
/home/matt/IdeaProjects/autoissimo/vendor/plugins/acts_as_ferret/lib/unix_daemon.rb:53:in
`write_pid_file'
  from
/home/matt/IdeaProjects/autoissimo/vendor/plugins/acts_as_ferret/lib/unix_daemon.rb:12:in
`platform_daemon'
  from
/home/matt/IdeaProjects/autoissimo/vendor/plugins/acts_as_ferret/lib/unix_daemon.rb:41:in
`fork'
  from
/home/matt/IdeaProjects/autoissimo/vendor/plugins/acts_as_ferret/lib/unix_daemon.rb:41:in
`safefork'
  from
/home/matt/IdeaProjects/autoissimo/vendor/plugins/acts_as_ferret/lib/unix_daemon.rb:11:in
`platform_daemon'
  from
/home/matt/IdeaProjects/autoissimo/vendor/plugins/acts_as_ferret/lib/ferret_server.rb:86:in
`start'
  from ./../vendor/plugins/acts_as_ferret/lib/server_manager.rb:53:in
`send'
  from ./../vendor/plugins/acts_as_ferret/lib/server_manager.rb:53
  from ./ferret_server:4:in `require'
  from ./ferret_server:4

Having looked into this a little I can see that when a config value for
the pid file is defined in the ferret_server.yml file the unix_daemon.rb
gets passed the file path without the rails root appended.  When no
value is specified within the ferret_server.yml file the default values
defined in ferret_server.rb are used and the unix_daemon.rb file gets
passed the full path and the server starts.

Any help greatly appreciated :-)
017ec85fe0c67847267a93f0a6847eae?d=identicon&s=25 Matt Davis (yellowpinky)
on 2009-11-09 10:59
Apologies but there was a copy/paste error in the below stack trace:

No such file or directory - log/ferret_server.pi

should be:

No such file or directory - log/ferret_server.pid

I still have the error :-)



Matt Davis wrote:
> Hi there,
>
> I am using the acts_as_ferret plugin version 0.4.4 with rails 2.3.4 and
> am getting an error when try to start the Drb server.
>
> The error appears to be that the unix_daemon cannot open the pid file.
> However this only happens if I specify a config value:
>
> pid_file: log/ferret_server.pid
>
> in the ferret_server.yml.  If I do not then the default values from the
> ferret_server.rb file are used and the Drb server starts.
>
> The error output is a follows:
>
> /home/yellowpinky/my_project/vendor/plugins/acts_as_ferret/lib/unix_daemon.rb:53:in
> `initialize': No such file or directory - log/ferret_server.pi
> (Errno::ENOENT)
>   from
> 
/home/matt/IdeaProjects/autoissimo/vendor/plugins/acts_as_ferret/lib/unix_daemon.rb:53:in
> `open'
>   from
> 
/home/matt/IdeaProjects/autoissimo/vendor/plugins/acts_as_ferret/lib/unix_daemon.rb:53:in
> `write_pid_file'
>   from
> 
/home/matt/IdeaProjects/autoissimo/vendor/plugins/acts_as_ferret/lib/unix_daemon.rb:12:in
> `platform_daemon'
>   from
> 
/home/matt/IdeaProjects/autoissimo/vendor/plugins/acts_as_ferret/lib/unix_daemon.rb:41:in
> `fork'
>   from
> 
/home/matt/IdeaProjects/autoissimo/vendor/plugins/acts_as_ferret/lib/unix_daemon.rb:41:in
> `safefork'
>   from
> 
/home/matt/IdeaProjects/autoissimo/vendor/plugins/acts_as_ferret/lib/unix_daemon.rb:11:in
> `platform_daemon'
>   from
> 
/home/matt/IdeaProjects/autoissimo/vendor/plugins/acts_as_ferret/lib/ferret_server.rb:86:in
> `start'
>   from ./../vendor/plugins/acts_as_ferret/lib/server_manager.rb:53:in
> `send'
>   from ./../vendor/plugins/acts_as_ferret/lib/server_manager.rb:53
>   from ./ferret_server:4:in `require'
>   from ./ferret_server:4
>
> Having looked into this a little I can see that when a config value for
> the pid file is defined in the ferret_server.yml file the unix_daemon.rb
> gets passed the file path without the rails root appended.  When no
> value is specified within the ferret_server.yml file the default values
> defined in ferret_server.rb are used and the unix_daemon.rb file gets
> passed the full path and the server starts.
>
> Any help greatly appreciated :-)
This topic is locked and can not be replied to.