Problem with connecting via internet / Local connection works

Hi all, :slight_smile:

I’ve got a little problem by connecting to a server via internet. I use this code:

[java]Client networkClient =, SERVER_CONNECTION_PORT);


(The ip is correct, the port (3900 33900) is opened and even the firewall is deactivated for testing)

If I use my IP as host, the connection produces a timeout error and this would result in an endless loop:

[java]while (!networkClient.isConnected()) {

//(I’m using a selfmade timeout handling here, but the condition of the loop is always “true”)


I’m sure, it’s not a problem of my code - You can see that from the fact, that local games work perfectly. :slight_smile:

(Both localhost and my local ip adress as host)

Is there something in Spidermonkey, that I have to consider by creating a server, that should be available on the internet?

Maybe it’s just a problem of wrong settings on my router/firewall/whatever… But I really tried everything I could think of. :smiley:

I hope, someone of you has an idea of what could be the problem,

destro :slight_smile:

You have to make your hardware router forward the correct port to your local computer.

I think, I’ve already done that. This is a screenshot of the settings I’ve made on my router:

(I hope, you understand German: :smiley:)

The local ip adress, that I’ve entered there, is at least correct.

EDIT: I just see, that in the combo box called “Port forwarding active for” (The first one), there’s the item “HTTP-Server”. Do I have to select it or is “Other applications” (The currently selected one) the right choice?

I understand german very well yeah ^^

From what you told me before the port should be “3900” though, shouldn’t it? Also you probably have to restart the router for the changes to take effect, but I guess it does that when you press “Übernehmen”.

You have to forward TCP and UDP.


Sorry, I meant port 33900 - Updated the first post. :wink:

“Also you probably have to restart the router for the changes to take effect, but I guess it does that when you press “Übernehmen”.”

I’m not sure, but I restarted it manually today. So this is not the problem. :frowning:


Hm… I can only select one of the two types - Maybe I can create two of these settings, one with TCP and one with UDP.

I’ll edit it here, if I had success. :slight_smile:

So far, thank you for your answers. :slight_smile:


EDIT: Thank you very much - It works now, I just had to forward TCP and UDP, as pspeed said: :wink:

I’ve been searching for a quick overview about spidermonkey in jME3 and saw, that there’s no “general” documentation or whatever. There are just parts of a changelog, several topics in the forum and so on…

Because I was working with spidermonkey intensivly the last days, I could create a little overview about the different classes, methods and a bit about the infrastructure (And those little problems like mine, which can drive you mad :smiley:).

So if you guys do not mind, it would be an honour for me to write this little paper for beginners.

(You don’t have to insert it to the wiki or so :smiley: It’s just that new developers have some kind of reference :slight_smile:)

There is this:

Don’t know if you were looking for more than that.

Yes, I was looking for some kind of example code and a more detailed documentation about the infrastructure, especially the serializers.

Furthermore, some kind of FAQ would be nice - Otherwise, there’ll be a lot more threads like this one with questions about obviously things. :smiley: