I have a Servoy server which is used by internal clients and external clients at the same time!
You have to do portfowarding thru the firewall.
Otherwise the external clients can’t reach the internal server
and you have to fill in, under Application-Preferences-Services,
firewall hostname or ip: 127.0.0.1
I still can’t figure out how I can let my external client connect to the repository server. They can download the client application, but cannot find the repository database.
I redirected the HTTP port (8080) for the webconnection to my local server IP address (that works) and I redirected the RMI port (1099) to the same address.
In the dataservice, firewall hostname or IP (for external usage) I set the router IP adress.
We have a situation where port 1099 has been added via our customer’s internet provider’s administrative web page and the static internet ip address has been forwarded to the server’s local ip address.
With the TwoWaySocket checked off and servoy.rmiStartPort set to 1099 on the Servoy-admin web page, we have tried setting the java.rmi.server.hostname to:
(1) blank
(2) static internet ip address
(3) 127.0.0.1
I have been able to connect as a remote client with all three of the above settings. But some of my customer’s remote clients are able to connect and some can not. It appears that they are able to connect more consistantly when they use the Servoy Client install web page than when they use the Servoy Client desktop icon.
So we are having trouble trying to narrow things down and understand what the correct settings should be, particularly with regard to the difference between items 2 and 3 above. Comments and suggestions are welcome.
And some customers are accessing the internet through a NAT router?
(like over here more and more people are doing)
Then you have to switch on two way socket.
2 way socket can only be disabled if the application is only used inside an company where you know for sure that nobody connect through a nat router. If you are deploying a solution over the internet then 2 way socket setting must be set to true else all NAT users are out of luck.
I did not communicate the situation properly. When I said we have the “TwoWaySocket checked off” I meant it contains a check, meaning it is on.
Yes, I believe you are correct that “some customers are accessing the internet through a NAT router”.
Does that mean that an adjustment may have to be made to the client outgoing router to open port 1099 similar to what is required for the incoming NAT router? I am trying to better visualize things so I will know what to do in various situations.
previously:
we have tried setting the java.rmi.server.hostname to:
(1) blank
(2) static internet ip address
(3) 127.0.0.1
I have been able to connect as a remote client with all three of the above settings. But some of my customer’s remote clients are able to connect and some can not.
I have received the following clarification regarding the above three options from Servoy support:
“Option 3 is only necessary if the server has multiple IP addresses. With option one Servoy tries to determine it for himself which is successful in many cases. If you put in the external IP it might stop working on the internal network (depends on how they route that traffic).”
The best thing is that you don’t use 2waysocket and that the rmihost is the hostname or ip of the server.
But this is only possible when all the clients are on the same network as the server.. (so over the internet this is never an option anymore)
If you have to use the server over the internet then 2waysocket has to be enabled. If you then also use the server local and over the internet then you have to set the rmihost name to 127.0.0.1
so most of the time when you use 2waysocket then also set the rmihost name to 127.0.0.1. That should work the best in all the cases when the clients are not on the same network.
if you use 127.0.0.1 then you are using a tunnel for all the cliet<->server traffic.
without 2way socket and 127.0.0.1
If the clients wants to connect it connects directly to the server itself everytime a request is made.
if a server wants to connect it also connects directly to the client.
That last one isn’t possible if clients are behind nat. So if you set 2waysocket on. The client creates a tunnel. So that when the server wants to connect it does try to connect to the client it self but uses the tunnel.
If you don’t have 127.0.0.1 set then the clients still connects directly to the server for every request. If you also set that one to 127.0.0.1 then every call the client does is to him self and that is routed through the tunnel also (so no direct socket connection is made either)
jcompagner:
If you also set that one to 127.0.0.1 then every call the client does is to him self and that is routed through the tunnel also (so no direct socket connection is made either)
I do not understand when you say that every call the client does is to himself.
I have a customer with two locations. The local clients at the host location have no problem, however a client from the remote location keeps having trouble connecting to the repository. The same remote client is able to connect to the sample solution at http://demo.servoy.com:8080 with no problem.
The frustrating thing is that I can consistantly access the solution as a client from my own remote location with no problem (my pc has a direct internet connection and my customer’s remote pc is behind a nat).
Their Servoy-admin settings are hostname 127.0.0.1, port 1099, with TwoWaySocket checked off. I had the remote client check Edit/Preferences/Services and confirm that TwoWaySocket is checked off. Just to make sure that the problem is specific to the location and not the computer I had the remote user try to access from another computer in the same remote office. That computer was also unable to connect to the repository.
Any ideas on what might be causing their remote client not to be able connect to the repository?
if that remote client is behind a NAT then the 2 way socket MUST be enabled at the server and the remote client!!
What you can do is that the remote client throws away the .servoy directory that is in the user/home dir (on windows c:\documents and settings\loginname)
Previously the demo server was configured as rmi hostname:
You should always enabled 2 way socket at the server side if you are not sure if clients are all local or not.
Clients that are local can be altered on the client preferences to not use 2 way socket. So on the client the 2 way socket can be disabled even if the server has it enabled. This should work fine. The other way around will never work. (If client is enabled then server must also be enabled)
for example to have the best performance and scaling if you deploy a solution that is mostly used locally and some remote. Then the server must 2 way enabled and local clients can be disabled.
If clients will be disabled then you can never use 127.0.0.1 as a rmi host name. So if you have clients that are disabled en enabled then the rmi host name should be pointing to the same computer. If the server that is holding the solution is directly connected to the internet then rmi host name doesn’t have to be filled in. If not then it has to be filled in. And that name should internally by pointing to the servoy server and externally be pointing to the firewall (the computer that routes everything to the servoy server)
I think i will change the defaults of servoy to 127.0.0.1, 2 way and ssl enabled. This combination should always work.
Hi Johan
I have a win2003 server with Servoy 3.5.
I have set the inbound and outbound filter for port 1099 on the firewall, and created a virtual host in a non-servoy instance of Apache, to point an external ip/domain(http://www.freightsoft.co.za) to the default index page in the webapp/root directory of Servoy.
Please look at http://www.freightsoft.co.za
jcompagner:
if you use 127.0.0.1 then you are using a tunnel for all the cliet<->server traffic.
without 2way socket and 127.0.0.1
If the clients wants to connect it connects directly to the server itself everytime a request is made.
if a server wants to connect it also connects directly to the client.
That last one isn’t possible if clients are behind nat. So if you set 2waysocket on. The client creates a tunnel. So that when the server wants to connect it does try to connect to the client it self but uses the tunnel.
If you don’t have 127.0.0.1 set then the clients still connects directly to the server for every request. If you also set that one to 127.0.0.1 then every call the client does is to him self and that is routed through the tunnel also (so no direct socket connection is made either)