Page 1 of 2

Error "Connection to Servoy Server is invalid"

PostPosted: Fri Jul 08, 2011 9:05 am
by wOOdy
Hi all,
I'm trying to get my first solution running at customers site. Unfortunately when I connect from a client PC to the server, the Java-engine starts up, then the standard Smartclient window shows up and finally a messagebox with the error "Connection to Servoy Server is invalid" pops up. The same link (http://192.168.1.217:8080/servoy-client ... lient.jnlp) works fine when I directly call that on the application server box itself, thus the link as well as the basic setup and application must be ok.

I then switched Tracing on at the appserver and get the following errors:
Code: Select all
2011-07-08 08:23 SocketAccepter[0] INFO com.servoy.j2db.util.Debug Compressing socket closed
2011-07-08 08:23 SocketAccepter[0] ERROR com.servoy.j2db.util.Debug SocketAcceptor failure for socket: 2ff7ac92[SSL_NULL_WITH_NULL_NULL: Socket[addr=/192.168.1.97,port=55089,localport=1099]]
I/O exception, see log for full details: Unrecognized SSL message, plaintext connection?
2011-07-08 08:23 http-8080-1 INFO com.servoy.j2db.util.Debug Loading messages from server: null table: null
2011-07-08 08:23 http-8080-1 INFO com.servoy.j2db.util.Debug Loading messages on server for a client, modified change: -1, language: de_DE, solution: null


For further testing I have disabled all local firewalls on the server als well as on the client. Tested with different clients, which are standard "Windows 7 Pro" or WinXP boxes, the server is a Windows 2008 R2. Servoy is on 5.2.9, i.e. everything is on current patchlevel. Network is a standard Windows Domain network environment, all PCs are in the same IP-segment.

What is the problem here?

Re: Error "Connection to Servoy Server is invalid"

PostPosted: Fri Jul 08, 2011 9:49 am
by ROCLASI
Hi wOOdy,

The most common issue is that people don't have 'Direct Connection' selected in the network settings in the Java Control panel.
Can you check that ?

Re: Error "Connection to Servoy Server is invalid"

PostPosted: Fri Jul 08, 2011 10:13 am
by wOOdy
Hi Robert,
Yepp. It works with "Direct Connection". Is that the only solution? Because that would mean, that other Java-based apps with different sources may not work then, since they wouldn't find their way to the standard internet proxy ?

Re: Error "Connection to Servoy Server is invalid"

PostPosted: Fri Jul 08, 2011 10:24 am
by ROCLASI
Hi wOOdy,

As far as I know this is it but I am no Windows guru.
But why would you think other apps might not work ? A proxy only adds an extra layer of complexity and thus is more likely to cause issues (like with Servoy) than a direct connection.

Re: Error "Connection to Servoy Server is invalid"

PostPosted: Fri Jul 08, 2011 11:09 am
by Harjo
wOOdy, what is your connectionmode on the servoy-server?

try using, http & socket or complete http tunneling,
that works oke, with proxy servers! and you dont have set java to direct connection.

Re: Error "Connection to Servoy Server is invalid"

PostPosted: Fri Jul 08, 2011 12:31 pm
by wOOdy
Hi Robert,

In real-world installations you always have a firewall/proxy combination to protect the internal network from outsiders as well as block internal highjackers to send stuff to the outside world. Thus a proxy should be really a common scenario. I have already added exeptions to the proxy rules for that Servoy-Appserver, but somehow they are not respected by the Servoy client.

Ok, so if I have to set that DirectConnection on each and every client: Is there a way to automate that setting or to globally set it for all clients? Changing 50 or more PCs manually doesn't make me too happy, and isn't exactly what I would call a "maintainence-free One-Click installation". Haven't found a working solution to use the GroupPolicies for centrally managing the Java Runtime settings. Anyone with success here?

Re: Error "Connection to Servoy Server is invalid"

PostPosted: Fri Jul 08, 2011 12:48 pm
by ROCLASI
Hi wOOdy,

wOOdy wrote:In real-world installations you always have a firewall/proxy combination to protect the internal network from outsiders as well as block internal highjackers to send stuff to the outside world. Thus a proxy should be really a common scenario.


I didn't dispute that fact. All I was asking why you would think other java apps would not work with Direct Connection when Servoy does in your environment.

wOOdy wrote:I have already added exeptions to the proxy rules for that Servoy-Appserver, but somehow they are not respected by the Servoy client.

Ok, so if I have to set that DirectConnection on each and every client: Is there a way to automate that setting or to globally set it for all clients? Changing 50 or more PCs manually doesn't make me too happy, and isn't exactly what I would call a "maintainence-free One-Click installation". Haven't found a working solution to use the GroupPolicies for centrally managing the Java Runtime settings. Anyone with success here?

I think this (the proxy question) might be a question for Sebastiaan (sebster).

Re: Error "Connection to Servoy Server is invalid"

PostPosted: Fri Jul 08, 2011 12:59 pm
by wOOdy
Harjo wrote:wOOdy, what is your connectionmode on the servoy-server?
try using, http & socket or complete http tunneling,


