target machine actively refusing connection

594 views
Skip to first unread message

JonStalnaker

unread,
Feb 8, 2011, 7:41:30 PM2/8/11
to jabber-net
I'm running an ejabberd server that I've had no problem connecting to
with Trillian and Pidgin. I'm running a Windows 7 64bit machine and
am very new to XMPP. I've been trying to run and connect with the
2005-Example with no success. The error message that I keep getting
when trying to connect is:

ERROR: System.Net.Sockets.SocketException (0x80004005): No connection
could be made because the target machine actively refused it
[fe80::6859:299f:1407:6696%11]:5222
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at bedrock.net.AsyncSocket.ExecuteConnect(IAsyncResult ar) in C:
\Installation\JabberNet-Source-2.1.0.710\JabberNet-2.1.0.710\bedrock
\net\AsyncSocket.cs:line 782

My server is hosted on devt1500-6, and I've been using the username
admin@devt1500-6 and test@devt1500-6 in both Trillian and Pidgin with
success.

I have tried the example provided by agsXMPP as well with the same
results. I think it may have something to do with IPv6 and I really
think it's something in my environment but am at a loss. Is there
anyone out there that could help me overcome this hurdle? Also, is
there a .net 4.0 example in the works?

Thanks.

CharlieDigital

unread,
Feb 23, 2011, 2:32:54 AM2/23/11
to jabber-net
This is an issue w/IPv6 for sure.

I had the same problem and stepped through the debugger. In the
AsyncSocket class, there are a few debug lines commented out. If you
uncomment it, you can see that if you try to connect from certain
machines, it resolves as IPv4 and in my case, connecting locally on
the server resolved the address as an IPv6 endpoint.

The solution for me was to set the JabberClient.Server property to the
IPv4 IP address.

For example:

JabberClient client = new JabberClient();
// Other init code here...
client.Server = "127.0.0.1";

The real solution probably involves making a change to the AsyncSocket
class or the Address class.

JonStalnaker

unread,
Feb 23, 2011, 3:52:42 PM2/23/11
to jabber-net
Thanks for your response, the workout I just decided to use yesterday
was to edit the hosts file and create a record for my local machine.
Now instead of connecting to devt1500-6 I connect/host on
xmpplocal.com and everything appears to work fine. It's not the ideal
solution but one that will due for me for now.
> > Thanks.- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages