Using Vpn connection and SmartClient

Questions and answers for all installation-related topics for Servoy products

Using Vpn connection and SmartClient

Postby Hans Nieuwenhuis » Wed Feb 18, 2009 6:23 pm

Hi,

I am testing our application over Vpn using Smartclient.

At the office my laptop runs the application without problem.

Using the Vpn connection I can connect to the Servoy Admin page and use that (http://ibisappprod:8080/servoy-admin/)

When i connect to http://ibisappprod:8080 I get the "launch Servoy Client" page.

When I try to start the smartclient I get the error : "No licenses or trial license left. Exiting"

When i look in the servoy Log file I see :

2009-02-18 17:08:52,226 ERROR [RMI TCP Connection(17)-172.16.173.33] com.servoy.j2db.dataprocessing.ClientManager - java.rmi.ConnectException: Connection refused to host: 192.168.1.123; nested exception is:
java.net.ConnectException: Connection refused: connect


172.16.173.33 is the ip-adress I get when i do a ipconfig/all on my laptop (so the ip-adres supplied by the Vpn connection)

192.168.1.123 is the ip-adres of my laptop at home.

What can be the problem ??

Other my other applications run without problems using Vpn.

Regards,

Hans
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: Using Vpn connection and SmartClient

Postby ngervasi » Thu Feb 19, 2009 3:50 pm

The problem is with the RMI port, open the Servoy Client JNLP file with a text editor and have a look at the IP there, the servoy client is trying to connect to that IP on port 1099 but probably that address is not reachable. The jnlp file is built on the server and so the private IP (192.168.1.123) is used.
It looks like ibisappprod is resolved differently when you are at home, try to connect to the vpn and download the smart client from 192.168.1.123 when you are at home, it should work, otherwise give us more details about the network layout.
Nicola Gervasi
sintpro.com
SAN Partner
ngervasi
 
Posts: 1487
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Re: Using Vpn connection and SmartClient

Postby ngervasi » Thu Feb 19, 2009 3:54 pm

Wooops, re-reading your post I figured out that I didn't understand properly, forget about my previous post.
Can you give me more infos about the vpn and the ip address used by servoy? Can you post the servoy client jnlp file?
Nicola Gervasi
sintpro.com
SAN Partner
ngervasi
 
Posts: 1487
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Re: Using Vpn connection and SmartClient

Postby Hans Nieuwenhuis » Thu Feb 19, 2009 9:31 pm

Hi Nicola,

The network layout is as follows :

- my laptop is in my home network and has an Ip--adres in the 192.168.1.xxx range

- I start a vpn connection to a F5 Vpn device at our company.

A vpn ip-adres ( PPP adapter Betagraphics VPN ) is created in the 172.16.173.xxx range

- In the connection between the F5 device and the Servoy application Server at our office, NAT protocol is used.

The strange thing is that on the server in the errorlog is see a refenrence to the 192.168.1.xxx ip-adres which has
nothing to do with the vpn connetction !!!

As I sayd ; all other applications work fine on this transparent vpn-tunnel connection

The servoy_client.jnlp is :

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://ibisappprod:8080" href="/servoy-client/servoy_client.jnlp">
<information>
<title>Servoy Client</title>
<vendor>Servoy</vendor>
<homepage href="http://www.servoy.com/"/>
<description>Database client</description>
<icon kind="shortcut" href="/lib/images/servoy_client_icon.gif" width="32" height="32"/>
<icon kind="splash" href="/lib/splashclient.gif" width="64" height="64"/>
<shortcut online="true">
<desktop/>
</shortcut>
</information>
<resources>
<j2se version="1.4+" max-heap-size="256m" />
<j2se version="1.5+" max-heap-size="256m" />
<j2se version="1.6+" max-heap-size="256m" />
<property name="apple.laf.useScreenMenuBar" value="true"/>
<jar href="/lib/j2db.jar" main="true" version="1233770928125" download="eager"/>
<jar href="/lib/js.jar" part="script" version="1233918366876" download="eager"/>
<package name="org.mozilla.*" part="script" recursive="true"/>
<jar href="/lib/BrowserLauncher2.jar" part="BrowserLauncher2" version="1233918366783" download="eager"/>
<package name="edu.stanford.ejalbert.*" part="BrowserLauncher2" recursive="true"/>
<jar href="/lib/commons-logging.jar" part="logging" version="1233918366814" download="eager"/>
<package name="org.apache.commons.logging.*" part="logging" recursive="true"/>
<jar href="/lib/MRJAdapter.jar" part="mac_menu" version="1233918366876" download="eager"/>
<package name="net.roydesign.*" part="mac_menu" recursive="true"/>
<extension name="LAFS_and_BEANS" href="/servoy-client/unsigned.jnlp" version="1233918366783"/>
<extension name="http.jar" href="/servoy-client/plugins/http.jar.jnlp" version="1233918366923"/>
<extension name="serialize.jar" href="/servoy-client/plugins/serialize.jar.jnlp" version="1233918366955"/>
<extension name="converters.jar" href="/servoy-client/plugins/converters.jar.jnlp" version="1233918366923"/>
<extension name="agent.jar" href="/servoy-client/plugins/agent.jar.jnlp" version="1233918366923"/>
<extension name="dialog.jar" href="/servoy-client/plugins/dialog.jar.jnlp" version="1233918366923"/>
<extension name="servoy_jasperreports.jar" href="/servoy-client/plugins/servoy_jasperreports.jar.jnlp" version="1216305154000"/>
<extension name="scheduler.jar" href="/servoy-client/plugins/scheduler.jar.jnlp" version="1233918366955"/>
<extension name="popupmenu.jar" href="/servoy-client/plugins/popupmenu.jar.jnlp" version="1233918366955"/>
<extension name="default_validators.jar" href="/servoy-client/plugins/default_validators.jar.jnlp" version="1233918366923"/>
<extension name="excelxport.jar" href="/servoy-client/plugins/excelxport.jar.jnlp" version="1233918366923"/>
<extension name="log.jar" href="/servoy-client/plugins/log.jar.jnlp" version="1215763518199"/>
<extension name="rawSQL.jar" href="/servoy-client/plugins/rawSQL.jar.jnlp" version="1233918366955"/>
<extension name="mail.jar" href="/servoy-client/plugins/mail.jar.jnlp" version="1233918366955"/>
<extension name="spellcheck.jar" href="/servoy-client/plugins/spellcheck.jar.jnlp" version="1233918366955"/>
<extension name="xmlreader.jar" href="/servoy-client/plugins/xmlreader.jar.jnlp" version="1233918366970"/>
<extension name="pdf_output.jar" href="/servoy-client/plugins/pdf_output.jar.jnlp" version="1233918366955"/>
<extension name="kioskmode.jar" href="/servoy-client/plugins/kioskmode.jar.jnlp" version="1233918366955"/>
<extension name="amortization.jar" href="/servoy-client/plugins/amortization.jar.jnlp" version="1233918366923"/>
<extension name="file.jar" href="/servoy-client/plugins/file.jar.jnlp" version="1233918366923"/>
<extension name="tabxport.jar" href="/servoy-client/plugins/tabxport.jar.jnlp" version="1233918366955"/>
<extension name="it2be-tools.jar" href="/servoy-client/plugins/it2be-tools.jar.jnlp" version="1233129716229"/>
<extension name="images.jar" href="/servoy-client/plugins/images.jar.jnlp" version="1233918366955"/>
<extension name="udp.jar" href="/servoy-client/plugins/udp.jar.jnlp" version="1233918366955"/>
</resources>
<application-desc main-class="com.servoy.j2db.J2DBClient">
</application-desc>
<security>
<all-permissions/>
</security>
</jnlp>
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: Using Vpn connection and SmartClient

Postby ngervasi » Thu Feb 19, 2009 10:41 pm

Are you using 2 way socket? You should, and you should also set 127.0.0.1 for the java.rmi.server.hostname in the Network Settings tab of your servoy server. I think that this should be enough but if it doesn't work please tell me how the dn ibisappprod is resolved on the server and on your laptop when you are at home.
Nicola Gervasi
sintpro.com
SAN Partner
ngervasi
 
Posts: 1487
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Re: Using Vpn connection and SmartClient

Postby Hans Nieuwenhuis » Fri Feb 20, 2009 8:22 am

Thanks Nicola,

I will try this and get back to you.

Regards,

Hans
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: Using Vpn connection and SmartClient

Postby Hans Nieuwenhuis » Fri Feb 20, 2009 12:21 pm

Hi,

I am using two-way socket.

If i set up the vpn connection at home, delete my .servoy directory and then
start a servoy client, I can see that the application is downloaded.

So there is a connection !!

It looks like Servoy is using a different networkconnection for downloading and licensing.

It is the same error I get when i am in the office and have a loopback-adaptor active on my laptop.
I created a case for that.

I tried to set the rmi.server.hostname to 127.0.0.1, but when i start a servoy client at the office(so no vpn)
the smartclient starts, but shows me no solutions.

Regards,

Hans
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: Using Vpn connection and SmartClient

Postby Harjo » Fri Feb 20, 2009 1:12 pm

yes indeed, the download happens on your tomcat port (mostly 8080)
after that, the client starts an RMI connecting back to the server (mostly on 1099) and THAT connection is failing! (and yes I find this strange too, that if this happens, Servoy sometimes says: there are no licenses)


please show/open a Java console, to see what happens there. You can do that in the java prerence Panel - Advanced - Console -> Show Console.

Maybe this works,
try under Java prerence panel - Network: Direct Connection.
Harjo Kompagnie
byKom B.V.
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Using Vpn connection and SmartClient

Postby Hans Nieuwenhuis » Fri Feb 20, 2009 1:21 pm

Hi Harjo,

The java console shows the same info in both cases ( non-working vpn connection and working local connection)

Java Web Start 1.6.0_11
Using JRE version 1.6.0_11 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\hn.BETALOCAL
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
0-5: set trace level to <n>
----------------------------------------------------
log4j:WARN No appenders could be found for logger (com.servoy.j2db.util.Debug).
log4j:WARN Please initialize the log4j system properly.
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: Using Vpn connection and SmartClient

Postby Hans Nieuwenhuis » Sun Feb 22, 2009 3:04 pm

Another observation :

If i delete my .servoy directory and then start the client over the Vpn connection, after a while i get the error message on the licenses and
the .Servoy directory is created but stays empty.

Does anyone have any idea what could cause this problem, i need to be able to use Vpn connections with the smartclient.

Regards,

Hans Nieuwenhuis
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: Using Vpn connection and SmartClient

Postby tgs » Mon Feb 23, 2009 10:53 am

Hello Hans!

Do you have a Port Forwarding (8080 + 1099) on the Server side Firewall/Router settings? I had similar issues and could fix it with that.
Please try in hope that helps.

Thomas
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: Using Vpn connection and SmartClient

Postby Hans Nieuwenhuis » Mon Feb 23, 2009 11:40 am

Hi,

Are there some basic tests (network) I can do to see where the problem is ?

I only get the "licenses" error , but i have no idea where to look.

Rergards,
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: Using Vpn connection and SmartClient

Postby Foobrother » Mon Feb 23, 2009 1:27 pm

Hi everybody,

I'm also getting this problem with one or my colleague. He was trying to connect to the solution using the VPN over the weekend and got this error message ("No more licenses"). And now, on site, without the VPN he gets the same error!

Here are the errors he is rising in the logs:
Code: Select all
2009-02-23 09:13   RMI TCP Connection(337)-192.168.1.120   ERROR   com.servoy.j2db.dataprocessing.ClientManager   Error getting client info: Proxy[IClient,RemoteObjectInvocationHandler[UnicastRef2 [liveRef: [endpoint:[0.20.0.6:3034](remote),objID:[6429f83a:11fa2675fa1:-7ffe, -4342208849565962996]]]]]
java.rmi.ConnectIOException: Exception creating connection to: 0.20.0.6; nested exception is: java.io.InterruptedIOException: The socket pool for a client 0.20.0.6:3034 did not recieve a callback socket from the client within 60000ms, pool still empty
       at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
       at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
       at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
       at sun.rmi.server.UnicastRef.invoke(Unknown Source)
       at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
       at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
       at $Proxy9.getClientInfo(Unknown Source)
       at com.servoy.j2db.dataprocessing.ClientManager.Za(ClientManager.java:4)
       at com.servoy.j2db.dataprocessing.SQLEngine.register(SQLEngine.java:739)
       at sun.reflect.GeneratedMethodAccessor292.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
       at sun.rmi.transport.Transport$1.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at sun.rmi.transport.Transport.serviceCall(Unknown Source)
       at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
       at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
       at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
       at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.InterruptedIOException: The socket pool for a client 0.20.0.6:3034 did not recieve a callback socket from the client within 60000ms, pool still empty
       at com.servoy.j2db.util.rmi.Zh.Za(Zh.java:23)
       at com.servoy.j2db.util.rmi.ServerTwoWaySocketFactory.createSocket(ServerTwoWaySocketFactory.java:49)
       ... 22 more
2009-02-23 09:09   SocketAccepter[2]   ERROR   com.servoy.j2db.util.Debug   SocketAcceptor failure for socket: 1cf5472[SSL_NULL_WITH_NULL_NULL: Socket[addr=/192.168.1.120,port=4028,localport=1099]]
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
       at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown Source)
       at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
       at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
       at java.io.BufferedInputStream.fill(Unknown Source)
       at java.io.BufferedInputStream.read(Unknown Source)
       at java.io.DataInputStream.readInt(Unknown Source)
       at com.servoy.j2db.util.rmi.Ze.run(Ze.java:37)
       at com.servoy.j2db.util.TaskExecuter.run(TaskExecuter.java:9)
       at java.lang.Thread.run(Unknown Source)
