Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Page:  1  2  next
Avatar
victuar #1
Member since Oct 2008 · 9 posts · Location: USA
Group memberships: Members
Show profile · Link to this post
Subject: agsXMPP SDK 1.0 samples: How to call server on localhost from MiniClient?
I downloaded and installed your agsXMPP SDK v1.0. Could you please provide steps how to call your sample "server" running on localhost from "MiniClient" if it's possible? I was successful connecting from this MiniClient to jabber.org but cant connect to local server.

Thanks
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The server include in the samples directory is far away from being a XMPP server. Its only a basic example which will show you how to get started with writing an XMPP server based on the agsXMPP SDK.

When you start the server you can connect with with a jid xxx@localhost or xxx@your-machine-name. There is no user database, so it accepts every username and password.

Alex
Avatar
victuar #3
Member since Oct 2008 · 9 posts · Location: USA
Group memberships: Members
Show profile · Link to this post
I've tried both - no success so far. In both cases I'm getting same message:

"Socket error: No connection could be made because the target machine <bla-bla-bla> actively refused it."

In case of GID=xxx@localhost <bla-bla-bla> is "::1:5222"
In case of GID=xxx@gwista <bla-bla-bla> is ".....:5222" where before :5222 there is some weird code. "gwista" is my host name.

To connect to this server I'm using your MiniClient which connects fine with Jabber.org.

So, what I'm doing wrong?
Avatar
Alex #4
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Are you on Vista with IPV6 enabled? Then this could be the problem when the server is listening to a IPV4 address and MiniClient connecting to your V6 address. Did you try another client like Exodus or Psi?

Alex
Avatar
victuar #5
Member since Oct 2008 · 9 posts · Location: USA
Group memberships: Members
Show profile · Link to this post
Thanks, Exodus works for me. But what changes in MiniClient you can suggest to make it working with IPv6 as well? Or I have to change my Vista settings to disallow IPv6?
Avatar
Alex #6
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
there is no IPV6 support in the server example, but there is in agsXMPP and the MiniClient. So the server listens on v4 and MiniClient tries to connect with v6 because your OS supports it. I don't think Exodus supports v6, so it connects always on v4 which works.

Alex
Avatar
victuar #7
Member since Oct 2008 · 9 posts · Location: USA
Group memberships: Members
Show profile · Link to this post
Thank you, Alex.
Avatar
NecmiKara #8
Member since Mar 2009 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: I see but I don't succeed
Hi all,

I have exactly the same problem. I'm unable to connect to a local ejabberd server. I tried to add ipv6 support to ejabberd, tried to disable ipv6 on my vista but it still does not work with agsxmpp although it works fine with Psi. So I'd like to know how I can force ipv4 connection for my console client?


I did that:
Jid jid = new Jid("necmi@necmi-pc");

            xmppCon.Password = "necmi";
            xmppCon.Username = jid.User;
            xmppCon.Server = "127.0.0.1";            // I also tried localhost
            //xmppCon.ConnectServer = "127.0.0.1";
            xmppCon.Port = 5222;
           
            xmppCon.AutoAgents = false;
            xmppCon.AutoPresence = true;
            xmppCon.AutoRoster = true;
            xmppCon.AutoResolveConnectServer = false;    // I also tried "true"
What should I wrote?

And also, what's the difference between "Server" and "ConnectServer" properties?
Avatar
Alex #9
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by NecmiKara:
And also, what's the difference between "Server" and "ConnectServer" properties?

Server is the Xmpp Domain. Connect Server is the hostname or Ip address for the service.
When your jid is necmi@necmi-pc, then the server property must be set to necmi-pc

Try it without setting a ConnectServer, or try to add a IPv4 entry to your hosts file or DNS server for necmi-pc.

