Using Vpn connection and SmartClient

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

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.

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?

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"?> Servoy Client Servoy Database client

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.

Thanks Nicola,

I will try this and get back to you.

Regards,

Hans

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

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.

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™ 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

log4j:WARN No appenders could be found for logger (com.servoy.j2db.util.Debug).
log4j:WARN Please initialize the log4j system properly.

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

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

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,

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:

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.

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:

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

it could be that your browser is using some kind of proxy, that servoy does not like.
with setting java to direct connection, you will by-pass that.

Great that it works! :-)