[erlang-questions] cacherl memcached app startup problem question

Gleb Peregud gleber.p@REDACTED
Fri Jun 20 16:38:55 CEST 2008


On Sat, May 31, 2008 at 12:50 AM, db <masterofquestions@REDACTED> wrote:
> I am not sure what the problem is.  Mnesia directory actually gets
> created at /var/mensia/cacherl@REDACTED but there is no content.
> Is this something to do with disc_copies and any reason for using
> disc_copies rather than ram_copies?  Another question, does cacherl
> work with mysql memcached engine?
>
> [a@REDACTED cacherl]# ./start.sh
> Erlang (BEAM) emulator version 5.6.1 [source] [smp:2]
> [async-threads:30] [hipe] [kernel-poll:true]
>
> Eshell V5.6.1  (abort with ^G)
> (cacherl@REDACTED)1>
> =INFO REPORT==== 30-May-2008::17:16:51 ===
> Creating mnesia table ns_default
>
> =SUPERVISOR REPORT==== 30-May-2008::17:16:51 ===
>     Supervisor: {local,memcached}
>     Context:    start_error
>     Reason:     {{badmatch,
>                      {aborted,
>                          {bad_type,ns_default,disc_copies,
>                              'cacherl@REDACTED'}}},
>                  [{memcached_mnesia,init_mnesia_table,2},
>                   {memcached_mnesia,init,1},
>                   {gen_server,init_it,6},
>                   {proc_lib,init_p,5}]}
>     Offender:   [{pid,undefined},
>                  {name,memcached_mnesia},
>                  {mfa,{memcached_mnesia,start_link,[]}},
>                  {restart_type,permanent},
>                  {shutdown,2000},
>                  {child_type,worker}]
>
>
> =CRASH REPORT==== 30-May-2008::17:16:51 ===
>  crasher:
>    pid: <0.69.0>
>    registered_name: []
>    exception exit: {shutdown,{memcached,start,[normal,[]]}}
>      in function  application_master:init/4
>    initial call: application_master:init(<0.6.0>,<0.68.0>,
>                                          {appl_data,memcached,
>                                           [memcached,memcached_mnesia],
>                                           undefined,
>                                           {memcached,[]},
>                                           [memcached,memcached_mnesia,
>                                            memcached_stats,memcached_util,
>                                            memcached_purge,memcached_reader],
>                                           [],infinity,infinity},
>                                          normal)
>    ancestors: [<0.68.0>]
>    messages: [{'EXIT',<0.70.0>,normal}]
>    links: [<0.68.0>,<0.6.0>]
>    dictionary: []
>    trap_exit: true
>    status: running
>    heap_size: 377
>    stack_size: 23
>    reductions: 87
>  neighbours:
>
> =INFO REPORT==== 30-May-2008::17:16:51 ===
>    application: memcached
>    exited: {shutdown,{memcached,start,[normal,[]]}}
>    type: temporary
>
> =INFO REPORT==== 30-May-2008::17:16:51 ===
> started TCP listener on 0.0.0.0:11311
>
> --
> rk
>
> That which we persist in doing becomes easier for us to do; not that
> the nature of the thing itself is changed, but that our power to do is
> increased.
> -Ralph Waldo Emerson
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>

After power failure i've stumbled upon exacly the same problem. This
problem occures because of mnesia schema is created with
mnesia:start() (though it is ram-based schema) and not with
mnesia:create_schema([node()]). The solution is quite simple, though
was not easy to find for me (i'm far from expert in mnesia). To
successfully start cacherl one have to do the following:

cd path/to/cacherl
make
make create-schema
./start.sh

Hope this helps :)

-- 
Gleb Peregud
http://gleber.pl/

Every minute is to be grasped.
Time waits for nobody.
-- Inscription on a Zen Gong



More information about the erlang-questions mailing list