no Connection/Cross Domain policy files?

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

sonicviz
Posts: 10
Joined: 07 Jul 2010, 03:33
Location: Tokyo
Contact:

no Connection/Cross Domain policy files?

Postby sonicviz » 08 Jul 2010, 07:19

Hi.
I've successfully installed smartfox demo on win 7 x64 and a test remote site. I am using Unity 2.6.1 pro, and am waiting for my paid V3 Beta.

I enabled ports 8080 and 9339 on the remote Debian machines iptables for SFS.

I can access http://127.0.0.1:8080/ and the local admin browser, and the local examples and unity3D examples for 127.0.0.1 seem ok.

Remotely, I can access admin browser fine by ie/firefox.
However, none of the remote examples or unity3D examples will connect to the IP address I use unless I have the local version of SFS up and running.

However, if I kill the local SFS demo, the connection to the remote site just comes back No Connection.

Is this something to do with the cross domain policy or security?
Why do I need a local SFS server to be running so as the remote SFS server will work correctly?
Even stranger: If I use the remote IP in 02_SimpleLobby it appears to connect to remote site (confirmed w/ remote admin browser and user connect count) but if I use the remote IP in 03_SmartFoxTris it always connects to the local SFS??? Confused!!!

Is there a simple clear guide as to how to get unity to connect to a remote SFS?

ty!
sonicviz
Posts: 10
Joined: 07 Jul 2010, 03:33
Location: Tokyo
Contact:

Postby sonicviz » 09 Jul 2010, 03:38

This is even more confusing.

Just to confirm what is happening.
I edited the remote config.xml to:
<AutoSendPolicyFile>true</AutoSendPolicyFile>
<PolicyAllowedDomains>
<AllowedDomain>*</AllowedDomain>
</PolicyAllowedDomains>

Result:
. None of the remote flash examples will connect
. Unity3D demos 1 and 3 fail to connect

Unity3D demo2 and UNity3d SFS Island demo connect to remote sfs server and run fine. I confirm this via running multuple sfsisland standalone clients and they show up in the remote admin browser user count. Chat and avatar synch is aok, but noticed some inconsistancies with synch of the water bird position. I guess this is not coded as being networked synched?

I'm a little worried at the inconsistant connection behavior in the demos, as there is nothing to indicate what is going wrong here.

I'm also a little concerned with the upcoming Unity3d policy file change and how we implement that?
viewtopic.php?t=7873

fyi I'm just doing some rapid prototyping of the basic architecture for a small scale VW proof of concept so I am really trying to get a feel for ease of use and other issues w/ Unity3D & SFS.

Many thanks!
http://sonicviz.com
http://music.sonicviz.com
Bringing the Boogie to the Bitstream
sonicviz
Posts: 10
Joined: 07 Jul 2010, 03:33
Location: Tokyo
Contact:

Postby sonicviz » 11 Jul 2010, 01:24

*bump*

Would really appreciate some help on this! ty!
http://sonicviz.com

http://music.sonicviz.com

Bringing the Boogie to the Bitstream
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 17 Jul 2010, 12:55

Networking problems are always hard to pinpoint without "being there".

The inconsistency (at least thats my guess) comes from you modifying the scripts. Some of the demos expose the IP and port as public variables into Unity itself - and those values there will override what you hardcode into the scripts.

So it could simply be that you think you connect to the remote instance - and in reality connect to something local instead.

Your real problem though is most likely deeper down - either firewall related or SFS server.

On the SFS server side open your config and make sure that you are binding the server to the public addresses and not only 127.0.0.1. This is done here:

Code: Select all

   <ServerSetup>
      <!--
         Specify an ip address or use an asterisk(*) to bind all available IPs
      -->
      <ServerIP>*</ServerIP>


If this is a firewall issue, then you can try to troubleshoot that with telnet.

On your client, try to do a telnet ip port. Example telnet 192.168.0.1 9339

Exact syntax might be different on your OS. But that should give you either a prompt - or a connection denied. If its the latter, then your firewall blocks your socket traffic on port 9339.

Post more info and I'll try to help as good as I can

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 18 guests