Are you talking about the setting at /servoy-admin/network-settings/ SocketFactory.tunnelConnectionMode? That one was originally at "http", I then tried the other two settings. Both times also restarted the server, but still had no luck. Is there anything else to adhere to?

Re: Error "Connection to Servoy Server is invalid"

PostPosted: Fri Jul 08, 2011 1:11 pm
by wOOdy
ROCLASI wrote: All I was asking why you would think other java apps would not work with Direct Connection when Servoy does in your environment.

Sorry, I missed that part in my first answer.
In our scenario the ServoyAppServer is an Intranet application, and therefor can get accessed by "direct connection". But if another Java-app would be an Internet / External application, then that outgoing traffic would get blocked by the firewall, if in "direct connection" mode. Only if you use the redirection ports trough the firewall, the communication to an outside app would be working. At least, that's my understanding of firewalls/proxies so far. :) Thus you could either have DirectConnection enabled and Servoy is happy, but all external JavaApps are not working; or have the external Stuff working, but not Servoy. Not the best solution... But I could be wrong of course. Dabbling with all that network stuff is not my primary expertise :)

wOOdy

Re: Error "Connection to Servoy Server is invalid"

PostPosted: Fri Jul 08, 2011 1:16 pm
by wOOdy
Since Robert says "the most common issue", this implies that this is a somewhat common problem? Therefor I tried to find some pointers by googling the web as well as searching the Servoy-Wiki.
If I do this query on the wiki
http://wiki.servoy.com/dosearchsite.action?key=DOCS&searchQuery.queryString=direct+connection&searchQuery.spaceKey=DOCS
the third exerpt seems to be the ticket, since it talks about "Enable direct connections..."
But when I click on the provided link, this text-excerpt is not shown?! Where did the Wiki-search found that text?
<groan>

Re: Error "Connection to Servoy Server is invalid"

PostPosted: Tue Jul 12, 2011 5:15 pm
by jcompagner
if you need to go over proxies, and the clients all have proxies configured you have to use the tunnel (in http&socket would then be the best thing)

in 5.x you have first to set this property: SocketFactory.rmiServerFactory (set it to 'com.servoy.j2db.server.rmi.tunnel.ServerTunnelRMISocketFactoryFactory') then the property below (SocketFactory.tunnelConnectionMode) can be set to http&socket

then clients will be able to connect without the change to direct connection.
But they will then use the proxy if that is the thing that is configured,

Re: Error "Connection to Servoy Server is invalid"

PostPosted: Tue Jul 12, 2011 7:02 pm
by wOOdy
Hi Johan,

Yes, that did the trick! Thank you very much... I was aready experimenting with a company-wide centralized Java config file, which could get pushed to the clients via group-policies. But this way it's much easier.

Re: Error "Connection to Servoy Server is invalid"

PostPosted: Tue Jul 12, 2011 7:48 pm
by Robert Huber
Hi

I just today happened to have the exact same error on 2 different Windows Server 2008R2 starting a Smart Client (not from the Developer). Same behaviour on a Windows 7 machine, also a connection error. Quite strange. If I use a MacBook as client, it works. Somewhere must be a small difference here.

Regards,

PS: I also can't get the Application Server updated, may be it has something to do with that behaviour (see thread: viewtopic.php?f=11&t=16453&p=88845#p88845).

Re: Error "Connection to Servoy Server is invalid"

PostPosted: Tue Sep 25, 2012 10:41 pm
by jcarlos
Robert Huber wrote:I just today happened to have the exact same error on 2 different Windows Server 2008R2 starting a Smart Client (not from the Developer). Same behaviour on a Windows 7 machine, also a connection error. Quite strange. If I use a MacBook as client, it works. Somewhere must be a small difference here.


Hi Robert,

How was the issue resolved for you?

Thanks! Carlos

Re: Error "Connection to Servoy Server is invalid"

PostPosted: Tue Sep 25, 2012 11:51 pm
by jcarlos
jcompagner wrote:if you need to go over proxies, and the clients all have proxies configured you have to use the tunnel (in http&socket would then be the best thing)

in 5.x you have first to set this property: SocketFactory.rmiServerFactory (set it to 'com.servoy.j2db.server.rmi.tunnel.ServerTunnelRMISocketFactoryFactory') then the property below (SocketFactory.tunnelConnectionMode) can be set to http&socket

then clients will be able to connect without the change to direct connection.
But they will then use the proxy if that is the thing that is configured,


Hi Johan,

Only one of my clients running windows 7 64 bit, and the latest recommended version of Java (32-bit Java 7), can’t connect to the server. This client gets the exact same message: Error "Connection to Servoy Server is invalid"

We are using Servoy 6.1.0.

I want to follow the recipe that you pointed out here, but I can't find the SocketFactory.rmiServerFactory in either the servoy-admin/network-settings page or the servoy.properties file.

Did this change in Sevoy 6.1? Any help will be appreciated!

Thank you, Carlos