mod_http_fileserver crash aften first view page

i'm configure mod_http_fileserver for serve muc log. after upgrade to ejabberd 2.0.2 i can view only one page - module crash (disappear from /admin/server/example.com/node/ejabberd@jabber/modules/ )
in sasl.log

=CRASH REPORT==== 23-Sep-2008::23:02:53 ===
  crasher:
    pid: <0.19054.1>
    registered_name: []
    exception error: bad argument
      in function  ets:lookup/2
         called as ets:lookup(mod_http_fileserver,docroot)
      in call from mod_http_fileserver:serve/1
      in call from mod_http_fileserver:process/2
      in call from ejabberd_http:process_request/1
      in call from ejabberd_http:process_header/2
      in call from ejabberd_http:receive_headers/1
    initial call: ejabberd_http:receive_headers({state,gen_tcp,
                                                 #Port<0.70930>,undefined,
                                                 undefined,undefined,
                                                 undefined,undefined,
                                                 undefined,"en",
                                                 [{["pub","archive"],
                                                   mod_http_fileserver},
                                                  {["http-poll"],
                                                   ejabberd_http_poll}],
                                                 false,[]})
    ancestors: [ejabberd_http_sup,ejabberd_sup,<0.37.0>]
    messages: []
    links: [<0.264.0>,#Port<0.70930>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 2584
    stack_size: 23
    reductions: 813
  neighbours:

=SUPERVISOR REPORT==== 23-Sep-2008::23:02:53 ===
     Supervisor: {local,ejabberd_http_sup}
     Context:    child_terminated
     Reason:     badarg
     Offender:   [{pid,<0.19054.1>},
                  {name,undefined},
                  {mfa,
                      {ejabberd_http,start_link,
                          [{gen_tcp,#Port<0.70930>},
                           [http_poll,
                            {request_handlers,
                                [{["pub","archive"],mod_http_fileserver}]}]]}},
                  {restart_type,temporary},
                  {shutdown,brutal_kill},
                  {child_type,worker}]

Make sure the module is enabled before requesting an URL

You defined the request_handlers in the 'listen' section of ejabberdl.cfg

But are you sure you also enabled mod_http_fileserver in the 'modules' section?

Remember that you need to enable the module, for example:

{modules,
 [
  ...
  {mod_http_fileserver, [
                         {docroot, "/var/www"}, 
                         {accesslog, "/var/log/ejabberd/access.log"}
                        ]
  },
  ...
]}.

In the Web Admin, is the module shown before you try to browse pub/archive ?

When you fix this problem, you will probably notice that mod_http_fileserver does not list content of directories: you need to provide the exact name of files.

all configured

module configured correctly, and in ejabberd 2.0.0 & 2.0.1 works fine.
Now, i can view only one page - after i open page in browser - module crash in few seconds with message i posted above.
my settings:

in listen section

  {5280, ejabberd_http, [
                         http_poll,
                        {request_handlers, [
                                            {["pub", "archive"], mod_http_fileserver}
                                          ]
                         }
                        ]},

in modules section

  {mod_http_fileserver, [
                    {docroot, "/var/www/jabber.example.com/htdocs"},
                    {accesslog, "/var/log/jabber/muc-access.log"}
                    ]
  },

Another possibility

The error means that the ETS table with the module configuration cannot be read because it doesn't exist. That table doesn't exist because the module is not running: either it was not enabled (you have explained that you enabled it correctly), or it crashed previously (maybe a bug in the module code).

Maybe this is what happens in your case?

  1. You enable the module correctly in ejabberd.cfg
  2. Start ejabberd correctly
  3. You browse a file correctly
  4. Then, for some reason (a bug?), mod_http_fileserver crashes. The table is automatically deleted.
  5. When you request another object, ejabberd complains with the error messages you showed: the table doesn't exist.

Can you check if there is any error message (in ejabberd.log or sasl.log) before the two error messages you showed? Maybe the reason of the real crash is reported before.

I tried with ejabberd 2.0.2 (compiled from official source code package) with Erlang/OTP R12B-3 and with the configuration you showed, and I don't see the problem. How did you install ejabberd: binary installer in linux, or windows, or some OS package...?

BTW, do you enable the module using ejabberd.cfg, or in Web Admin?

i'm enable module in config,

i'm enable module in config, after we migrate to ejabberd 2.0.0
int work & work & work... but after i upgrade to 2.0.2 it crash.

install - gentoo linux, Erlang/OTP R12B-3.

i'm try view logs

Syndicate content