It is currently 12 Dec 2017, 08:28
   
Text Size

Unable to connect to server. Cannot find free port to use.

by BetaSteward

Moderators: noxx, Aurum, fireshoes, jeffwadsworth, TheElk801, BetaSteward, LevelX, North, escplan9, CCGHQ Admins

Re: Unable to connect to server. Cannot find free port to us

Postby sipes1946 » 03 Aug 2015, 02:45

LevelX wrote:
Armyn3 wrote:I found the problem. It did not help if I disabled AVG antivirus, but worked after I completely deleted it from my laptop. Might be the case with other antivirus programmes as well.
Thanks for the reply with the cause of your problem.
exact same problem and solution (uninstalled AVG)
sipes1946
 
Posts: 81
Joined: 02 Aug 2015, 16:02
Has thanked: 31 times
Been thanked: 3 times

Re: Unable to connect to server. Cannot find free port to us

Postby Renaan » 23 Feb 2016, 20:35

Well, since the update to 1.4.9 this problem has been hitting me.

Also downloads the cards, but doesn't store them, or maybe its just failing to download them altogether.

Have exceptions added to firewall, although that was never needed in 1.4.8

Feb 23, 2016 8:25:09 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

That's the first thing that pops up on the XMage Client Console.

Java is confirmed as latest version as 1.7.0_75

