HTTP Tunneling in Servoy 4.x.x

Questions, tips and tricks and techniques for scripting in Servoy

Re: HTTP Tunneling in Servoy 4.x.x

Postby Foobrother » Wed Jul 15, 2009 12:39 pm

jcompagner wrote: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:
Code: Select all
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"
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:51 pm

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.
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 Foobrother » Thu Jul 16, 2009 10:05 am

jcompagner wrote: that output doenst hurt.

Cool :D
jcompagner wrote: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.
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 » Thu Jul 16, 2009 10:32 am

Foobrother wrote: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....
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 Foobrother » Thu Jul 16, 2009 10:50 am

jcompagner wrote: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.
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 Foobrother » Fri Jul 17, 2009 12:55 pm

Got a reply from the system administrator. Not really what I was looking for:
Could you enable SSL and configure the tunnel to work over the standard HTTPS port on the test environment (i.e. Port 443)?

We believe that some of the proxy issues may be made worse by using non-standard ports and the above configuration should be closer to our production environment.

How do I configure the tunnel to work over the standard HTTPS port?
I already have SocketFactory.useSSL enabled but I don't have any certificate to use yet. So no SocketFactory.SSLKeystorePath or SocketFactory.SSLKeystorePassphrase.

What do I have to do to be able to use url like yhat: https://myServer:8080/servoy-client/...
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 » Fri Jul 17, 2009 1:58 pm

socket factory use ssl and so on have nothing to do with https

thats for servoy data encrypted and then over http (so data -> ssl encrypt done by servoy -> http)

what you want is just servoy data going over https (so data -> http -> ssl (https))

So for this you have to configure Tomcat to use the https connector over 443 instead of the http connector over 8080 (server.xml)
but for this you also have to generate a keystore where you add your ssl certificate/keys that tomcat uses to setup https connections
or setup apache webserver in front of it that handles the https for you
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 Foobrother » Fri Jul 17, 2009 4:35 pm

I've got some news.

When the Java client establishes a connection through the proxy, you are prompted to authenticate, and that authentication is valid for that connection.

Every 5 minutes (exactly 5) the Java smart client drops the connection and re-establishes it. Because to the proxy server this is a new connection, it prompts you to re-authenticate and the application tells you the connection has been lost.

Exactly the same behaviour occurs when connected over the internet with no proxy, but you don't see it because there's no need to authenticate the new connection.

What do you think is causing the disconnection? Can it be because of Servoy network configuration?
Btw, I still use the same settings (not changed to use HTTPS)
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 sebster » Fri Jul 17, 2009 5:00 pm

Hi,

Servoy makes HTTP connections for the tunnel. Every 5 minutes it refreshes the connection (by default).

However, what I don't understand is exactly what happens. Do you use the same credentials every time to log in to the proxy? Because if so, then Servoy should just work. But if you need NEW credentials for EVERY connection to the proxy, then that would mean you have to type 2 passwords when servoy starts up (because it needs 2 connections).

So what exactly happens? What type of proxy-authentication is it? Is it Basic, Digest or NTLM? Does Servoy prompt for the credentials or does some other program?
sebster
 
Posts: 251
Joined: Thu Apr 24, 2003 10:03 am
Location: Utrecht, The Netherlands

Re: HTTP Tunneling in Servoy 4.x.x

Postby Foobrother » Mon Jul 20, 2009 11:16 am

The Proxy uses NTLM authentication – the account used is a user’s Windows domain/AD username/password and this does not change (apart from 3 monthly password changes).

When the Smart client starts and attempts to connect to the server the standard Java proxy screen prompts for the username/password/domain. You are only prompted to enter this once (at application startup).

Also, does the 5min refresh correspond to the ApplicationServer.pingDelay which is at 300sec by default (5min)?
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

Previous

Return to Methods

Who is online

Users browsing this forum: No registered users and 35 guests

cron