HTTP Tunneling in Servoy 4.x.x

Hi everybody,

I looking to use the HTTP Tunneling with Servoy 4.1.3.
I’ve found the pdf tutorial/presentation of Servoy which is based on Servoy 3.5. And apparently the web.xml used in the tutorial is different than the one of Servoy 4.x.x. The servlets look already enabled.
However is the following line still needed in servoy.properties and valid?

SocketFactory.rmiServerFactory=com.servoy.j2db.server.rmi.tunnel.ServerTunnelRMISocketFactoryFactory

More generally could you tell me if this tutorial is still valid and/or if I have to do more manipulations/changes with Servoy 4.x.x

Cheers.

EDIT: just realised that this thread should maybe be in the “Installation” section :roll:

Hi Foobrother!

The line in servoy.properties is correct, but don’t forget to edit your /application_server/server/conf/server.xml file to enable the Http11NioProtocol, for example here on port 80:

<Connector port="80" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="500" connectionTimeout="60000" redirectPort="8443" useBodyEncodingForURI="true" />

Hope this helps,

Looks good!

Thank you :D

Since Servoy 4.1 you do NOt have to alter any config files yourself. The correct procedure is:

  • Go to the Admin pages of the Servoy Application Server
  • Open the “Network Settings” section
  • Set the “SocketFactory.rmiServerFactory” to “com.servoy.j2db.server.rmi.tunnel.ServerTunnelRMISocketFactoryFactory” (copy & paste from the dialog behind the Info button)
  • Save the changes
  • Restart the Servoy Application Server

Paul

pbakker:
Since Servoy 4.1 you do NOt have to alter any config files yourself. The correct procedure is:

  • Go to the Admin pages of the Servoy Application Server
  • Open the “Network Settings” section
  • Set the “SocketFactory.rmiServerFactory” to “com.servoy.j2db.server.rmi.tunnel.ServerTunnelRMISocketFactoryFactory” (copy & paste from the dialog behind the Info button)
  • Save the changes
  • Restart the Servoy Application Server

Paul

Paul,

Do you mean that this automatically changes the tomcat connector protocol?
You don’t have to change cont/server.xml from HTTP/1.1 to org.apache.coyote.http11.Http11NioProtocol at all now?
I didn’t realize that.

[EDIT]
I just tried it, set the conf/server.xml connector protocol back to HTTP/1.1 and it works!

So this would enable smart clients to connect via port 80?
I tried the settings as suggested by Paul as well, and restarted the server.

If I try to connect like ‘http:///servoy-client/etc./etc.’ (we use deeplinking to startup our solution), it’ll tell me that the page couldn’t be opened however it seems to exist…
When I try the connection via port 8080 it works fine…

So what’s going wrong here? I attached my networksettings

EDIT: We just connected via 8080 now (with the http tunnel enabled) > One of the clients (OS: Vista) complained about the performance (responding very slow), xp and mac didn’t seem to care about the change… Disabling the tunnel solved the performance issue.

[attachment=0]network.png[/attachment]

I have another problem.
It seems to work for me but I get a “You are disconnected from the server – trying to reconnect” message box every few minutes.

What should I look at?

mboegem:
So this would enable smart clients to connect via port 80?
I tried the settings as suggested by Paul as well, and restarted the server.

What Paul said, and what I can confirm works is that you don’t need anymore to change the protocol in the server.xml file node from (default) “HTTP/1.1” to “org.apache.coyote.http11.Http11NioProtocol” to activate the tunneling. But tunneling doesn’t mean port 80 necessary, you can have tunneling on any port, and by default this is 8080.

So, to change the port (which by default is 8080) you will still have to set the port in the server.xml file, from
<Connector port=“8080”
to
<Connector port=“80”

This is true with or without tunnelling.

Foobrother:
I have another problem.
It seems to work for me but I get a “You are disconnected from the server – trying to reconnect” message box every few minutes.

What should I look at?

do you only have that when using the tunnel?

it sounds like something is killing your connection every few minutes, like a router or something.

ptalbot:
So, to change the port (which by default is 8080) you will still have to set the port in the server.xml file, from
<Connector port=“8080”
to
<Connector port=“80”

