Cant connect my server with local 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

Ahriman
Posts: 7
Joined: 28 Mar 2012, 15:51

Cant connect my server with local ip

Post by Ahriman »

Hey there, i am new to smart fox server. I installed the server to my pc. When i type localhost:8080 to my browser, it opens my admin panel, everything works fine here. No problem. But when i try to connect my self with "connector.swf". I get a error says Connection Failure: Error #2048. I tried everyhing to solve this but i just couldnt :S I read all the topics in forum and it didnt help me. So i opened new one. Here is my problem how can i solve it?
9933 port is oppened on my router.
not sure about 8080 but if i can connect localhost:8080 it should be opened.
im trying to connect with 127.0.0.1 at connector.
Also i have 4 avaible socket adresses at admin panel. (both TCP/UDP 127.0.0.1 and both TCP/UDP 192.168.1.x) both set to 9933 port.
Also i opened both 9933 UDP/TCP port at my router.
And my firewall is turned off. No other blockers installed.
Oh and i have windows 8 if it changes anything.

Please help me how can i solve this ?
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Cant connect my server with local ip

Post by rjgtav »

Hmm... Everything seems correct... As the connector should at least connect to 127.0.0.1... In the AdminTool, can you connect to 127.0.0.1? If not, then I suspect it has something to do with Windows 8...
Did the server successfully bound the 127.0.0.1 ip? Please check the console where it says "Listening to Sockets:", right at the end of the Boot Sequence.
Please also specify if you're using the Developer Preview or the Consumer Preview.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Ahriman
Posts: 7
Joined: 28 Mar 2012, 15:51

Re: Cant connect my server with local ip

Post by Ahriman »

Ohh well, i dont see anything like "Listening to Sockets".. but i see some errors. Here is the boot log of error


28 Mar 2012 | 19:24:09,673 | INFO | main | bootLogger | | Session manager ready: com.smartfoxserver.bitswarm.sessions.DefaultSessionManager@5c1ccea9
28 Mar 2012 | 19:24:09,677 | INFO | main | bootLogger | | ReaderSelector opened
28 Mar 2012 | 19:24:09,684 | INFO | main | bootLogger | | AcceptSelector opened
28 Mar 2012 | 19:24:09,686 | WARN | main | bootLogger | | Was not able to bind socket: { 127.0.0.1:9933, (Tcp) }
28 Mar 2012 | 19:24:09,688 | WARN | main | bootLogger | | Was not able to bind socket: { 127.0.0.1:9933, (Udp) }
28 Mar 2012 | 19:24:09,688 | WARN | main | bootLogger | | Was not able to bind socket: { 192.168.1.42:9933, (Tcp) }
28 Mar 2012 | 19:24:09,688 | WARN | main | bootLogger | | Was not able to bind socket: { 192.168.1.42:9933, (Udp) }
28 Mar 2012 | 19:24:09,689 | INFO | main | bootLogger | | Controller started: com.smartfoxserver.v2.controllers.SystemController -- Queue: 0/20000
28 Mar 2012 | 19:24:09,690 | INFO | main | bootLogger | | Controller started: com.smartfoxserver.v2.controllers.ExtensionController -- Queue: 0/20000
28 Mar 2012 | 19:24:09,690 | INFO | main | bootLogger | | IOHandler: com.smartfoxserver.v2.protocol.SFSIoHandler@7f1e1a8e
28 Mar 2012 | 19:24:09,690 | INFO | main | bootLogger | | SocketReader started
28 Mar 2012 | 19:24:09,690 | INFO | main | bootLogger | | SocketAcceptor initialized
28 Mar 2012 | 19:24:09,690 | ERROR | main | bootLogger | | No bound sockets! Check the boot logs for possible problems!
28 Mar 2012 | 19:24:09,691 | INFO | main | bootLogger | | Socket Writer started (pool size:1)
28 Mar 2012 | 19:24:09,691 | INFO | Scheduler1-thread-1 | bootLogger | | Scheduler started: scheduler
28 Mar 2012 | 19:24:09,691 | INFO | main | bootLogger | | Security Manager started
28 Mar 2012 | 19:24:09,693 | INFO | main | bootLogger | | [[[ ===--- Boot sequence complete ---=== ]]]
itsmylifesoham
Posts: 186
Joined: 16 Oct 2011, 14:33

Re: Cant connect my server with local ip

Post by itsmylifesoham »

hi,

are you running sfs2x by clicking on the sfsstandalone.exe?

if so, please make sure by going into you services panel in controlpanel to check if sfs2x-service is not already running.

