Page 1 of 1

Smartclient on https not working

PostPosted: Wed Mar 10, 2010 4:06 pm
by Janssenjos
After our upgrade to 5.x (Now on version 5.1.0) we found out that our smartclient doesn't work anymore.

If we disable ssl in the settings, it works again. (But then it won't use the tunneling, so there is something wrong with that, we think).

Were getting the following trace in the java console on the client:
Code: Select all
Installing tunnel in socket mode to web04:1099
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
   at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(Unknown Source)
   at com.sebster.tunnel.impl.t.a(t.java:3)
   at com.sebster.tunnel.impl.s.connect(s.java:9)
   at com.sebster.tunnel.DelegatingTunnelClient.connect(DelegatingTunnelClient.java:1)
   at com.sebster.tunnel.impl.ac.<init>(ac.java:5)
   at com.sebster.tunnel.multiplexer.rmi.ClientMultiplexedRmiSocketFactoryProvider$1.<init>(ClientMultiplexedRmiSocketFactoryProvider.java:1)
   at com.sebster.tunnel.multiplexer.rmi.ClientMultiplexedRmiSocketFactoryProvider.<init>(ClientMultiplexedRmiSocketFactoryProvider.java:1)
   at com.sebster.tunnel.multiplexer.rmi.ClientMultiplexedRmiSocketFactoryProvider.<init>(ClientMultiplexedRmiSocketFactoryProvider.java:15)
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory$RmiSocketFactoryProvider.<init>(ClientTunnelRMISocketFactoryFactory.java:270)
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory$RmiSocketFactoryProvider.<init>(ClientTunnelRMISocketFactoryFactory.java:268)
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory.createFactoryProvider(ClientTunnelRMISocketFactoryFactory.java:217)
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory.<init>(ClientTunnelRMISocketFactoryFactory.java:208)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
   at java.lang.reflect.Constructor.newInstance(Unknown Source)
   at com.servoy.j2db.J2DBClient.Zf(J2DBClient.java:897)
   at com.servoy.j2db.J2DBClient.startupApplication(J2DBClient.java:1196)
   at com.servoy.j2db.Zud.run(Zud.java:3)
   at com.servoy.j2db.J2DBClient.mainImpl(J2DBClient.java:1626)
   at com.servoy.j2db.J2DBClient.main(J2DBClient.java:104)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.sun.javaws.Launcher.executeApplication(Unknown Source)
   at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
   at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
   at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(Unknown Source)
   at com.sebster.tunnel.impl.t.a(t.java:3)
   at com.sebster.tunnel.impl.s.connect(s.java:9)
   at com.sebster.tunnel.DelegatingTunnelClient.connect(DelegatingTunnelClient.java:1)
   at com.sebster.tunnel.impl.ac.<init>(ac.java:5)
   at com.sebster.tunnel.multiplexer.rmi.ClientMultiplexedRmiSocketFactoryProvider$1.<init>(ClientMultiplexedRmiSocketFactoryProvider.java:1)
   at com.sebster.tunnel.multiplexer.rmi.ClientMultiplexedRmiSocketFactoryProvider.<init>(ClientMultiplexedRmiSocketFactoryProvider.java:1)
   at com.sebster.tunnel.multiplexer.rmi.ClientMultiplexedRmiSocketFactoryProvider.<init>(ClientMultiplexedRmiSocketFactoryProvider.java:15)
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory$RmiSocketFactoryProvider.<init>(ClientTunnelRMISocketFactoryFactory.java:270)
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory$RmiSocketFactoryProvider.<init>(ClientTunnelRMISocketFactoryFactory.java:268)
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory.createFactoryProvider(ClientTunnelRMISocketFactoryFactory.java:217)
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory.getRemoteClientSocketFactory(ClientTunnelRMISocketFactoryFactory.java:229)
   at com.servoy.j2db.J2DBClient.getServerService(J2DBClient.java:845)
   at com.servoy.j2db.J2DBClient.Zf(J2DBClient.java:332)
   at com.servoy.j2db.ClientState.dataServerInit(ClientState.java:134)
   at com.servoy.j2db.J2DBClient.dataServerInit(J2DBClient.java:710)
   at com.servoy.j2db.J2DBClient.startupApplication(J2DBClient.java:1220)
   at com.servoy.j2db.Zud.run(Zud.java:3)
   at com.servoy.j2db.J2DBClient.mainImpl(J2DBClient.java:1626)
   at com.servoy.j2db.J2DBClient.main(J2DBClient.java:104)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.sun.javaws.Launcher.executeApplication(Unknown Source)
   at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
   at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
ERROR - Debug                      - Error getting the service servoy.IApplicationServerAccess from host ax-web04:1099
java.lang.NullPointerException
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory.getRemoteClientSocketFactory(ClientTunnelRMISocketFactoryFactory.java:230)
   at com.servoy.j2db.J2DBClient.getServerService(J2DBClient.java:845)
   at com.servoy.j2db.J2DBClient.Zf(J2DBClient.java:332)
   at com.servoy.j2db.ClientState.dataServerInit(ClientState.java:134)
   at com.servoy.j2db.J2DBClient.dataServerInit(J2DBClient.java:710)
   at com.servoy.j2db.J2DBClient.startupApplication(J2DBClient.java:1220)
   at com.servoy.j2db.Zud.run(Zud.java:3)
   at com.servoy.j2db.J2DBClient.mainImpl(J2DBClient.java:1626)
   at com.servoy.j2db.J2DBClient.main(J2DBClient.java:104)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.sun.javaws.Launcher.executeApplication(Unknown Source)
   at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
   at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
ERROR - Debug                      - Throwable
java.lang.NullPointerException
   at com.servoy.j2db.J2DBClient.Zf(J2DBClient.java:52)
   at com.servoy.j2db.ClientState.dataServerInit(ClientState.java:134)
   at com.servoy.j2db.J2DBClient.dataServerInit(J2DBClient.java:710)
   at com.servoy.j2db.J2DBClient.startupApplication(J2DBClient.java:1220)
   at com.servoy.j2db.Zud.run(Zud.java:3)
   at com.servoy.j2db.J2DBClient.mainImpl(J2DBClient.java:1626)
   at com.servoy.j2db.J2DBClient.main(J2DBClient.java:104)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.sun.javaws.Launcher.executeApplication(Unknown Source)
   at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
   at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)


