SOCKS5 connection times out (GCDAsyncSocket). (OpenFire, XEP-0065 and iOS XMPPFramework)
Asked Answered
B

1

2

Problem : I am attempting a TURNSocket (XEP-0065 - SOCKS5) using the iOS XMPPFramework and an OpenFire Server. I want to be able to send and receive files. However, in most scenarios, the receiver returns no response. I currently suspect the problem is to do with the OpenFire proxy server, which times out! This is set up on the local network, and I have edited the hosts file to point to it.

Note : The base of my code is from the following tutorial : http://mobile.tutsplus.com/tutorials/iphone/building-a-jabber-client-for-ios-server-setup/

XML and Error : The sender sends the following XML (after a few other XEP-0065 XML posts back and forth)...

<iq type="set" 
    to="[email protected]/spark" 
    id="DD96A581-BFA3-47BC-A3C0-D26AD48D7442">
    <query xmlns="http://jabber.org/protocol/bytestreams" 
        sid="DD96A581-BFA3-47BC-A3C0-D26AD48D7442" 
        mode="tcp">
        <streamhost xmlns="http://jabber.org/protocol/bytestreams"
            jid="proxy.beta.myCompany.co.uk" 
            host="127.0.1.1"
            port="7777"/>
    </query>
</iq>

If I chat to another instance of my app, I get the following error in the recipient when trying to use proxy.beta.myCompany.co.uk

Error Domain=GCDAsyncSocketErrorDomain Code=3 "Attempt to connect to host timed out"

So my main question is, why did it timeout?

Extra Info : If I have a chat between one instance of my app and an Adium IM Chat client, I get no response. However, if I chat to a Spark IM Chat Client, I get the following response ...

<iq xmlns="jabber:client" 
    id="9A34F268-9FC9-44F8-9662-4651A9E0B633" 
    to="[email protected]/d04f6694" 
    from="[email protected]/Spark 2.6.3" 
    type="error">
        <query xmlns="http://jabber.org/protocol/bytestreams"
            sid="9A34F268-9FC9-44F8-9662-4651A9E0B633"
            mode="tcp">
            <streamhost jid="proxy.beta.myCompany.co.uk" 
            host="127.0.1.1" 
            port="7777"/>
        </query>
    <error code="406" 
        type="MODIFY">
            <not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
    </error>
</iq>
Beebe answered 24/4, 2012 at 11:32 Comment(10)
I have noticed that my sid and id are the same in the XML I send! However, it doesn't seem to fix the issue if I make a new sid. Is this relevant to the issue?Beebe
I got the same issue..! after a specifica time interval getting fail error. did you solved the issue?Elation
Not yet. Let me know if you find an answer, there's a big shiny green tick waiting for you!Beebe
and can you post the code to retrive the resource path of perticular JID? i tried jid.resource but it is nullElation
If its null you probably have no resource. Try [jid full] to see the full jid. If there's no resouce on the end, there's no resource. Bare in mind that if you are using the code from the same tutorial I am using, it uses a hard coded jid with no resource. You may want to change the code so it uses the jid from the 'friend' you have clicked on when you started the chat.Beebe
no in [jid full] there isnt any resource, but when I check the sqlite of core data, there is /resource attachedElation
I don't know. Maybe ask a new question here on Stack Overflow.Beebe
Hello Andy A, How do you do:), Any success with turnsocket connection.Baca
Not yet. I've put the project on hold and started attempting file transfer on android instead (much easier than iOS!)Beebe
can u send image from device to spark client and spark client to device ? if u can do then plz give me brief introductionNowt
B
1

On OpenFire, I needed to set the ip of the proxy using a system property of 'xmpp.proxy.externalip'.

Beebe answered 13/6, 2012 at 10:24 Comment(6)
I have installed open fire on my one of machine of local network. So, what should be the value of xmpp.proxy.externalip this property.can you please elaborateKilah
In my case I have put the ip address of the server, but having done a quick search on the internet, people are saying you should put the address which external clients can access the server like this - proxy.chat.somedomain.comBeebe
But as i told i have installed it on one of machine of local network so how can I get publicly accessible IP of itKilah
I'm not sure I have no experience of this stuff. If you feel my Stack Overflow question doesn't solve your problem, you need to either search for a question that does or start a new question.Beebe
'xmpp.proxy.externalip which IP ?? when i have used 1 server openfire install in that server now want to connect 2 1 android and 1 ios user with xmpp in that and then send image but the message is service unavailbe type 503 occurNowt
i m developing chat app in android with xmpp and server open fire using smack library Spark to device image transfer is success but when transfer image from device to Spark service unavabile error occur is there is any configuration in openfire ???? if any one know then please help meNowt

© 2022 - 2024 — McMap. All rights reserved.