i got this error "was not able to bind to sockets" when i used to run standalone.exe if sfs2x-service was already running.

plus you connector.swf must be accessing some sfs-config.xml file. please change the ip in it to 127.0.0.1
itsmylifesoham
Posts: 186
Joined: 16 Oct 2011, 14:33

Re: Cant connect my server with local ip

Post by itsmylifesoham »

hi there once again,

are you getting a error similar to this one?

http://forums.smartfoxserver.com/viewto ... 18&t=13726

he has the error 2048 if you see the trace he is getting. its basically the security sandbox violation...are you getting this?
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Cant connect my server with local ip

Post by rjgtav »

Hmm... Yeah, please make sure that there is not any other smarftoxserver service running on... You can check that by shutting down the server, clearing the browser's cache and trying to open the localhost:8080 page. If that page still shows correctly, that means that there is still an instance running... Otherwise, maybe Windows 8 has some particularity which prevents SFS2x from running correctly...
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Ahriman
Posts: 7
Joined: 28 Mar 2012, 15:51

Re: Cant connect my server with local ip

Post by Ahriman »

Alright i shutted down the service and started only standalone one. This is the new boot log.. Yet i still cant connect with the connector :S I says its bounded.

28 Mar 2012 | 20:27:31,356 | INFO | main | bootLogger | | Session manager ready: com.smartfoxserver.bitswarm.sessions.DefaultSessionManager@564389b7
28 Mar 2012 | 20:27:31,361 | INFO | main | bootLogger | | ReaderSelector opened
28 Mar 2012 | 20:27:31,367 | INFO | main | bootLogger | | AcceptSelector opened
28 Mar 2012 | 20:27:31,370 | INFO | main | bootLogger | | Added bound tcp socket --> 127.0.0.1:9933
28 Mar 2012 | 20:27:31,371 | INFO | main | bootLogger | | Added bound udp socket --> 127.0.0.1:9933
28 Mar 2012 | 20:27:31,372 | INFO | main | bootLogger | | Added bound tcp socket --> 192.168.1.42:9933
28 Mar 2012 | 20:27:31,372 | INFO | main | bootLogger | | Added bound udp socket --> 192.168.1.42:9933
28 Mar 2012 | 20:27:31,373 | INFO | main | bootLogger | | Controller started: com.smartfoxserver.v2.controllers.SystemController -- Queue: 0/20000
28 Mar 2012 | 20:27:31,373 | INFO | main | bootLogger | | Controller started: com.smartfoxserver.v2.controllers.ExtensionController -- Queue: 0/20000
28 Mar 2012 | 20:27:31,373 | INFO | main | bootLogger | | IOHandler: com.smartfoxserver.v2.protocol.SFSIoHandler@552cf9bd
28 Mar 2012 | 20:27:31,374 | INFO | main | bootLogger | | SocketReader started
28 Mar 2012 | 20:27:31,374 | INFO | main | bootLogger | | SocketAcceptor initialized
28 Mar 2012 | 20:27:31,374 | INFO | main | bootLogger | | Socket Writer started (pool size:1)
28 Mar 2012 | 20:27:31,374 | INFO | Scheduler1-thread-1 | bootLogger | | Scheduler started: scheduler
28 Mar 2012 | 20:27:31,375 | INFO | main | bootLogger | | Security Manager started
28 Mar 2012 | 20:27:31,376 | INFO | main | bootLogger | | [[[ ===--- Boot sequence complete ---=== ]]]
Ahriman
Posts: 7
Joined: 28 Mar 2012, 15:51

Re: Cant connect my server with local ip

Post by Ahriman »

And also i double checked there is only standalone working on background. No other services or programs are working.
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Cant connect my server with local ip

Post by rjgtav »

Can you at least connect to the server via the AdminTool (by also using the 127.0.0.1 ip)?
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
itsmylifesoham
Posts: 186
Joined: 16 Oct 2011, 14:33

Re: Cant connect my server with local ip

Post by itsmylifesoham »

could you please post the full actual error trace that you are getting? is it a flash player error?? or does it appear in the textarea in the connector.swf( this is one of the examples provided right?)
itsmylifesoham
Posts: 186
Joined: 16 Oct 2011, 14:33

Re: Cant connect my server with local ip

Post by itsmylifesoham »

also could you post the server.xml that you have inside your local sfs2x installation directory.
Ahriman
Posts: 7
Joined: 28 Mar 2012, 15:51

Re: Cant connect my server with local ip

Post by Ahriman »