2009-02-23 09:02   SocketAccepter[0]   ERROR   com.servoy.j2db.util.Debug   SocketAcceptor failure for socket: 1e86acf[SSL_NULL_WITH_NULL_NULL: Socket[addr=/192.168.1.120,port=3942,localport=1099]]
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
       at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown Source)
       at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
       at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
       at java.io.BufferedInputStream.fill(Unknown Source)
       at java.io.BufferedInputStream.read(Unknown Source)
       at java.io.DataInputStream.readInt(Unknown Source)
       at com.servoy.j2db.util.rmi.Ze.run(Ze.java:37)
       at com.servoy.j2db.util.TaskExecuter.run(TaskExecuter.java:9)
       at java.lang.Thread.run(Unknown Source)
2009-02-23 09:00   SocketAccepter[0]   ERROR   com.servoy.j2db.util.Debug   SocketAcceptor failure for socket: 1c4fc4[SSL_NULL_WITH_NULL_NULL: Socket[addr=/192.168.1.120,port=3924,localport=1099]]
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
       at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown Source)
       at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
       at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
       at java.io.BufferedInputStream.fill(Unknown Source)
       at java.io.BufferedInputStream.read(Unknown Source)
       at java.io.DataInputStream.readInt(Unknown Source)
       at com.servoy.j2db.util.rmi.Ze.run(Ze.java:37)
       at com.servoy.j2db.util.TaskExecuter.run(TaskExecuter.java:9)
       at java.lang.Thread.run(Unknown Source)


There seems to be a problem with the SSL.
On the server we have the options: SocketFactory.useTwoWaySocket and SocketFactory.useSSL enabled.
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: Using Vpn connection and SmartClient

Postby Foobrother » Mon Feb 23, 2009 5:20 pm

It might sound funny, but my colleague told me that he never reboots his laptop! Just hibernates it.
So I asked him to reboot it. And now it works fine! :mrgreen:

Looks very lucky but it might be your solution as well?! :roll:
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: Using Vpn connection and SmartClient

Postby Hans Nieuwenhuis » Mon Feb 23, 2009 6:04 pm

Hi,

Found the problem !!!!

After all it was a tip from Harjo,

Maybe this works,
try under Java prerence panel - Network: Direct Connection.


I tried that setting and now it works !!!

Don't quite understand why tough ..

THANKS HARJO !!

The default setting is : "use browser settings"

Regards,

Hans
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Next

Return to Installation

Who is online

Users browsing this forum: No registered users and 19 guests

cron