ejabberd - Comments for "Issue creating named ets table" https://www.ejabberd.im/forum/25350/issue-creating-named-ets-table en That "bad argument" error https://www.ejabberd.im/forum/25350/issue-creating-named-ets-table#comment-66556 <p>That "bad argument" error probably means that the table already exists.</p> <p>Example:</p> <pre> ets:new(foo,[named_table,protected,set,{keypos,1}]). foo ets:new(foo,[named_table,protected,set,{keypos,1}]). ** exception error: bad argument </pre><p> In your case, if you make that call in the start of an ejabberd module, and you have enabled the module in the ejabberd config, and you have several virtual hosts defined in ejabberd, you must understand this: ejabberd starts your module one time for each virtual host. This means that the table is created for the first host, and in the other ones, it complains with a "bad arg" error.</p> Mon, 08 Feb 2016 14:46:28 +0000 badlop comment 66556 at https://www.ejabberd.im