[d]ets:lookup misbehaves when called during init:start?

Chris Pressey cpressey@REDACTED
Fri Mar 29 13:27:22 CET 2002


I'd really like to get to the bottom of this one...

I have a server that opens a socket.  If I start this server from the
Erlang shell, everything works smoothly.  If I try to start it with a -run
command line argument to erl, it does *not* work and I get the following
error message upon quitting:

{error_logger,{{2002,3,29},{6,10,40}},'Error in process <0.24481.0>
with exit value: {badarg,[{ets,lookup,[inet_db,tcp_module]},
{inet_db,db_get,1},{gen_tcp,listen,2},{ce_socket,start,4}]}\n',[]}

I get the same error if I try to start it from my .erlang file.

The question is... why?

I've asked this once before a while ago, but got no response so far.

It seems someone else is (anonymously) getting a very similar error trying
to start the wiki in the same way:

http://www.bluetail.com/wiki/showPage?node=WikiSetup

{badarg,[{ets,lookup_element,[dets_registry,wikie,3]},
                    {dets,lookup,2},
                    {wikie,fetch_page,1},
                    {erl_eval,expr,3},
                    {erl_eval,exprs,4},
                    {esp,eval,2},
                    {esp,expand,3},
                    {esp,do_expand_file,2},
                    {esp,handle,1}|
                    more]}

Any information on this anomaly (e.g. why it happens and/or how to work
around it) would be greatly appreciated (seeing as I *really* don't want
to have to start my server from the Erlang shell every time I want to use
it :)

Thanks in advance,
Chris



More information about the erlang-questions mailing list