Can't bind socket on public IP

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

louissi
Posts: 48
Joined: 03 Mar 2006, 20:55

Can't bind socket on public IP

Postby louissi » 28 May 2013, 15:53

Hey there!
I am having issues binding the smartfox server 2x socket to my public IP. I would like clients from afar to be able to test the game an connect to my computer (containing the server).
When testing I also disable my Windows firewall.
I have no other firewalls.

Here is how I have set up my port forwarding:
http://screencast.com/t/NZWIpqqk

Here is how my config file is laid out:
http://screencast.com/t/3tpYAzaoRNOb

And here is my boot log:
28 May 2013 | 11:20:57,865 | INFO | main | bootLogger | | SmartFoxServer 2X
28 May 2013 | 11:20:57,866 | INFO | main | bootLogger | | BitSwarmEngine version: 3.10.4 { main }
28 May 2013 | 11:20:57,866 | INFO | main | bootLogger | | System Info:
Processor(s): 12
VM Max. memory: 2861MB
os.name: Windows 7
os.arch: amd64
os.version: 6.1
java.version: 1.6.0_21
java.vendor: Sun Microsystems Inc.
java.vendor.url: http://java.sun.com/
java.vm.specification.version: 1.0
java.vm.version: 17.0-b16
java.vm.vendor: Sun Microsystems Inc.
java.vm.name: Java HotSpot(TM) 64-Bit Server VM
java.io.tmpdir: C:\Users\LOUISS~1\AppData\Local\Temp\
Default charset: UTF-8

28 May 2013 | 11:20:57,869 | INFO | main | bootLogger | | Network Info:
Card: Software Loopback Interface 1
->0:0:0:0:0:0:0:1
->127.0.0.1
Card: WAN Miniport (SSTP)
Card: WAN Miniport (IKEv2)
Card: WAN Miniport (L2TP)
Card: WAN Miniport (PPTP)
Card: WAN Miniport (PPPOE)
Card: WAN Miniport (IPv6)
Card: WAN Miniport (Network Monitor)
Card: WAN Miniport (IP)
Card: RAS Async Adapter
Card: Realtek RTL8168C(P)/8111C(P) Family PCI-E Gigabit Ethernet NIC (NDIS 6.20)
->2002:4650:bc66:0:f425:ba9a:a7e:4795
->2002:4650:bc66:0:c927:9b78:801d:16b4
->fe80:0:0:0:f425:ba9a:a7e:4795%11
->192.168.1.114
Card: Microsoft ISATAP Adapter
->fe80:0:0:0:0:5efe:c0a8:172%12
Card: Teredo Tunneling Pseudo-Interface
->2001:0:5ef5:79fb:c1d:25df:3f57:fe8d
->fe80:0:0:0:c1d:25df:3f57:fe8d%13
Card: Realtek RTL8168C(P)/8111C(P) Family PCI-E Gigabit Ethernet NIC (NDIS 6.20)-QoS Packet Scheduler-0000
Card: Realtek RTL8168C(P)/8111C(P) Family PCI-E Gigabit Ethernet NIC (NDIS 6.20)-WFP LightWeight Filter-0000
Card: WAN Miniport (Network Monitor)-QoS Packet Scheduler-0000
Card: WAN Miniport (IP)-QoS Packet Scheduler-0000
Card: WAN Miniport (IPv6)-QoS Packet Scheduler-0000

28 May 2013 | 11:20:57,872 | INFO | main | bootLogger | | Session manager ready: com.smartfoxserver.bitswarm.sessions.DefaultSessionManager@647be610
28 May 2013 | 11:20:57,875 | INFO | main | bootLogger | | TCP Selector opened
28 May 2013 | 11:20:57,880 | INFO | main | bootLogger | | UDP Selector opened
28 May 2013 | 11:20:57,882 | INFO | main | bootLogger | | AcceptSelector opened
28 May 2013 | 11:20:57,883 | INFO | main | bootLogger | | Added bound tcp socket --> 127.0.0.1:40443
28 May 2013 | 11:20:57,883 | INFO | main | bootLogger | | Added bound tcp socket --> 192.168.1.114:40444
28 May 2013 | 11:20:57,884 | WARN | main | bootLogger | | Was not able to bind socket: { 70.80.188.102:40445, (Tcp) }
28 May 2013 | 11:20:57,884 | INFO | main | bootLogger | | Controller started: com.smartfoxserver.v2.controllers.SystemController -- Queue: 0/20000
28 May 2013 | 11:20:57,885 | INFO | main | bootLogger | | Controller started: com.smartfoxserver.v2.controllers.ExtensionController -- Queue: 0/20000
28 May 2013 | 11:20:57,885 | INFO | main | bootLogger | | IOHandler: com.smartfoxserver.v2.protocol.SFSIoHandler@6e955c85
28 May 2013 | 11:20:57,885 | INFO | main | bootLogger | | SocketReader started
28 May 2013 | 11:20:57,885 | INFO | main | bootLogger | | SocketAcceptor initialized
28 May 2013 | 11:20:57,885 | INFO | main | bootLogger | | Socket Writer started (pool size:1)
28 May 2013 | 11:20:57,885 | INFO | main | bootLogger | | DatagramReader started
28 May 2013 | 11:20:57,886 | INFO | Scheduler1-thread-1 | bootLogger | | Scheduler started: scheduler
28 May 2013 | 11:20:57,886 | INFO | main | bootLogger | | Security Manager started
28 May 2013 | 11:20:57,887 | INFO | main | bootLogger | | [[[ ===--- Boot sequence complete ---=== ]]]


Can you guys help me make it work?
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Can't bind socket on public IP

Postby Lapo » 28 May 2013, 18:12

You are probably trying to do too many things in one step.
If possible I would avoid for example to change the default port number. Let's keep it as simple as possible.

You have attempted to bind 3 addressed:
127.0.0.1:40443
192.168.1.114:40444
70.80.188.102:40445
where the latter failed.

As I said let's try to keep this simple. Just put in your config one address: 192.168.1.114 which is your LAN address.
The reason because it refuses 70.80.188.102, is because this is a public IP and I presume it is bound by your router, not your computer.

So, keep using the LAN address, and use the default port 9933 because otherwise all the examples we provide will also need to be redirected to that port, which will add more work for you and more possibility of making mistakes.

The next step is to setup the NAT in your router so that it maps the requests to your public address (whatever it is) to your computer in the LAN, at the above address.

Once this is done, people will be able to reach you from the internet.
Please review the Post Installation Tasks here:
http://docs2x.smartfoxserver.com/Gettin ... stallation

and here's the TroubleShooting guide:
http://docs2x.smartfoxserver.com/Gettin ... leshooting
Lapo
--
gotoAndPlay()
...addicted to flash games
louissi
Posts: 48
Joined: 03 Mar 2006, 20:55

Re: Can't bind socket on public IP

Postby louissi » 28 May 2013, 19:56

Thanks ill try that

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 72 guests