Page 2 of 2

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

PostPosted: 03 Aug 2015, 02:45
by sipes1946
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)

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

PostPosted: 23 Feb 2016, 20:35
by Renaan
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 :(

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

PostPosted: 23 Feb 2016, 21:08
by LevelX
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

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

PostPosted: 23 Feb 2016, 21:45
by Renaan
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

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

PostPosted: 24 Feb 2016, 09:14
by LevelX
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?

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

PostPosted: 24 Feb 2016, 14:34
by Renaan
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

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

PostPosted: 24 Feb 2016, 15:49
by LevelX
So be sure it's caused by AVG that is blocking the ports.
XMage can't do anything about it.

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

PostPosted: 24 Feb 2016, 20:34
by Renaan
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.

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

PostPosted: 14 Jan 2017, 16:30
by ggzel
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.

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

PostPosted: 20 Jan 2017, 01:25
by skywalk
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=""
    />

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

PostPosted: 20 Jan 2017, 01:38
by skywalk
oh and backup your config.xml file elsewhere because when you update your xmage installation it delete and erase your config.xml file.

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

PostPosted: 23 Jan 2017, 16:42
by kelmhike
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!

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

PostPosted: 22 Aug 2017, 14:55
by kohath
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?

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

PostPosted: 22 Aug 2017, 19:43
by kohath
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