Connecting (read sticky)

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Guest
Posts: 11
Joined: 25 Jul 2007, 06:06

Connecting (read sticky)

Postby Guest » 27 Jul 2007, 08:50

Since I didn't get a response in the sticky thread for whatever reason after a few days, I though I'd make a topic. What I posted in the other thread.

So I did everything in those steps with the lobby example that came with the SmartFoxBits and it works when I run it locally, otherwise the connection fails. And I think that I may have screwed up the cross domain policy file (I was unsure if I need to add the crossdomain.xml in addition to the second basic/pro method described in the documention or where exactly I would add that file), or I might have screwed up something else because I really have no idea what I am doing. :)

Edit: Ok, I looked on gotoandplay and it seems like I am having the same problem as this

mistermind wrote:Ohhhhh i think i know what is wrong. and this is probably the same problem xombie is having.
We are tryin to connect to SFS from a website to a home connection tryin only to specify the actual IP on the XML file and SWF, but that will not work for sure. the XML have to be on the web_root of the computer where the SmartFoxServer is installed, but in order to have a web_root u have to have a web server runnin (Apache, IIS, etc..)
Well, in simple words: if u wanna make a test of ur application, u HAVE to have a web server with SFS installed OR learn to install and configure a web server at ur home (search for PWS on the internet. It is a basic version of IIS for home use. Very simple and easy to use).
Thanks for the attention anyway Lapo. Im lookin foward to the SFS Basic.


http://www.gotoandplay.it/_forums/viewtopic.php?t=742

Anyway, it's been like three years since then and from what I've seen it seems like sfs now comes with a webserver (what with the webserver directory and all). But the problem is I have no idea what to do with this. Is there any documentation on this?

Edit: Ok so I found the documentation, and I enabled the webserver, the little 127.0.0.1:8080 test worked fine. I edited the crossdomain.xml in root to point to where my swf is (I hope I did it right) But I can't figure out for myself what the next step would be, as the connection still is failing.

Edit: Some more reading and I see talking about installing sfs on a webserver. I am confused.

Edit: So I looked at the router control panel thing, and in the firewall section of the security tab, I have Block Anonymous Internet Requests checked. Would that be screwing something up, and if so is there a way around it with disabling it.

Edit: I tried again after temporarily disabling it and still no connection.
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 30 Jul 2007, 06:48

Make sure your Flash player is not silently stopping your connections
Go to this page: http://www.macromedia.com/support/docum ... ger04.html