Is there a known solution for this?

Already found from other threads:

Tried to clear the java cache etc..

Have the following system properties on my server:
Code: Select all
system.property.com.sebster.tunnel.http.client.chunked=false
system.property.com.sebster.tunnel.http.client.closeRequestOnFlush=false

Also have the 'com.servoy.j2db.server.rmi.tunnel.ServerTunnelRMISocketFactoryFactory' setting.

There is no firewall that is blocking port 1099.

Re: Smartclient on https not working

PostPosted: Mon Mar 15, 2010 3:35 pm
by jcompagner
Currently you have configured the tunnel in http&socket mode (see the admin pages of 5.1)
And if that is the configured like that then the default mode clients will go in is socket, so it wont tunnel over http.

It could be that in your case you have to go over http because sockets (that will go over 1099) are just blocked.

Can you configure your 5.1 server to use HTTP mode only? (with ssl)
Or configure clients to use http instead of socket. This can be done with pushing a system property to the client, look for the profiles tab in the admin pages for examples.

Re: Smartclient on https not working

PostPosted: Mon Mar 15, 2010 3:58 pm
by Janssenjos
Hi,

Thanks for your reply. I Have set the tunnel mode to http & created a profile with the system property: system.property.SocketFactory.tunnelConnectionMode=http.

But, unfortunately, I still doesn't work.

