So we’ve been working away at this for more than a week now with little to no progress. I posted an AnswerHub question almost two weeks ago that revealed that XMPP is intended to be used as a party system and that we’d have to host our own XMPP server. You can read the original AnswerHub post here.
We’ve setup our XMPP server using ejabberd and tested it by connecting to it via a Jabber client (PSi) and it works as intended however using the XMPP module included with the engine we cannot get beyond authorization.
I’ve pasted logs of both PSi and libjingle (the XMPP library included with the engine) connecting to our ejabberd server, as well as what UE4 spits out on the client side. Perhaps someone here has had experience with this? Maybe ejabberd is the wrong server to use? We’re testing connectivity by running the below command in the UE4 console.
xmpp test <login> <password>
edit: It looks like this is an issue with libjingle and ejabberd Libjingle-0.4.0 connection problems with Ejabberd | ejabberd
UE4 XMPP LOGS
[2016.11.01-18.17.02:152][343]LogXmpp: Starting Login on connection
[2016.11.01-18.17.02:153][343]LogXmpp: server = 127.0.0.1:5222
[2016.11.01-18.17.02:153][343]LogXmpp: user = test@laptop-7p8m2l8i/V2:ue_xmpp_test::E2E6661B4E0C60763F49549174BCC832
[2016.11.01-18.17.02:153][343]LogXmpp: Startup connection
[2016.11.01-18.17.02:170][343]LogXmpp: Login Changed from NotStarted to ProcessingLogin
[2016.11.01-18.17.02:170][343]LogXmpp:Verbose: send:
<stream:stream to="laptop-7p8m2l8i" xml:lang="*" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">
[2016.11.01-18.17.02:170][343]LogXmpp:Verbose: STATE_OPENING
[2016.11.01-18.17.02:171][343]LogXmpp:Verbose: recv:
<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='13079822483454227031' from='laptop-7p8m2l8i' version='1.0' xml:lang='en'>
[2016.11.01-18.17.02:171][343]LogXmpp:Verbose: recv:
<stream:features><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='Xe/lYmivnmPRh4GEsNf6U13V4G8='/><register xmlns='http://jabber.org/features/iq-register'/><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>PLAIN</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>X-OAUTH2</mechanism><mechanism>SCRAM-SHA-1</mechanism></mechanisms></stream:features>
[2016.11.01-18.17.02:171][343]LogXmpp:VeryVerbose: OnSocketClosed state=0
[2016.11.01-18.17.02:171][343]LogXmpp:VeryVerbose: OnSocketClosed error=0
[2016.11.01-18.17.02:171][343]LogXmpp:VeryVerbose: OnSocketClosed winsock=0
[2016.11.01-18.17.02:171][343]LogXmpp:Verbose: STATE_CLOSED
[2016.11.01-18.17.02:171][343]LogXmpp:Warning: XMPP log-in credentials not valid (6)
[2016.11.01-18.17.02:171][343]LogXmpp: Login Changed from ProcessingLogin to LoggedOut
[2016.11.01-18.17.02:175][344]LogXmpp: Logged OUT JID=test@laptop-7p8m2l8i/V2:ue_xmpp_test::E2E6661B4E0C60763F49549174BCC832
[2016.11.01-18.17.02:175][344]LogXmpp: FXmppTest::OnLoginComplete UserJid=test@laptop-7p8m2l8i/V2:ue_xmpp_test::E2E6661B4E0C60763F49549174BCC832 Success=false Error=
[2016.11.01-18.17.02:175][344]LogXmpp: Shutdown connection
ejabberd UE4 CONNECTION LOGS
2016-11-01 14:17:02.158 [info] <0.463.0>@ejabberd_listener:accept:333 (#Port<0.20324>) Accepted connection 127.0.0.1:61270 -> 127.0.0.1:5222
2016-11-01 14:17:02.159 [debug] <0.512.0>@ejabberd_receiver:process_data:284 Received XML on stream = <<"<stream:stream to=\"laptop-7p8m2l8i\" xml:lang=\"*\" version=\"1.0\" xmlns:stream=\"http://etherx.jabber.org/streams\" xmlns=\"jabber:client\">
">>
2016-11-01 14:17:02.159 [debug] <0.513.0>@ejabberd_c2s:send_text:1924 Send XML on stream = <<"<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='13079822483454227031' from='laptop-7p8m2l8i' version='1.0' xml:lang='en'>">>
2016-11-01 14:17:02.159 [debug] <0.513.0>@ejabberd_c2s:send_text:1924 Send XML on stream = <<"<stream:features><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='Xe/lYmivnmPRh4GEsNf6U13V4G8='/><register xmlns='http://jabber.org/features/iq-register'/><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>PLAIN</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>X-OAUTH2</mechanism><mechanism>SCRAM-SHA-1</mechanism></mechanisms></stream:features>">>
2016-11-01 14:17:02.160 [debug] <0.513.0>@ejabberd_c2s:send_text:1924 Send XML on stream = <<"</stream:stream>">>
2016-11-01 14:17:02.160 [debug] <0.513.0>@ejabberd_socket:send:184 Error in gen_tcp:send: {error,closed}
ejabberd PSi CONNECTION LOGS
2016-11-01 14:10:02.786 [info] <0.463.0>@ejabberd_listener:accept:333 (#Port<0.20284>) Accepted connection 127.0.0.1:60678 -> 127.0.0.1:5222
2016-11-01 14:10:02.874 [debug] <0.489.0>@ejabberd_receiver:process_data:284 Received XML on stream = <<"<?xml version=\"1.0\"?>
<stream:stream xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\" xmlns=\"jabber:client\" to=\"laptop-7p8m2l8i\" xml:lang=\"en\" xmlns:xml=\"http://www.w3.org/XML/1998/namespace\">
">>
2016-11-01 14:10:02.875 [debug] <0.490.0>@ejabberd_c2s:send_text:1924 Send XML on stream = <<"<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='8545444584492153004' from='laptop-7p8m2l8i' version='1.0' xml:lang='en'>">>
2016-11-01 14:10:02.875 [debug] <0.490.0>@ejabberd_c2s:send_text:1924 Send XML on stream = <<"<stream:features><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='Xe/lYmivnmPRh4GEsNf6U13V4G8='/><register xmlns='http://jabber.org/features/iq-register'/><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>PLAIN</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>X-OAUTH2</mechanism><mechanism>SCRAM-SHA-1</mechanism></mechanisms></stream:features>">>
2016-11-01 14:10:02.878 [debug] <0.489.0>@ejabberd_receiver:process_data:284 Received XML on stream = <<"<auth xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\" mechanism=\"DIGEST-MD5\"/>">>
2016-11-01 14:10:02.878 [debug] <0.490.0>@ejabberd_c2s:send_text:1924 Send XML on stream = <<"<challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>bm9uY2U9IjEzMTg0NjYxNzUyMDU0OTU0Mjk5Iixxb3A9ImF1dGgiLGNoYXJzZXQ9dXRmLTgsYWxnb3JpdGhtPW1kNS1zZXNz</challenge>">>
2016-11-01 14:10:02.879 [debug] <0.489.0>@shaper:update:120 State: {maxrate,1000,0.0,1478023802871321}, Size=71
M=35.5, I=0.0
2016-11-01 14:10:02.917 [debug] <0.489.0>@ejabberd_receiver:process_data:284 Received XML on stream = <<"<response xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">dXNlcm5hbWU9InRlc3QiLG5vbmNlPSIxMzE4NDY2MTc1MjA1NDk1NDI5OSIsY25vbmNlPSJLY0d4UVVZWGtUdkloSnlJVnhzRzE1eEx3UDV3OFhEaVNidHEvY2tQQ0FvPSIsbmM9MDAwMDAwMDEsZGlnZXN0LXVyaT0ieG1wcC9sYXB0b3AtN3A4bTJsOGkiLHFvcD1hdXRoLHJlc3BvbnNlPTk2MTBmNGQyYWM1NGNkYWM2ODVhNzMwMmM1ZjU5Y2MwLGNoYXJzZXQ9dXRmLTg=</response>">>
2016-11-01 14:10:02.917 [debug] <0.489.0>@shaper:update:120 State: {maxrate,1000,986.1111111111111,1478023802907321}, Size=342
M=337.3150684931507, I=11.0
2016-11-01 14:10:02.917 [debug] <0.490.0>@ejabberd_c2s:send_text:1924 Send XML on stream = <<"<challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>cnNwYXV0aD1kMjgzNTdkZjMzMTVmM2JlM2M5MmNlMmQ3MjI0NDc5OA==</challenge>">>
2016-11-01 14:10:03.246 [debug] <0.489.0>@ejabberd_receiver:process_data:284 Received XML on stream = <<"<response xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"/>">>
2016-11-01 14:10:03.246 [debug] <0.489.0>@shaper:update:120 State: {maxrate,1000,998.9727153188692,1478023803245321}, Size=52
M=51.94663601658389, I=0.996
2016-11-01 14:10:03.246 [info] <0.490.0>@ejabberd_c2s:wait_for_sasl_response:921 ({socket_state,gen_tcp,#Port<0.20284>,<0.489.0>}) Accepted authentication for test by ejabberd_auth_anonymous from 127.0.0.1
2016-11-01 14:10:03.246 [debug] <0.490.0>@ejabberd_c2s:send_text:1924 Send XML on stream = <<"<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>">>
2016-11-01 14:10:03.305 [debug] <0.489.0>@ejabberd_receiver:process_data:284 Received XML on stream = <<"<?xml version=\"1.0\"?>
<stream:stream xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\" xmlns=\"jabber:client\" to=\"laptop-7p8m2l8i\" xml:lang=\"en\" xmlns:xml=\"http://www.w3.org/XML/1998/namespace\">
">>
2016-11-01 14:10:03.305 [debug] <0.489.0>@shaper:update:120 State: {maxrate,1000,999.5248221567036,1478023803297317}, Size=206
M=205.9021598557497, I=10.999
2016-11-01 14:10:03.305 [debug] <0.490.0>@ejabberd_c2s:send_text:1924 Send XML on stream = <<"<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='1185803919096443614' from='laptop-7p8m2l8i' version='1.0' xml:lang='en'>">>
2016-11-01 14:10:03.306 [debug] <0.490.0>@ejabberd_c2s:send_text:1924 Send XML on stream = <<"<stream:features><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='Xe/lYmivnmPRh4GEsNf6U13V4G8='/><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/><session xmlns='urn:ietf:params:xml:ns:xmpp-session'><optional/></session><sm xmlns='urn:xmpp:sm:2'/><sm xmlns='urn:xmpp:sm:3'/><csi xmlns='urn:xmpp:csi:0'/></stream:features>">>
2016-11-01 14:10:03.512 [debug] <0.489.0>@ejabberd_receiver:process_data:284 Received XML on stream = <<"<iq type=\"set\" id=\"bind_1\">
<bind xmlns=\"urn:ietf:params:xml:ns:xmpp-bind\">
<resource>LAPTOP-7P8M2L8I</resource>
</bind>
</iq>
">>
2016-11-01 14:10:03.512 [debug] <0.489.0>@shaper:update:120 State: {maxrate,1000,0.0,1478023803308316}, Size=127
M=63.5, I=202.997
2016-11-01 14:10:03.512 [info] <0.490.0>@ejabberd_c2s:open_session:1153 ({socket_state,gen_tcp,#Port<0.20284>,<0.489.0>}) Opened session for test@laptop-7p8m2l8i/LAPTOP-7P8M2L8I
2016-11-01 14:10:03.512 [debug] <0.490.0>@ejabberd_c2s:send_text:1924 Send XML on stream = <<"<iq id='bind_1' type='result'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><jid>test@laptop-7p8m2l8i/LAPTOP-7P8M2L8I</jid></bind></iq>">>
2016-11-01 14:10:03.514 [debug] <0.489.0>@ejabberd_receiver:process_data:284 Received XML on stream = <<"<iq xmlns=\"jabber:client\" type=\"set\" id=\"aab8a\">
<session xmlns=\"urn:ietf:params:xml:ns:xmpp-session\"/>
</iq>
">>
2016-11-01 14:10:03.514 [debug] <0.489.0>@shaper:update:120 State: {maxrate,1000,0.0,1478023803511313}, Size=110
M=55.0, I=0.0