And add your swf file to the allowed list of files.
Alternatively you can also add the entire root path of your hard drive ("C:\" under windows or "/" under MacOs and Linux). This will allow any file from that drive to access external resources
Lapo
--
gotoAndPlay()
...addicted to flash games
Guest
Posts: 11
Joined: 25 Jul 2007, 06:06

Postby Guest » 30 Jul 2007, 08:37

Thanks for the help.

I tried adding C:\ to the trusted locations and there was no difference

Anyway I did notice this and it doesn't look very good.

Code: Select all

2007-07-30 01:57:21.252::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
*********************************
Starting web server
2007-07-30 01:57:22.623::INFO:  jetty-6.0.1
2007-07-30 01:57:23.334::INFO:  NO JSP Support for /default, did not find org.ap
ache.jasper.servlet.JspServlet
2007-07-30 01:57:32.698::INFO:  NO JSP Support for /examples, did not find org.a
pache.jasper.servlet.JspServlet
2007-07-30 01:57:33.679::INFO:  NO JSP Support for , did not find org.apache.jas
per.servlet.JspServlet
2007-07-30 01:57:34.811::INFO:  Started SelectChannelConnector @ 0.0.0.0:8080
Web server running
*********************************


Is there something wrong here. I don't like the looks of that 0.0.0.0

I have a feeling I might be missing something more obvious. So I have the swf up on the website, and the webserver thing active on the config.xml. I'm just running the server from this computer for now. And the 127.0.0.1:8080 thing works fine, although I don't know how there would be access to this from another computer. Basically I'm not too sure on what I am doing with all this webserver stuff.
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 30 Jul 2007, 09:11

Edit: Ok so I found the documentation, and I enabled the webserver, the little 127.0.0.1:8080 test worked fine. I edited the crossdomain.xml in root to point to where my swf is (I hope I did it right) But I can't figure out for myself what the next step would be, as the connection still is failing.


No, that's wrong, leave the orginal crossdomain.xml as it is already set to the max permissive mode.

Code: Select all

<cross-domain-policy>
     <allow-access-from domain="*"/>
</cross-domain-policy>

Is there something wrong here. I don't like the looks of that 0.0.0.0

That's correct.

Could you summarize what you're trying to do? Which example is not working? Which address do you point it to? Which address is the server using?
Lapo

--

gotoAndPlay()

...addicted to flash games
Guest
Posts: 11
Joined: 25 Jul 2007, 06:06

Postby Guest » 30 Jul 2007, 09:31

I fixed the crossdomain but there was no difference.

Well I'm just trying to see if I can get an example to work for now (the smartfox bits 'lobby') Where I change the ip of the parameter of the component (which I think was shown in that video). I also tried it with a AS2 example that came with sfs, and changed the ip there. So I have the swf pointing to my router's ip (the one on whatsmyip.com etc.) I have port 9339 being forwarded to what I think is this machine (198.162.1.103 which I found here

Code: Select all

--- [ Network Cards ] -----------------------------------------

Card:MS TCP Loopback interface
 -> 127.0.0.1
Card:Instant Wireless-B PCI Adapter - Packet Scheduler Miniport
 -> 192.168.1.103


so I believe that would be it (this is what I have in config.xml)

I just don't really understand the concept of the webserver. So I can access the default example file using 127.0.0.1:8080 but would I be able to access this from another computer? Could I just put the swf here somehow to make it a little simpler?
Guest
Posts: 11
Joined: 25 Jul 2007, 06:06

Postby Guest » 14 Aug 2007, 23:06

I was still wondering about this. How would I go about doing the things mentioned in the above post (which I won't retype now because I don't remember exactly what I asked)

Thanks again, I know there's a lot of questions asked here, but I thought I might ask again before this topic goes off the first page.
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 15 Aug 2007, 09:07

Your router setup seems ok to me.. but ... SmartFoxServer running on that 192.168... address??

Once this is done you should point the example files to your external IP address.

Make sure you clear your browser's cache before testing, sometimes you spend hours watching the wrong version of your work just because of that :)

About the webserver, you can do the same thing on your router... forward port 8080 to the PC that runs it and it will work
Lapo

--

gotoAndPlay()

...addicted to flash games
Guest
Posts: 11
Joined: 25 Jul 2007, 06:06

Postby Guest » 17 Aug 2007, 08:25

Hey, it worked! :D I was able to connect from another PC.

Thank you so much for the help.
Guest
Posts: 11
Joined: 25 Jul 2007, 06:06

Postby Guest » 18 Aug 2007, 00:34

Nooooooooooooooooooooooooo. Now the webserver still works but I can't start the server and can't connect.


It now says this

Code: Select all

2007-08-17 17:58:46.824::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
*********************************
Starting web server
2007-08-17 17:58:48.867::INFO:  jetty-6.0.1
2007-08-17 17:58:49.918::INFO:  NO JSP Support for /default, did not find org.ap
ache.jasper.servlet.JspServlet
2007-08-17 17:59:01.455::INFO:  NO JSP Support for /examples, did not find org.a
pache.jasper.servlet.JspServlet
2007-08-17 17:59:02.586::INFO:  NO JSP Support for , did not find org.apache.jas
per.servlet.JspServlet
2007-08-17 17:59:03.818::WARN:  failed SelectChannelConnector @ 0.0.0.0:8080
2007-08-17 17:59:03.818::WARN:  failed Server@10c81a6
*********************************


instead of what was there in my earlier post. It says something about failing.
Guest
Posts: 11
Joined: 25 Jul 2007, 06:06

Postby Guest » 18 Aug 2007, 05:18

Now I'm really confused. I can't start the server, but the connection is still working. Could someone go to http://68.124.177.192:8080/lobby.swf and tell me what happens?

Edit: I asked a friend to try the link and it worked perfectly and I could talk to him in the lobby example.
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 18 Aug 2007, 07:48

I can't reach the page
Lapo

--

gotoAndPlay()

...addicted to flash games
Guest
Posts: 11
Joined: 25 Jul 2007, 06:06

Postby Guest » 18 Aug 2007, 21:09

The IP adress has probably changed (which is getting annoying), it is now http://69.104.143.11:8080/lobby.swf . But I know it works because I had someone else test it, but the weird thing is that it says my connection is lost when the other person leaves, and the server still won't start. do you have any idea, why the thing says it is failing in my previous post, I haven't changed and configurations.
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 19 Aug 2007, 14:26

still a no go for me... white browser page... loading forever
same thing if I try telnetting ports 8080 or 9339
Lapo

--

gotoAndPlay()

...addicted to flash games
Guest
Posts: 11
Joined: 25 Jul 2007, 06:06

Postby Guest » 20 Aug 2007, 01:04

Edit: So after the last edit here I updated config.xml and everything is working for now! Thanks again and hopefully this will last for a while.

Yes, it has changed again. You're an admin, doesn't it tell you what my ip is?

Just use that as a replacement in case it changes again by the time you read this.

Edit: Ok, now it doesn't appear to be working for me either. :(

Edit: Aha, apparantly my local ip or whatever it is called changed from 192.168.1.100 to .102. I had to forward the routes again and now it works (My isp is starting to annoy me)

But you can trust me that it works, I just don't know why I can't start the sf server, it says it fails like in my above post.

Edit: So the page opens, but now it won't connect when I updated the ip on the swf. And the thing is that it usually just said connecting... forever when I'm using firefox, but now it's actually says Connection failed, which is new.

!!!

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: Google [Bot] and 33 guests