mIRC Home    About    Download    Register    News    Help

Print Thread
#227062 23/10/10 06:39 PM
Joined: Oct 2003
Posts: 214
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
I had some problems with some scripts after updating to 7.14 so i had to change some stuff.
After restarting mIRC several times in a short time i got the errormessage:

* Connecting to IP (6667)
* Unable to connect to server (Address already in use)

After 2 two minutes of waiting i changed the IP to the FQDN and i was able to connect without a problem, after ~30 minutes i tried to reconnect to it using the IP address and it worked fine.

I hope it helps. wink


one step closer to world domination
Joined: Dec 2002
Posts: 344
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 344
Is this a one-time occurrence or is it happening regularly? It sounds like mIRC was trying to use a local port that was not free yet.

Joined: Oct 2003
Posts: 214
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
Happens often, i connect to the same Server twice. A Bouncer.

Just restarted mIRC this time:
Code:
[07:06am] * Connect retry #3 IP (6667)
[07:06am] * Unable to connect to server (Address already in use)
[07:06am] * Connect cancelled
[07:06am] * Connecting to FQDN (6667)
[07:06am] -shroudbnc.info- *** 


one step closer to world domination
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
If that only happens with the bouncer, then it's probably related more to that than to mIRC. But maybe someone knows more about that error than I do.


Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2003
Posts: 214
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
Connected to another server using /server -m 213.131.156.50 (thats wineasy1.se.quakenet.org) typed at the new connection just /server

Code:
[06:06pm] * Disconnected
[06:06pm] * Connecting to 213.131.156.50 (6667)
[06:06pm] * Unable to connect to server (Address already in use)
[06:06pm] * Connect retry #1 213.131.156.50 (6667)
[06:06pm] * Unable to connect to server (Address already in use)
[06:07pm] * Connect retry #2 213.131.156.50 (6667)
[06:07pm] * Unable to connect to server (Address already in use)
[06:08pm] * Connect retry #3 213.131.156.50 (6667)
[06:08pm] * Unable to connect to server (Address already in use)



one step closer to world domination
Joined: Nov 2003
Posts: 50
X
x64 Offline
Babel fish
Offline
Babel fish
X
Joined: Nov 2003
Posts: 50
I would do a "netstat -a" at a command prompt and see how many ports you have in use. It sounds like you're running out of local ports somehow or you have a piece of software specifically making the attempt to open the port fail (software firewall).

Joined: Oct 2003
Posts: 214
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
I have tested around a bit more with it, it happens only if Server Connections is checked under Port Range and Randomize Ports is turned off. Well it shouldn't display this message until all available ports under the range are really in use.

I've set the range to a high value of available ports so this shouldn't happen but it does, no firewall is blocking it.

It happens under Win7 and WinXP with a clean mIRC installation.


one step closer to world domination
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Well there's your problem.

Checking "server connections" under port range makes mIRC use the ports in said port range for its local port. Obviously the next port in the range was in use when you tried to connect. Do you have multiple copies of mIRC running? Alternately, did you connect to more servers than your port range can support? My port range is 1024-1030. With the "Server Connections" setting on, I am only able to connect to 6 servers, and that assumes I have no DCCs active.

I can reproduce this if the port is in use, as expected. However I can't reproduce this with a single mIRC and no applications using that port range. It only happened once when I reconnected quickly, but likely the TCP connection was not yet fully closed in that attempt. It resumed functioning in the very next attempt. If that's the behaviour you're seeing for extremely fast reconnects, that's somewhat normal, but it shouldn't happen more than once in a row.

In short, don't check "Server Connections" unless you know what you're doing. It works as intended, but it probably is not what you want.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Oct 2003
Posts: 214
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
I have just one copy of mIRC running, (while testing two on the xp box and just one the win7)

I'm not connecting to more servers, i'm connecting to the same server ip twice. (A bouncer as mentioned before)

And the problem appears after each start of mIRC, i don't wanna turn it off for Server Connections, because it worked without any problem in previous versions.

I want to limit the amount of the connections mIRC is able to establish, including server connections and dccs. But i don't want to use 'workarounds' for a feature that worked in previous versions.

My settings are set to 15 connections where i connect to 4 servers (2 bouncer connectons, 2 irc servers directly) with a simple remote script, so this shouldn't produce this errormessage at every startup.


one step closer to world domination
Joined: Dec 2002
Posts: 344
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 344
Originally Posted By: argv0
It only happened once when I reconnected quickly, but likely the TCP connection was not yet fully closed in that attempt. It resumed functioning in the very next attempt. If that's the behaviour you're seeing for extremely fast reconnects, that's somewhat normal, but it shouldn't happen more than once in a row.


This is NOT somewhat normal. mIRC should be checking the port to make sure it is actually available for use before attempting to use it. mIRC should skip over the currently unavailable port and use the next one in the port range, unless all of them are in use. mIRC assuming the port is available just because it is not using it anymore is a bug.

Joined: Dec 2002
Posts: 5,412
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,412
Thanks, I was able to reproduce this issue. It looks like there is a bug in the port handling routine that has made it through all of the v7.x betas. I still need to do more testing to confirm.

By default, the Port range option is enabled for "DCC Send, Get, and Chat conections" and the "Randomize" option is not enabled, so this issue affects all users who have not changed the default settings.

Joined: Apr 2003
Posts: 342
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Apr 2003
Posts: 342
Originally Posted By: Sephiroth_
I want to limit the amount of the connections mIRC is able to establish, including server connections and dccs. But i don't want to use 'workarounds' for a feature that worked in previous versions.

My settings are set to 15 connections where i connect to 4 servers (2 bouncer connectons, 2 irc servers directly) with a simple remote script, so this shouldn't produce this errormessage at every startup.


Why are you doing this? mIRC is going to use the same number of connections. You end up creating 32 connections total (15 + 2 + 13 + 2). And this is BEFORE you initialize DCC.


Beware of MeStinkBAD! He knows more than he actually does!
Joined: Oct 2003
Posts: 214
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
The fix for 7.16/7.17 works so far, i haven't encountered the problm anymore.

Thanks. smile


one step closer to world domination

Link Copied to Clipboard