Java console:
Code: Select all
ar 15, 2010 2:55:09 PM com.sebster.tunnel.impl.rb b
INFO: jcifs library found; NTLM support enabled
Mar 15, 2010 2:55:09 PM com.sebster.tunnel.impl.rb b
INFO: bouncy castle library found; SPNEGO support enabled
Mar 15, 2010 2:55:09 PM com.sebster.tunnel.impl.rb b
INFO: using direct connection
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
   at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(Unknown Source)
   at com.sebster.tunnel.impl.t.a(t.java:3)
   at com.sebster.tunnel.impl.s.connect(s.java:9)
   at com.sebster.tunnel.DelegatingTunnelClient.connect(DelegatingTunnelClient.java:1)
   at com.sebster.tunnel.impl.ac.<init>(ac.java:5)
   at com.sebster.tunnel.multiplexer.rmi.ClientMultiplexedRmiSocketFactoryProvider$1.<init>(ClientMultiplexedRmiSocketFactoryProvider.java:1)
   at com.sebster.tunnel.multiplexer.rmi.ClientMultiplexedRmiSocketFactoryProvider.<init>(ClientMultiplexedRmiSocketFactoryProvider.java:1)
   at com.sebster.tunnel.multiplexer.rmi.ClientMultiplexedRmiSocketFactoryProvider.<init>(ClientMultiplexedRmiSocketFactoryProvider.java:15)
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory$RmiSocketFactoryProvider.<init>(ClientTunnelRMISocketFactoryFactory.java:270)
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory$RmiSocketFactoryProvider.<init>(ClientTunnelRMISocketFactoryFactory.java:268)
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory.createFactoryProvider(ClientTunnelRMISocketFactoryFactory.java:217)
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory.<init>(ClientTunnelRMISocketFactoryFactory.java:208)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
   at java.lang.reflect.Constructor.newInstance(Unknown Source)
   at com.servoy.j2db.J2DBClient.Zf(J2DBClient.java:897)
   at com.servoy.j2db.J2DBClient.startupApplication(J2DBClient.java:1196)
   at com.servoy.j2db.Zud.run(Zud.java:3)
   at com.servoy.j2db.J2DBClient.mainImpl(J2DBClient.java:1626)
   at com.servoy.j2db.J2DBClient.main(J2DBClient.java:104)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.sun.javaws.Launcher.executeApplication(Unknown Source)
   at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
   at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Mar 15, 2010 2:55:10 PM com.sebster.tunnel.impl.rb b
INFO: jcifs library found; NTLM support enabled
Mar 15, 2010 2:55:10 PM com.sebster.tunnel.impl.rb b
INFO: bouncy castle library found; SPNEGO support enabled
Mar 15, 2010 2:55:10 PM com.sebster.tunnel.impl.rb b
INFO: using direct connection
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
   at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(Unknown Source)
   at com.sebster.tunnel.impl.t.a(t.java:3)
   at com.sebster.tunnel.impl.s.connect(s.java:9)
   at com.sebster.tunnel.DelegatingTunnelClient.connect(DelegatingTunnelClient.java:1)
   at com.sebster.tunnel.impl.ac.<init>(ac.java:5)
   at com.sebster.tunnel.multiplexer.rmi.ClientMultiplexedRmiSocketFactoryProvider$1.<init>(ClientMultiplexedRmiSocketFactoryProvider.java:1)
   at com.sebster.tunnel.multiplexer.rmi.ClientMultiplexedRmiSocketFactoryProvider.<init>(ClientMultiplexedRmiSocketFactoryProvider.java:1)
   at com.sebster.tunnel.multiplexer.rmi.ClientMultiplexedRmiSocketFactoryProvider.<init>(ClientMultiplexedRmiSocketFactoryProvider.java:15)
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory$RmiSocketFactoryProvider.<init>(ClientTunnelRMISocketFactoryFactory.java:270)
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory$RmiSocketFactoryProvider.<init>(ClientTunnelRMISocketFactoryFactory.java:268)
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory.createFactoryProvider(ClientTunnelRMISocketFactoryFactory.java:217)
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory.getRemoteClientSocketFactory(ClientTunnelRMISocketFactoryFactory.java:229)
   at com.servoy.j2db.J2DBClient.getServerService(J2DBClient.java:845)
   at com.servoy.j2db.J2DBClient.Zf(J2DBClient.java:332)
   at com.servoy.j2db.ClientState.dataServerInit(ClientState.java:134)
   at com.servoy.j2db.J2DBClient.dataServerInit(J2DBClient.java:710)
   at com.servoy.j2db.J2DBClient.startupApplication(J2DBClient.java:1220)
   at com.servoy.j2db.Zud.run(Zud.java:3)
   at com.servoy.j2db.J2DBClient.mainImpl(J2DBClient.java:1626)
   at com.servoy.j2db.J2DBClient.main(J2DBClient.java:104)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.sun.javaws.Launcher.executeApplication(Unknown Source)
   at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
   at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
