HTTP Tunneling in Servoy 4.x.x

Questions, tips and tricks and techniques for scripting in Servoy

HTTP Tunneling in Servoy 4.x.x

Postby Foobrother » Mon Jul 06, 2009 10:46 am

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?
Code: Select all
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:
Attachments
tunnelling.pdf
Http Tunneling with Servoy 3.5
(126.9 KiB) Downloaded 282 times
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: HTTP Tunneling in Servoy 4.x.x

Postby ptalbot » Mon Jul 06, 2009 8:19 pm

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:

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


Hope this helps,
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: HTTP Tunneling in Servoy 4.x.x

Postby Foobrother » Tue Jul 07, 2009 9:51 am

Looks good!

Thank you :D
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: HTTP Tunneling in Servoy 4.x.x

Postby pbakker » Thu Jul 09, 2009 5:39 pm

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
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: HTTP Tunneling in Servoy 4.x.x

Postby ptalbot » Thu Jul 09, 2009 5:46 pm

pbakker wrote: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!
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: HTTP Tunneling in Servoy 4.x.x

Postby mboegem » Tue Jul 14, 2009 5:30 pm

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://<my-IP>/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.

network.png
network.png (8.85 KiB) Viewed 5745 times
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1752
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: HTTP Tunneling in Servoy 4.x.x

Postby Foobrother » Tue Jul 14, 2009 5:46 pm

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?
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: HTTP Tunneling in Servoy 4.x.x

Postby ptalbot » Tue Jul 14, 2009 5:48 pm

mboegem wrote: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 <Connector> 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.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: HTTP Tunneling in Servoy 4.x.x

Postby jcompagner » Tue Jul 14, 2009 7:49 pm

Foobrother wrote: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.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: HTTP Tunneling in Servoy 4.x.x

Postby mboegem » Tue Jul 14, 2009 10:45 pm

ptalbot wrote: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???
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1752
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: HTTP Tunneling in Servoy 4.x.x

Postby jcompagner » Tue Jul 14, 2009 10:49 pm

mboegem wrote: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 wrote: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.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: HTTP Tunneling in Servoy 4.x.x

Postby mboegem » Tue Jul 14, 2009 11:00 pm

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


thnkx Johan, will try that.
I will post the results here!
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1752
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: HTTP Tunneling in Servoy 4.x.x

Postby Foobrother » Wed Jul 15, 2009 9:36 am

jcompagner wrote: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?
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: HTTP Tunneling in Servoy 4.x.x

Postby jcompagner » Wed Jul 15, 2009 10:30 am

what kind of proxy?
it could be that the proxy is killing your connection.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: HTTP Tunneling in Servoy 4.x.x

Postby mboegem » Wed Jul 15, 2009 12:23 pm

mboegem wrote: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://<<OURIPADDRESS>>: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?
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1752
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Next

Return to Methods

Who is online

Users browsing this forum: No registered users and 46 guests

cron