I can connect admintool using http://127.0.0.1:8080/ but i cant connect with "connector" using ip 127.0.0.1:9933. I get that error in the textarea in the conncector. says
--> Config load success!
--> Server settings: 127.0.0.1:9933
--> Connection Failure: Error #2048
and yes its the provided one with the "examples"
http://www.canyouseeme.org/ corrects that i have opened my port succesfuly to 9933

Here is the server.xml:

Code: Select all

<serverSettings>
  <socketAddresses>
    <socket address="127.0.0.1" port="9933" type="TCP"/>
    <socket address="127.0.0.1" port="9933" type="UDP"/>
    <socket address="192.168.1.42" port="9933" type="TCP"/>
    <socket address="192.168.1.42" port="9933" type="UDP"/>
  </socketAddresses>
  <ipFilter>
    <addressBlackList>
      <string>1.2.3.4</string>
    </addressBlackList>
    <addressWhiteList>
      <string>127.0.0.1</string>
    </addressWhiteList>
    <maxConnectionsPerAddress>9999999</maxConnectionsPerAddress>
  </ipFilter>
  <flashCrossdomainPolicy>
    <useMasterSocketPolicy>true</useMasterSocketPolicy>
    <policyXmlFile>crossdomain.xml</policyXmlFile>
  </flashCrossdomainPolicy>
  <systemControllerThreadPoolSize>1</systemControllerThreadPoolSize>
  <extensionControllerThreadPoolSize>3</extensionControllerThreadPoolSize>
  <systemControllerRequestQueueSize>20000</systemControllerRequestQueueSize>
  <extensionControllerRequestQueueSize>20000</extensionControllerRequestQueueSize>
  <schedulerThreadPoolSize>3</schedulerThreadPoolSize>
  <protocolCompressionThreshold>1024</protocolCompressionThreshold>
  <protocolMode>BINARY</protocolMode>
  <useBinaryProtocol>true</useBinaryProtocol>
  <remoteAdmin>
    <administrators>
      <adminUser>
        <login>sfsadmin</login>
        <password>newpassword</password>
      </adminUser>
    </administrators>
    <allowedRemoteAddresses/>
    <adminTcpPort>9933</adminTcpPort>
  </remoteAdmin>
  <bannedUserManager>
    <isAutoRemove>true</isAutoRemove>
    <isPersistent>true</isPersistent>
    <customPersistenceClass></customPersistenceClass>
  </bannedUserManager>
  <mailer>
    <isActive>false</isActive>
    <mailHost>test.mail.com</mailHost>
    <mailUser>foo</mailUser>
    <mailPass>pippo</mailPass>
    <smtpPort>25</smtpPort>
    <workerThreads>1</workerThreads>
  </mailer>
  <webServer>
    <isActive>true</isActive>
    <cfgFile>config/jetty/jetty.xml</cfgFile>
    <blueBoxPollingTimeout>26</blueBoxPollingTimeout>
    <blueBoxMsgQueueSize>40</blueBoxMsgQueueSize>
  </webServer>
  <startExtensionFileMonitor>true</startExtensionFileMonitor>
  <useDebugMode>true</useDebugMode>
  <extensionRemoteDebug>true</extensionRemoteDebug>
  <useFriendlyExceptions>true</useFriendlyExceptions>
  <sessionMaxIdleTime>300</sessionMaxIdleTime>
  <userMaxIdleTime>300</userMaxIdleTime>
  <licenseCode></licenseCode>
  <licenseEmails></licenseEmails>
</serverSettings>
itsmylifesoham
Posts: 186
Joined: 16 Oct 2011, 14:33

Re: Cant connect my server with local ip

Post by itsmylifesoham »

hi could you remove the last two entries under the socket address tag in your server.xml. leave the two 127.0.0.1 entries in place.

also empty your addressblacklist tag.

restart the server and try again.
Ahriman
Posts: 7
Joined: 28 Mar 2012, 15:51

Re: Cant connect my server with local ip

Post by Ahriman »

Same error nothing changed. By the way i also tried that in my laptop which has windows 7 installed. And it didnt worked too. So there shouldnt me problem about my windows 8.
itsmylifesoham
Posts: 186
Joined: 16 Oct 2011, 14:33

Re: Cant connect my server with local ip

Post by itsmylifesoham »

hi,

i hope you have unpacked the examples in the right folder as mentioned.

instead of opening the swf by double clicking on it just enter this url in your browser : i just tried and it works for me. no such errors.

http://localhost:8080/examples/flash/connector/
Post Reply