Please help :(
Renaan
 
Posts: 6
Joined: 01 Dec 2015, 22:59
Has thanked: 0 time
Been thanked: 0 time

Re: Unable to connect to server. Cannot find free port to us

Postby LevelX » 23 Feb 2016, 21:08

Renaan wrote:Well, since the update to 1.4.9 this problem has been hitting me.

Also downloads the cards, but doesn't store them, or maybe its just failing to download them altogether.

Have exceptions added to firewall, although that was never needed in 1.4.8

Feb 23, 2016 8:25:09 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

That's the first thing that pops up on the XMage Client Console.

Java is confirmed as latest version as 1.7.0_75

Please help :(
Your system seems to restrict your profile access to the windows registry in a special way.
Maybe this workaround described under the following link does help you:
http://www-01.ibm.com/support/docview.w ... wg21496098
User avatar
LevelX
DEVELOPER
 
Posts: 1611
Joined: 08 Dec 2011, 15:08
Has thanked: 173 times
Been thanked: 348 times

Re: Unable to connect to server. Cannot find free port to us

Postby Renaan » 23 Feb 2016, 21:45

Hi There

Ok, so checking registry....

I have keys for Xmage in CurrentUser-Software-JavaSoft-Prefs-Mage

I made a key Local_Machine -Software-Javasoft-Prefs

I do not really know enough about editing registery to know that its 100% right, but they look the same.

it didn't help :(

I'm still unable to connect to server, still saying Can not find a free port for use.


(Edit)
I'm on Windows 10 64bit btw
Renaan
 
Posts: 6
Joined: 01 Dec 2015, 22:59
Has thanked: 0 time
Been thanked: 0 time

Re: Unable to connect to server. Cannot find free port to us

Postby LevelX » 24 Feb 2016, 09:14

Renaan wrote:I'm still unable to connect to server, still saying Can not find a free port for use.
And AVG or a similar isn't installed?
User avatar
LevelX
DEVELOPER
 
Posts: 1611
Joined: 08 Dec 2011, 15:08
Has thanked: 173 times
Been thanked: 348 times

Re: Unable to connect to server. Cannot find free port to us

Postby Renaan » 24 Feb 2016, 14:34

yep, using AVG, but I was using AVG on 1.4.8 and everything worked fine.

This all started when it updated to 1.4.9
Renaan
 
Posts: 6
Joined: 01 Dec 2015, 22:59
Has thanked: 0 time
Been thanked: 0 time

Re: Unable to connect to server. Cannot find free port to us

Postby LevelX » 24 Feb 2016, 15:49

So be sure it's caused by AVG that is blocking the ports.
XMage can't do anything about it.
User avatar
LevelX
DEVELOPER
 
Posts: 1611
Joined: 08 Dec 2011, 15:08
Has thanked: 173 times
Been thanked: 348 times

Re: Unable to connect to server. Cannot find free port to us

Postby Renaan » 24 Feb 2016, 20:34

Ok, so I can now connect to the server, but cannot download any of the card images, but symbols were downloaded fine.

Unexpected end of file from server for every card as the error message, Java SocketException.
Renaan
 
Posts: 6
Joined: 01 Dec 2015, 22:59
Has thanked: 0 time
Been thanked: 0 time

Re: Unable to connect to server. Cannot find free port to us

Postby ggzel » 14 Jan 2017, 16:30

I am having the same problem, although XMage has never worked for me. I can make a deck in the deck builder screen, but it won't let me connect to any server, giving me this error (Can not find a free port to use). Please help, this looks like a really good and fun program, and I would like to be able to use it. I do not have AVG installed, by the way.
ggzel
 
Posts: 1
Joined: 14 Jan 2017, 16:26
Has thanked: 0 time
Been thanked: 0 time

Re: Unable to connect to server. Cannot find free port to us

Postby skywalk » 20 Jan 2017, 01:25

Hi this is how i setup my server, using a hostname.

I forwarded the port 17171 and 17172 to my 192.168.0.2 computer where my xmage server is open on my router config webpage (usually at http://192.168.0.1 or 1.1)

I added this line at the bottom of the file my c:\windows\system32\drivers\etc\hosts
Code: Select all
192.168.0.2      xmage.lukeskywalk.com
Here is there part that matter in my config.xml
Code: Select all
<server serverAddress="xmage.lukeskywalk.com"
            serverName="mage-server"
            port="17171"
            secondaryBindPort="17172"
            backlogSize="800"
            numAcceptThreads="4"
            maxPoolSize="1000"
            leasePeriod="12000"
            maxGameThreads="70"
            maxSecondsIdle="600"
            minUserNameLength="3"
            maxUserNameLength="14"
            invalidUserNamePattern="[^a-z0-9_]"
            minPasswordLength="8"
            maxPasswordLength="100"
            maxAiOpponents="15"
            saveGameActivated="false"
            authenticationActivated="false"
            googleAccount=""
            mailgunApiKey=""
            mailgunDomain=""
            mailSmtpHost=""
            mailSmtpPort=""
            mailUser=""
            mailPassword=""
            mailFromAddress=""
    />
skywalk
 
Posts: 23
Joined: 08 Oct 2015, 12:35
Has thanked: 0 time
Been thanked: 5 times

Re: Unable to connect to server. Cannot find free port to us

Postby skywalk » 20 Jan 2017, 01:38

oh and backup your config.xml file elsewhere because when you update your xmage installation it delete and erase your config.xml file.
skywalk
 
Posts: 23
Joined: 08 Oct 2015, 12:35
Has thanked: 0 time
Been thanked: 5 times

Re: Unable to connect to server. Cannot find free port to us

Postby kelmhike » 23 Jan 2017, 16:42

Hi, since i have updated my xmage, it doesnt work right now, it shows that i am not connected. i have restarted everything, tried new server list, still not connected

thanks in advance for the help

thanks!
Attachments
1.jpg
kelmhike
 
Posts: 2
Joined: 23 Jan 2017, 16:33
Has thanked: 0 time
Been thanked: 0 time

Re: Unable to connect to server. Cannot find free port to us

Postby kohath » 22 Aug 2017, 14:55

I am having the same issues, but I am running Mac OSX 10.12.6. There is no Firewall to be an issue and no workaround that I can see. I am not a programmer and have never written code a day in my life. I played Xmage without issue on my Mac 6 months ago, but as I try to log back on, it is freezing me out with this prompt.

Any thoughts?
kohath
 
Posts: 5
Joined: 22 Aug 2017, 14:53
Has thanked: 0 time
Been thanked: 0 time

Re: Unable to connect to server. Cannot find free port to us

Postby kohath » 22 Aug 2017, 19:43

Solved.

For me it had nothing to do with my personal settings on my computer, but the router at my location. I am not currently at home, but visiting family and found that they have a firewall within their router that I needed my computer to bypass. Once I found this the work around was simple enough.

K
kohath
 
Posts: 5
Joined: 22 Aug 2017, 14:53
Has thanked: 0 time
Been thanked: 0 time

Previous

Return to XMage

Who is online

Users browsing this forum: No registered users and 6 guests


Who is online

In total there are 6 users online :: 0 registered, 0 hidden and 6 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 6 guests

Login Form