This is true with or without tunnelling.

Thnkx Patrick! That did the trick.
So just to confirm the whole tunneling thing is just to get rid of port 1099??

Anyone any idea what the performance collapse on Vista can cause when using http tunneling???

mboegem:
So just to confirm the whole tunneling thing is just to get rid of port 1099??

yes and that it is http talk so firewalls just see it as a browser request.

mboegem:
Anyone any idea what the performance collapse on Vista can cause when using http tunneling???

do you use a virusscanner?
disable that for a moment.

jcompagner:
do you use a virusscanner?
disable that for a moment.

thnkx Johan, will try that.
I will post the results here!

jcompagner:
do you only have that when using the tunnel?

it sounds like something is killing your connection every few minutes, like a router or something.

This configuration is using a proxy to access internet. That’s why the HTTP Tunnel is needed as the port 1099 is not allowed. But there is no disconnection for internet apparently.
Timeouts are the same with or without the HTTP Tunnel?

what kind of proxy?
it could be that the proxy is killing your connection.

mboegem:
I will post the results here!

Ok, some results about the performance issue:

This seems to be a virusscanner issue indeed.
This machine is running AVG (latest version). We disabled every running AVG proces which resulted in a great Servoy performance again.
Strange enough, 2 other machines running AVG (latest version) are not suffering lack of performance.

The only difference I can notice is in the java console during loading/startup of the solution.
The client with the performance issue has approx. 53 outputs like this (of course different jars/.idx references):

Reading certificates from 153354 http://<>:80/lib/j2db.jar | C:\Users\thoving.NEWBASE\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\32\10bb860-79bb110d-1243373350067-.idx

Any suggestions about what can cause this?
And how to solve the virusscanner problem?

jcompagner:
what kind of proxy?
it could be that the proxy is killing your connection.

What do you mean by which kind of proxy?

I have noticed something weird. On the administration page I have the SocketFactory.rmiServerFactory set to “com.servoy.j2db.server.rmi.tunnel.ServerTunnelRMISocketFactoryFactory”
But in server.xml I still have "protocol=“HTTP/1.1"” instead of “protocol=“org.apache.coyote.http11.Http11NioProtocol””

However in the console it seems to use the right one:

15-Jul-2009 11:31:41 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
15-Jul-2009 11:31:41 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 269 ms
15-Jul-2009 11:31:41 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
15-Jul-2009 11:31:41 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0-snapshot
15-Jul-2009 11:31:41 org.apache.catalina.startup.DigesterFactory register
WARNING: Could not get url for /javax/servlet/resources/web-app_2_5.xsd
15-Jul-2009 11:31:41 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
15-Jul-2009 11:31:41 org.apache.catalina.startup.Catalina start
INFO: Server startup in 964 ms

Is this warning in the console important?

EDIT: After having read again the previous posts apparently it’s normal to have protocol=“HTTP/1.1” in server.xml when you have SocketFactory.rmiServerFactory set to “com.servoy.j2db.server.rmi.tunnel.ServerTunnelRMISocketFactoryFactory”

about the virus scanner, you have to go into a setting that they shouldnt touch/scan http traffic coming from you servoy server.

about that java console output. that is generated by the latest java version (i believe java6 u14 and bigger) that output doenst hurt. So maybe somehow avg cant scan that output that is done by a newer java version or something. But that looks very strange to me.

jcompagner:
that output doenst hurt.

Cool :D

jcompagner:
So maybe somehow avg cant scan that output that is done by a newer java version or something. But that looks very strange to me.

I think you mixed the each ones problem. I don’t have anti-virus issue, it’s mboegem.

Foobrother:
I think you mixed the each ones problem. I don’t have anti-virus issue, it’s mboegem.

ahh yes, getting confused here in 1 form post many different things… :(

for you i mean what kind of proxy are you using? what is the name of the proxy is it something of Microsoft or…

jcompagner:
for you i mean what kind of proxy are you using? what is the name of the proxy is it something of Microsoft or…

Personally I don’t know but I still wait for the reply from the guys who knows :|
Will let you know asap.