Alex
Avatar
Dmitriy #10
Member since Feb 2009 · 6 posts · Location: Pennsylvania, U.S.
Group memberships: Members
Show profile · Link to this post
[DISCLAIMER: I am not affiliated with AG Software. I'm just using their SDK for developing a custom XMPP client.]

Question: Why don't you install some "real" XMPP server on your localhost?

I would recommend Openfire, ejabberd, or IceWarp (this one is not free, but there's a free trial).
They are easy to install and configure, and they DO work, right "out of the box", especially in such a simple scenario as "localhost".
[In fact, in my company we are running Openfire in production on a VPS server.]

The agsXMPP SDK - from my own VERY extensive experience with evaluating various .NET- and Java-based  SDKs - is the best SDK for XMPP.
If something is not working in it, it only means you've forgotten to do something: some boolean switch or something like that.

But I don't think you want to use it (or, any other SDK, for that matter) to write you own *server*.

Use it for a client or middleware. This is where it excels.
Avatar
SoulAspect #11
Member since Sep 2009 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: Fix
ive had the same problem, can't establish a connection between the mini-client and my local ejabberd software.
Spark and pandion works well. The pc is not connected to the internet(dont know if it matters)

culprit is in the clientconnection.cs (if your using C# of course)

IPAddress ipAddress = ipHostInfo.AddressList[0];// IPAddress.Parse(address);
IPEndPoint endPoint = new IPEndPoint(ipAddress, Port);

around line 204... i think

change ipHostInfo.AddressList[0] to ipHostInfo.AddressList[1]

this should allow localhost connections
Avatar
Alex #12
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The problem was discussed several times before here.

When you run an OS with IPV6 enabled then agsXMPP tries to connect to an IPV6 adressed when there is one. And most XMPP servers listen only to IPV4 by default. Clients without IPV6 support have no problems and will connect.

The easiest is to modify the host file or dns server to return only an v4 addresses, or configure the server to listen on v6 only or v4 and v6.

Alex
Avatar
reach4thelasers #13
Member since Dec 2009 · 7 posts
Group memberships: Members
Show profile · Link to this post
I've been battling with the same localhost problem for 2 days.  I've tried enabling IPv6 on ejabberd / disabling IPv6 on my wireless interface & Network Device / uncommenting the localhost entries in my hosts file and removing the IPv6 host entry.

Isn't it a bit crazy to have a client library that communicates on a protocol that isn't in general use on the internet and LANs and that is by default disabled on all the major XMPP servers?  I'm very close to abandoning ship and trying jabber-net?

Does anyone actually need to use XMPP with IPv6?
Avatar
Alex #14
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by reach4thelasers:
I've been battling with the same localhost problem for 2 days.  I've tried enabling IPv6 on ejabberd / disabling IPv6 on my wireless interface & Network Device / uncommenting the localhost entries in my hosts file and removing the IPv6 host entry.
this problems exists only when you test on your local developer machine with IPV6 enabled. And in this case its a server configuration problem. Because your DSN returns an IP on which your server is not listening.

Quote by reach4thelasers:
Isn't it a bit crazy to have a client library that communicates on a protocol that isn't in general use on the internet and LANs and that is by default disabled on all the major XMPP servers?  I'm very close to abandoning ship and trying jabber-net?
if you don't need it you can uncomment the v6 code in ClientSocket.cs and recompile the lib

Quote by reach4thelasers:
Does anyone actually need to use XMPP with IPv6?
yes, we had many requests for IPV6 in the past. This is why we added it.

Alex
Avatar
reach4thelasers #15
Member since Dec 2009 · 7 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #13
After 2 days jumping through hoops trying to get localhost jids to be recognized, ripping apart the configuration on my laptop, breaking the config on ejabberd trying to enable IPv6 I finally got the agsXMPP console client example working.

Follow the instructions here:
http://support.microsoft.com/kb/929852

Add Hex '10'  to the DisabledComponents DWORD value as per the instructions.  This disables ALL native IPv6 interfaces on the computer and causes agsXMPP to use IPv4 thus complying with the configuration of 99.999% of computers and networks on the planet.
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