Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Page:  1  2  next
Avatar
coldfact #1
Member since Dec 2008 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Trying to connect to openfire XMPP server...
Totally new to this and likely missing something basic, but I can connect to my server with these settings:(imagining that it is coldfact.com)

[USING PIDGIN]
Protocol: XMPP
Username:me
Domain:coldfact.com
Resource:Home
Password:*****
Advanced: Port:5222
Connect Server:openfire.coldfact.com
File transfer: proxy.jabber.org

[SPARK]
Username: me
Password: *****
Server:openfire.coldfact.com

Now my username/Jabber ID when I connect is: me@coldfact.com

I cannot get the basic three line code (here: http://www.ag-software.net/index.php?page=agsxmpp-sdk) or the MiniClient.exe to log me on, and I think the reason is because of the openfire subdomain...

For instance, in the miniclient I use:
JabberID: me@coldfact.com
Password: ***** etc.
But while I *AM* me@coldfact.com when I chat to other users or get messages in pidgin and spark, I do not *connect* to coldfact.com, but rather openfire.coldfact.com.

I hope I am making some sense... I guess what I really want to know is how to get the samples working when the jabberid (me@coldfact.com) does not contain the connect server name (openfire.coldfact.com)

Thanks for any help!
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by coldfact:
I hope I am making some sense... I guess what I really want to know is how to get the samples working when the jabberid (me@coldfact.com) does not contain the connect server name (openfire.coldfact.com)

SRV records are meant for this in XMPP. And the RFC's require that you have valid SRV records.
Because many domains have no SRV Records there is the ConnectServer Property in agsXMPP.

If you set
  1. xmppCon.ConnectServer = "openfire.coldfact.com";

it will work. You have to modify the examples for your server and set always the ConnectServer property.

Alex

PS: I am unable to connect to openfire.coldfact.com on Port 5222
Avatar
coldfact #3
Member since Dec 2008 · 2 posts
Group memberships: Members
Show profile · Link to this post
Thanks so much... it was as easy as that! To help any others doing this, the test code now is:

            XmppClientConnection xmpp = new XmppClientConnection("coldfact.com",5222);
            xmpp.ConnectServer = "openfire.coldfact.com";
            xmpp.Open("me","PASSWORD");
            xmpp.OnLogin += delegate(object o) { xmpp.Send(new Message("you@coldfact.com", MessageType.chat, "Hello, how are you?")); };
            Console.WriteLine("Wait until you get the message and press a key to continue");
            Console.ReadLine();
            xmpp.Close();
The only thing (beyond adding connectserver) that I stumbled on was you connect as me not me@coldfact.com and you send to you@coldfact.com and not you.

Thanks again Alex!

PS. That is not my real server name ;)
Avatar
Alex #4
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
me@coldfact.con is a bare jid
me is the username (node part) of this jid.

In the Open method you set username and password.
I could also add a constructor where you add your bare Jid and password only to initiate the connection.

Alex
Avatar
christopher #5
Member since Dec 2008 · 6 posts
Group memberships: Members
Show profile · Link to this post
I'm having a similar issue.  I can connect to google talk with my client, but not my local openfire server with any of the examples in the SDK or my own client.

my openfire server's name is "blau"

            xmppCon.Username = this.username.Text;
            xmppCon.Password = this.password.Text;
            xmppCon.Server = this.server.Text;
            xmppCon.AutoAgents = false;
            xmppCon.AutoPresence = true;
            xmppCon.AutoRoster = true;
            xmppCon.AutoResolveConnectServer = true;
            xmppCon.Open();

Will not connect.  I tried xmppConnect.ConnectServer = "blau" but it did not work.  I tried this out at the office's openfire server and it would not work either.  Spark will connect to either of these servers just fine.
Avatar
Alex #6
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
christopher,
it looks like your server or DNS is configured not correctly. Please post your debug Xml.
This post was edited on 2008-12-08, 18:33 by Alex.
Avatar
christopher #7
Member since Dec 2008 · 6 posts
Group memberships: Members
Show profile · Link to this post
My pdb file?
Avatar
Alex #8
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
no, your Xml debug from the events OnReadXml and OnWriteXml
Avatar
christopher #9
Member since Dec 2008 · 6 posts
Group memberships: Members
Show profile · Link to this post
I handled the events in my client.  When trying to connect neither got fired.  When I closed the connection one of the reported something like <stream></stream>

I used the miniclient and it appears the same way.  If I try to connect to admin@blau then I receive nothing in the debug.  When I attempt to connect I get a messagebox with "Socket Error No connection could be made because the target machine actively refused it."
Avatar
Alex #10
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
maybe its an IPv6, IPv4 error. Is your server machine IpV6 enabled? If yes then probably agsXMPP is trying to connect to your IPv6 address and the server listens only to IpV4.

Alex
Avatar
christopher #11
Member since Dec 2008 · 6 posts
Group memberships: Members
Show profile · Link to this post
Well, now it seems that both my client and the miniclient can connect at the office, but neither can connect to my home server.  My home server is running Windows Vista.  I'm attempting to connect to it from the same machine.  I've disabled the firewall.  What bothers me is that spark and any other client connects just fine.
Avatar
Alex #12
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
windows Vista is IPv6 enabled by default, so I am pretty sure its an IPv6 <--> Ipv4 issue. agsXMPP supports IPv4 correctly, if your server doesnt this can cause this kind of problems.

Alex
Avatar
christopher #13
Member since Dec 2008 · 6 posts
Group memberships: Members
Show profile · Link to this post
Any plans to implement IPv6 support soon?
Avatar
Alex #14
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
please read my post again, its implemented in agsXMPP, but maybe not in your server which is causing your problems.

Alex
Avatar
christopher #15
Member since Dec 2008 · 6 posts
Group memberships: Members
Show profile · Link to this post
It was an IPv6 issue.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  1  2  next
Forum: agsXMPP RSS