User1 sends a first message (Gajim) to user2, user2 replies on mobile (Jitsi). If user1 then replies again, user1 gets disconnected by openfire. I suspect carbons could be involved in the problem, problably in combination with a fault in one of the clients. Both Gajim and Jitsi supports carbons and works most of the time with openfire but this error happens way to often.
2014.05.13 11:02:27 org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to error while processing message: …
org.dom4j.IllegalAddException: The node … could not be added to the element “forwarded” because: The Node already has an existing parent of “forwarded”
If one looks at the timestamps from both the client and the server one can see that it’s the message “second from Gajim” that makes openfire spit the error and close the connection to the client.
Disclaimer, I first tried to post this with embedded logs formatted for easy reading, however the forum gave some error without information when I tried to embed the logs so I’ve linked to the logs on pastebin.
It seems like this issue occurs only, if more than one message carbon is created, in which case the same message gets added to multiple “forwarded” elements, resulting in this error.
Something is wrong with the automatic build system, so no nightlies with this change. Will notify Daryl (the one maintaining the build system) about that issue.
Yes, I’ve read your thread and even shortly discussed it with Flow. Unfortunately, there’s now idea what it is, but it seems unrelated to Message Carbons.
There’s some IQ-error (feature-not-implemented) routed wrongly (with a extension), which raises the error, which is strange.
I reviewed the changes, which were made since 3.9.3 and can’t imagine, what should cause this error.
I think i am dealing with a variant of this issue.
My Setup:
Openfire 3.9.3
user01: Spark
user02: Gajim, Gajim, Gajim (all of them with carbons enabled and set to the same priority)
user01 sends a message to user02 -> the three of the clients for user02 get the message.
when any of the clients for user02 tries to reply the message that one client goes offline.
I noted the same error reported by @Anders :
2014.10.10 10:42:42 org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to error while processing message:
org.dom4j.IllegalAddException: The node “org.dom4j.tree.DefaultElement@70de9c7f [Element:]” could not be added to the element “forwarded” because: The Node already has an existing parent of “forwarded”
I tried with different combinations of clients for user02 to isolate the issue to the server software: (jitsi/gajim/yaxim , jitsi/gajim/gajim) and i got the same result, I noticed this happens when there are more than two sessions with carbons (same user), so the problem starts when a third session comes into place.
@CSH could it be related? if so, does the same fix apply?