ejabberd - Comments for "mod_admin_extra: command not known" https://www.ejabberd.im/node/24787 en and this was only an error https://www.ejabberd.im/node/24787#comment-65311 <p>and this was only an error within the script, now it works!</p> <p><strong>Thank you again</strong><br /> Reinfried</p> Thu, 05 Mar 2015 16:21:44 +0000 pro007 comment 65311 at https://www.ejabberd.im I took a fresh ejabberd.yml https://www.ejabberd.im/node/24787#comment-65310 <p>I took a fresh ejabberd.yml and configured it and now mod_admin_extra can be found, some errors like <em>Error: the command "srg_user_add" requires 1 more argument</em> but now I can work on it.</p> <p>Thank you!</p> Thu, 05 Mar 2015 16:06:04 +0000 pro007 comment 65310 at https://www.ejabberd.im Well, you said: " I tried to https://www.ejabberd.im/node/24787#comment-65309 <p>Well, you said: " I tried to remove mod_admin_extra.beam from .../lib/ejabberd-15.02/ebin and it didn't change anything - no errors in any log file after restart"</p> <p>This is a problem as it should show an error after restart if module is not found.</p> <p>There is something inconsistent.</p> Thu, 05 Mar 2015 13:29:14 +0000 mremond comment 65309 at https://www.ejabberd.im If I edit this conf-file with https://www.ejabberd.im/node/24787#comment-65308 <p>If I edit this conf-file with for example a not correct mod_shared_roster_ldap</p> <div class="codeblock"><code>&nbsp;&nbsp;&nbsp; mod_shared_roster_ldap: [{ldap_base, &quot;ou=Angehoerige,o=tug&quot;},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {ldap_rfilter, &quot;(objectClass=inetOrgPerson)&quot;},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {ldap_filter,&nbsp; &quot;(objectClass=inetOrgPerson)&quot;},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {ldap_userdesc, &quot;fullName&quot;}]</code></div> <p>I get an error</p> <div class="codeblock"><code># cat .../logs/crash.log <br />2015-03-05 13:12:39 =CRASH REPORT====<br />&nbsp; crasher:<br />&nbsp;&nbsp;&nbsp; initial call: application_master:init/4<br />&nbsp;&nbsp;&nbsp; pid: &lt;0.36.0&gt;<br />&nbsp;&nbsp;&nbsp; registered_name: []<br />&nbsp;&nbsp;&nbsp; exception exit: {{bad_return,{{ejabberd_app,start,[normal,[]]},{&#039;EXIT&#039;,{undefined_macro,&#039;&#039;}}}},[{application_master,init,4,[{file,&quot;application_master.erl&quot;},{line,133}]},{proc_lib,init_p_do_apply,3,[{file,&quot;proc_lib.erl&quot;},{line,239}]}]}<br />&nbsp;&nbsp;&nbsp; ancestors: [&lt;0.35.0&gt;]<br />&nbsp;&nbsp;&nbsp; messages: []<br />&nbsp;&nbsp;&nbsp; links: [&lt;0.35.0&gt;,&lt;0.37.0&gt;,&lt;0.7.0&gt;]<br />&nbsp;&nbsp;&nbsp; dictionary: []<br />&nbsp;&nbsp;&nbsp; trap_exit: true<br />&nbsp;&nbsp;&nbsp; status: running<br />&nbsp;&nbsp;&nbsp; heap_size: 610<br />&nbsp;&nbsp;&nbsp; stack_size: 27<br />&nbsp;&nbsp;&nbsp; reductions: 129<br />&nbsp; neighbours:</code></div> <p>so for me it looks like it does use this file</p> Thu, 05 Mar 2015 12:18:22 +0000 pro007 comment 65308 at https://www.ejabberd.im Thanks. I think anyway that https://www.ejabberd.im/node/24787#comment-65305 <p>Thanks. I think anyway that the config file you are modifying is not the one used, as you say that removing the module does not trigger any error in the log. It means that the config file you are modifying has no impact, thus it tend to think it is not used: if you have declared mod_admin_extra in the config and deleted the beam, you should have an entry about the issue in the log when you start ejabberd.</p> Thu, 05 Mar 2015 10:08:00 +0000 mremond comment 65305 at https://www.ejabberd.im # cd /home/jabber/confconf # https://www.ejabberd.im/node/24787#comment-65304 <div class="codeblock"><code># cd /home/jabber/conf<br />conf # ls -al<br />total 36<br />drwxr-x--- 2 root root&nbsp;&nbsp;&nbsp; 94 Mar&nbsp; 5 09:24 .<br />drwxr-xr-x 9 root root&nbsp;&nbsp; 146 Mar&nbsp; 3 16:29 ..<br />-rw-r--r-- 1 root root&nbsp; 4638 Mar&nbsp; 3 16:24 ejabberdctl.cfg<br />-rw-r--r-- 1 root root 15836 Mar&nbsp; 4 12:31 ejabberd.yml<br />-rw-r----- 1 root root&nbsp;&nbsp; 111 Mar&nbsp; 3 16:24 inetrc<br />-rw-r----- 1 root root&nbsp;&nbsp; 419 Nov 22&nbsp; 2012 odbc.ini<br />-rw-r----- 1 root root&nbsp;&nbsp; 550 Mar&nbsp; 3 16:24 odbcinst.ini<br />conf # </code></div> Thu, 05 Mar 2015 08:27:40 +0000 pro007 comment 65304 at https://www.ejabberd.im Are you sure you do not have https://www.ejabberd.im/node/24787#comment-65297 <p>Are you sure you do not have an ejabberd.cfg file that is taking precedence over that ejabberd.yml file ?</p> Wed, 04 Mar 2015 15:44:53 +0000 mremond comment 65297 at https://www.ejabberd.im Now I tried to remove https://www.ejabberd.im/node/24787#comment-65296 <p>Now I tried to remove mod_admin_extra.beam from .../lib/ejabberd-15.02/ebin and it didn't change anything - no errors in any log file after restart, so maybe ejabberd.yml is still not correct?</p> <p><em>ejabberdctl help</em> gives</p> <div class="codeblock"><code>&nbsp;&nbsp; backup file <br />&nbsp;&nbsp; connected_users <br />&nbsp;&nbsp; connected_users_number <br />&nbsp;&nbsp; convert_to_yaml in out <br />&nbsp;&nbsp; delete_expired_messages <br />&nbsp;&nbsp; delete_old_messages days <br />&nbsp;&nbsp; dump file <br />&nbsp;&nbsp; dump_table file table <br />&nbsp;&nbsp; export2odbc host directory <br />&nbsp;&nbsp; export_odbc host file <br />&nbsp;&nbsp; export_piefxis dir <br />&nbsp;&nbsp; export_piefxis_host dir host <br />&nbsp;&nbsp; get_loglevel <br />&nbsp;&nbsp; help [--tags [tag] | com?*] <br />&nbsp;&nbsp; import_dir file <br />&nbsp;&nbsp; import_file file <br />&nbsp;&nbsp; import_piefxis file <br />&nbsp;&nbsp; incoming_s2s_number <br />&nbsp;&nbsp; install_fallback file <br />&nbsp;&nbsp; kick_user user host <br />&nbsp;&nbsp; load file <br />&nbsp;&nbsp; mnesia [info] <br />&nbsp;&nbsp; mnesia_change_nodename oldnodename newnodename oldbackup newbackup <br />&nbsp;&nbsp; outgoing_s2s_number <br />&nbsp;&nbsp; register user host password <br />&nbsp;&nbsp; registered_users host <br />&nbsp;&nbsp; registered_vhosts <br />&nbsp;&nbsp; reload_config <br />&nbsp;&nbsp; rename_default_nodeplugin <br />&nbsp;&nbsp; reopen_log <br />&nbsp;&nbsp; restart <br />&nbsp;&nbsp; restore file <br />&nbsp;&nbsp; set_master nodename <br />&nbsp;&nbsp; status <br />&nbsp;&nbsp; stop <br />&nbsp;&nbsp; stop_kindly delay announcement <br />&nbsp;&nbsp; unregister user host <br />&nbsp;&nbsp; update module <br />&nbsp;&nbsp; update_list <br />&nbsp;&nbsp; user_resources user host <br /> </code></div> <p>no srg_ or srg-commands</p> Wed, 04 Mar 2015 14:03:38 +0000 pro007 comment 65296 at https://www.ejabberd.im There are no lines with https://www.ejabberd.im/node/24787#comment-65295 <p>There are no lines with mod_admin_extra in any log file.</p> <p>I showed where I have mod_admin_extra in ejabberd.yml and here is a part of the directory listing of .../jabber/lib/ejabberd-15.02/ebin</p> <div class="codeblock"><code>...<br />-rw-r--r-- 1 root root&nbsp; 3144 Feb 16 15:35 mod_adhoc.beam<br />-rw-r--r-- 1 root root 30052 Mar&nbsp; 3 16:32 mod_admin_extra.beam<br />-rw-r--r-- 1 root root 13572 Feb 16 15:35 mod_announce.beam<br />-rw-r--r-- 1 root root&nbsp; 6641 Feb 16 15:35 mod_blocking.beam<br />...</code></div> <p>If I read the source of mod_admin_extra.erl I can see that the function is not srg-delete but srg_delete, but it doesn't make a difference. If I start build.sh I get</p> <div class="codeblock"><code>src/mod_admin_extra.erl:610: Warning: crypto:md5/1 is deprecated and will be removed in in a future release; use crypto:hash/2<br />src/mod_admin_extra.erl:613: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2</code></div> <p>but I think that's no problem.</p> <p>If I check for other commands like srg-list I get again <em>Error: command "srg-list" not known.</em></p> Wed, 04 Mar 2015 11:47:42 +0000 pro007 comment 65295 at https://www.ejabberd.im If the module isn't listed in https://www.ejabberd.im/node/24787#comment-65294 <p>If the module isn't listed in config file, then executing the command will result in:</p> <pre> $ ejabberdctl srg-delete aa localhost Error: command "srg-delete" not known. </pre><p> If the module is listed in ejabberd.yml, but the beam file is not in place: when ejabberd starts, it complains in the log file saying this, and ejabberd gets stopped:</p> <pre> 11:32:12.789 [critical] Problem starting the module mod_admin_extra for host &lt;&lt;"localhost"&gt;&gt; options: [] error: undef [{mod_admin_extra,start,[&lt;&lt;"localhost"&gt;&gt;,[]],[]}, {gen_mod,start_module,3,[{file,"src/gen_mod.erl"},{line,82}]}, {lists,foreach,2,[{file,"lists.erl"},{line,1336}]}, {ejabberd_app,start,2,[{file,"src/ejabberd_app.erl"},{line,67}]}, {application_master,start_it_old,4, [{file,"application_master.erl"},{line,272}]}] 11:32:12.789 [critical] ejabberd initialization was aborted because a module start failed. 11:32:15.127 [critical] couldn't find module /lib/ejabberd/ebin/mod_admin_extra.beam needed for application 'ejabberd' </pre><p> If the module is listed in ejabberd.yml, and the beam file is in place, then the module is started, the commands are shown when requesting information (ejabberdctl help), and the command does not fail:</p> <pre> $ ejabberdctl srg-delete aa localhost $</pre><p> In your case, see the ejabberd log files in case ejabberd complains about some problem at server start. Also check if other commands provided by mod_admin_extra are available or not.</p> Wed, 04 Mar 2015 10:38:50 +0000 mfoss comment 65294 at https://www.ejabberd.im Here is the part of https://www.ejabberd.im/node/24787#comment-65293 <p>Here is the part of ejabberd.yml where I've put mod_admin_extra:</p> <div class="codeblock"><code>...<br />##<br />## Modules enabled in all ejabberd virtual hosts.<br />##<br />modules:<br />...<br />&nbsp;&nbsp;&nbsp; access: register<br />&nbsp;&nbsp;&nbsp; mod_roster: []<br />&nbsp;&nbsp;&nbsp; mod_shared_roster: []<br />&nbsp;&nbsp;&nbsp; mod_vcard: []<br />&nbsp;&nbsp;&nbsp; mod_version: []<br />## zusaetzlich:<br />##&nbsp; mod_ctlextra: []<br />&nbsp;&nbsp;&nbsp; mod_admin_extra: []<br />...</code></div> Wed, 04 Mar 2015 08:57:10 +0000 pro007 comment 65293 at https://www.ejabberd.im Hello, Can you please paste https://www.ejabberd.im/node/24787#comment-65292 <p>Hello,</p> <p>Can you please paste the module snippets from your configuration file ?<br /> I am not sure mod_admin_extra is correctly defined here.</p> Wed, 04 Mar 2015 08:06:54 +0000 mremond comment 65292 at https://www.ejabberd.im