ERROR - Debug                      - Error getting the service servoy.IApplicationServerAccess from host ax-web04:1099
java.lang.NullPointerException
   at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory.getRemoteClientSocketFactory(ClientTunnelRMISocketFactoryFactory.java:230)
   at com.servoy.j2db.J2DBClient.getServerService(J2DBClient.java:845)
   at com.servoy.j2db.J2DBClient.Zf(J2DBClient.java:332)
   at com.servoy.j2db.ClientState.dataServerInit(ClientState.java:134)
   at com.servoy.j2db.J2DBClient.dataServerInit(J2DBClient.java:710)
   at com.servoy.j2db.J2DBClient.startupApplication(J2DBClient.java:1220)
   at com.servoy.j2db.Zud.run(Zud.java:3)
   at com.servoy.j2db.J2DBClient.mainImpl(J2DBClient.java:1626)
   at com.servoy.j2db.J2DBClient.main(J2DBClient.java:104)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.sun.javaws.Launcher.executeApplication(Unknown Source)
   at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
   at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
ERROR - Debug                      - Throwable
java.lang.NullPointerException
   at com.servoy.j2db.J2DBClient.Zf(J2DBClient.java:52)
   at com.servoy.j2db.ClientState.dataServerInit(ClientState.java:134)
   at com.servoy.j2db.J2DBClient.dataServerInit(J2DBClient.java:710)
   at com.servoy.j2db.J2DBClient.startupApplication(J2DBClient.java:1220)
   at com.servoy.j2db.Zud.run(Zud.java:3)
   at com.servoy.j2db.J2DBClient.mainImpl(J2DBClient.java:1626)
   at com.servoy.j2db.J2DBClient.main(J2DBClient.java:104)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.sun.javaws.Launcher.executeApplication(Unknown Source)
   at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
   at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Re: Smartclient on https not working

PostPosted: Mon Mar 15, 2010 4:38 pm
by jcompagner
is there a proxy in between?

Re: Smartclient on https not working

PostPosted: Mon Mar 15, 2010 9:12 pm
by sebster
Hi,

It looks like your certificate on the server is invalid, and thus the client does not trust the server and refuses to communicate with it.

That means: you have a self-signed certificate (signed by your "own" CA), which is not trusted by the JRE (Java Runtime Environment) on your client machine.

There are 2 ways to solve this problem:
- Get official SSL certificates by one of many cheap SSL certificate providers, but make sure that the root certificate they use to sign the certificates is contained in the JRE CA certificate list.
- Import the CA certificate you used to sign your SSL cert on *every* single client into the list of trusted CA certs of the JRE.

My suggestion is to go for the first option.

Re: Smartclient on https not working

PostPosted: Mon Mar 22, 2010 5:15 pm
by Janssenjos
Hi, we have an official certificate installed. The only thing is that it is out of date. But when we install the smart client, Java detects this and asks if we want to continue.

Could it be the problem that the certificate is out of date?

Re: Smartclient on https not working

PostPosted: Mon Mar 22, 2010 8:02 pm
by sebster
Yes, that would be a problem.

I don't exactly know when the smart client asks about the certificate and where you use the certficate, but when SSL is enabled it will only accept either a valid SSL certificate or the test certificates. An expired certificate will fail.

Re: Smartclient on https not working

PostPosted: Fri Apr 02, 2010 2:22 pm
by Janssenjos
With a valid ssl, it is working now.