ejabberd - Comments for "ejabberd with smack: how to successfully create leaf node inside collection node" https://www.ejabberd.im/forum/25266/ejabberd-smack-how-successfully-create-leaf-node-inside-collection-node en Hi, Below are few https://www.ejabberd.im/forum/25266/ejabberd-smack-how-successfully-create-leaf-node-inside-collection-node#comment-66823 <p>Hi, </p> <p>Below are few suggestions which might be helpful.<br /> My guess is if you are building as-is from the source, the nodes that are being created are 'flat' nodes. This is because 'flat' is defined to be the standard node type. In mod_pubsub try changing</p> <p>-define(STDNODE, &lt;&lt;"flat"&gt;&gt;).</p> <p>to</p> <p>-define(STDNODE, &lt;&lt;"hometree"&gt;&gt;).</p> <p>and then recompile. </p> <p>Also, as far as I know, dag is no more maintained. I could be wrong about this.<br /> Hope this helps.</p> <p>-Prasad</p> Wed, 09 Mar 2016 18:48:26 +0000 prasadv comment 66823 at https://www.ejabberd.im I also can't create nodes https://www.ejabberd.im/forum/25266/ejabberd-smack-how-successfully-create-leaf-node-inside-collection-node#comment-66820 <p>I also can't create nodes whether on virtual or dag nodetree. I tried deleting database. I'm getting the following in error log:</p> <div class="codeblock"><code>[error] &lt;0.844.0&gt;@mod_pubsub:transaction_retry:4236 transaction return internal error: {&#039;EXIT&#039;,{{badmatch,[&lt;&lt;&quot;localhost&quot;&gt;&gt;]},[{mod_pubsub,serverhost,1,[{file,&quot;src/mod_pubsub.erl&quot;},{line,4012}]},{mod_pubsub,tree,1,[{file,&quot;src/mod_pubsub.erl&quot;},{line,4016}]},{mod_pubsub,tree_call,3,[{file,&quot;src/mod_pubsub.erl&quot;},{line,4131}]},{mod_pubsub,&#039;-transaction/4-fun-0-&#039;,3,[{file,&quot;src/mod_pubsub.erl&quot;},{line,4183}]},{mnesia_tm,non_transaction,5,[{file,&quot;mnesia_tm.erl&quot;},{line,737}]},{mod_pubsub,transaction_retry,6,[{file,&quot;src/mod_pubsub.erl&quot;},{line,4210}]},{mod_pubsub,publish_item,7,[{file,&quot;src/mod_pubsub.erl&quot;},{line,2193}]},{mod_pubsub,iq_sm,3,[{file,&quot;src/mod_pubsub.erl&quot;},{line,1206}]}]}}<br />2016-03-08 16:29:05.070 [error] &lt;0.844.0&gt;@mod_pubsub:transaction_retry:4239 transaction return internal error: {atomic,{&#039;EXIT&#039;,{{badmatch,[&lt;&lt;&quot;localhost&quot;&gt;&gt;]},[{mod_pubsub,serverhost,1,[{file,&quot;src/mod_pubsub.erl&quot;},{line,4012}]},{mod_pubsub,tree,1,[{file,&quot;src/mod_pubsub.erl&quot;},{line,4016}]},{mod_pubsub,tree_call,3,[{file,&quot;src/mod_pubsub.erl&quot;},{line,4131}]},{mod_pubsub,&#039;-create_node/7-fun-2-&#039;,7,[{file,&quot;src/mod_pubsub.erl&quot;},{line,1845}]},{mnesia_tm,apply_fun,3,[{file,&quot;mnesia_tm.erl&quot;},{line,833}]},{mnesia_tm,execute_transaction,5,[{file,&quot;mnesia_tm.erl&quot;},{line,808}]},{mod_pubsub,transaction_retry,6,[{file,&quot;src/mod_pubsub.erl&quot;},{line,4210}]},{mod_pubsub,create_node,7,[{file,&quot;src/mod_pubsub.erl&quot;},{line,1870}]}]}}}</code></div> Tue, 08 Mar 2016 13:04:07 +0000 shaljam comment 66820 at https://www.ejabberd.im When i set nodetree attribute https://www.ejabberd.im/forum/25266/ejabberd-smack-how-successfully-create-leaf-node-inside-collection-node#comment-66424 <p>When i set nodetree attribute in mod_pubsub to "dag" and default plugin to "dag", and if I try to create a collection or a leaf node, then the server returns with internal-server-error </p> <p>The following is what is logged as the error. Even if i delete all pubsub related data in mnesia (rm var/lib/ejabberd/pubsub_index.DCD, pubsub_index.DCL, pubsub_item.DAT, pubsub_node.DCD, pubsub_node.DCL) and start afresh with nodetree and default plugin to "dag", i still get the same error.</p> <div class="codeblock"><code>2015-11-29 08:54:40.880 [error] &lt;0.15643.0&gt;@mod_pubsub:transaction_retry:4180 transaction return internal error: {aborted,{function_clause,[{mod_pubsub,&#039;-get_node_subs_by_depth/3-lc$^0/1-0-&#039;,[{&#039;EXIT&#039;,{{badmatch,[{pubsub_node,{&lt;&lt;&quot;pubsub.mydomain&quot;&gt;&gt;,&lt;&lt;&quot;collection_node&quot;&gt;&gt;},5,[],&lt;&lt;&quot;dag&quot;&gt;&gt;,[{&lt;&lt;&quot;1478525555&quot;&gt;&gt;,&lt;&lt;&quot;&quot;mydomain&quot;&gt;&gt;,&lt;&lt;&gt;&gt;}],[{publish_model,open},{presence_based_delivery,false},{persist_items,true},{notify_delete,true},{deliver_payloads,true},{access_model,open},{node_type,leaf},{notify_config,false},{notify_retract,true},{purge_offline,false},{max_items,10},{subscribe,true},{roster_groups_allowed,[]},{notification_type,headline},{max_payload_size,60000},{send_last_published_item,on_sub_and_presence},{deliver_notifications,true}]}]},[{nodetree_dag,traversal_helper,6,[{file,&quot;src/nodetree_dag.erl&quot;},{line,203}]},{mod_pubsub,tree_call,3,[{file,&quot;src/mod_pubsub.erl&quot;},{line,4081}]},{mod_pubsub,get_node_subs_by_depth,3,[{file,&quot;src/mod_pubsub.erl&quot;},{line,3402}]},{mod_pubsub,&#039;-create_node/7-fun-2-&#039;,7,[{file,&quot;src/mod_pubsub.erl&quot;},{line,1850}]},{mnesia_tm,apply_fun,3,[{file,&quot;mnesia_tm.erl&quot;},{line,833}]},{mnesia_tm,execute_transaction,5,[{file,&quot;mnesia_tm.erl&quot;},{line,813}]},{mod_pubsub,transaction_retry,6,[{file,&quot;src/mod_pubsub.erl&quot;},{line,4160}]},{mod_pubsub,create_node,7,[{file,&quot;src/mod_pubsub.erl&quot;},{line,1871}]}]}}],[{file,&quot;src/mod_pubsub.erl&quot;},{line,3403}]},{mod_pubsub,&#039;-create_node/7-fun-2-&#039;,7,[{file,&quot;src/mod_pubsub.erl&quot;},{line,1850}]},{mnesia_tm,apply_fun,3,[{file,&quot;mnesia_tm.erl&quot;},{line,833}]},{mnesia_tm,execute_transaction,5,[{file,&quot;mnesia_tm.erl&quot;},{line,813}]},{mod_pubsub,transaction_retry,6,[{file,&quot;src/mod_pubsub.erl&quot;},{line,4160}]},{mod_pubsub,create_node,7,[{file,&quot;src/mod_pubsub.erl&quot;},{line,1871}]},{mod_pubsub,do_route,7,[{file,&quot;src/mod_pubsub.erl&quot;},{line,985}]},{mod_pubsub,handle_info,2,[{file,&quot;src/mod_pubsub.erl&quot;},{line,859}]}]}}</code></div> Mon, 30 Nov 2015 17:03:17 +0000 gunjanm608 comment 66424 at https://www.ejabberd.im