processone / ejabberd-contrib

Growing and curated ejabberd contributions repository - PR or ask to join !
http://ejabberd.im
250 stars 137 forks source link

mod_logxml installation error #303

Closed paolodeglinnocenti closed 3 years ago

paolodeglinnocenti commented 3 years ago

i tried to install mod_logxml module, but i get the following error:

/opt/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/mod_logxml/src/mod_logxml.erl:12:
 Warning: undefined callback function mod_doc/0 (behaviour 'gen_mod')
/opt/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/mod_logxml/src/mod_logxml.erl:265:
 Warning: erlang:now/0: Deprecated BIF.
 See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information.
=ERROR REPORT==== 18-May-2021::15:31:35.397593 ===
Error in process <7640.964.0> on node ejabberd@localhost with exit value:
{{badmatch,{error,eacces}},
 [{mod_logxml,open_file,2,
              [{file,"/opt/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/mod_logxml/src/mod_logxml.erl"},
               {line,232}]},
  {mod_logxml,init,6,
              [{file,"/opt/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/mod_logxml/src/mod_logxml.erl"},
               {line,67}]}]}
prefiks commented 3 years ago

It seems that's error is coming from trying to write file to location where ejabberd don't have access, i guess logdir option of this module points to directory like that (or that doesn't exists).

paolodeglinnocenti commented 3 years ago

thanks now it works fine

badlop commented 3 years ago

Right, when installing mod_logxml, it enables automatically logdir with a value that will not work out of the box.

I see those alternatives: