Page 1 of 2

Can anyone explain 'dataservice' issue?'

PostPosted: Fri Apr 23, 2010 2:05 am
by alb
I am testing *on* the windows server running servoy, so as to eliminate any firewall issues. I have http tunneling enabled.
http://localhost:8080/servoy-webclient works perfectly in a browser - so I know database etc are all ok.
http://localhost:8080/servoy-client/servoy-client.jnlp downloads the jave applet but then dies with 'Cannot find dataservice - it may not be running on server'

How can this be? I am running both WC and SC on the SAME box as the same user.

Any ideas? Why is WC happy and SC isnt?

Al.

Re: Can anyone explain 'dataservice' issue?'

PostPosted: Fri Apr 23, 2010 10:21 am
by mboegem
Are you sure you need to refer to servoy-client.jnlp? This means you open a solution called 'servoy-client'...

About getting to the dataservice:
There's a big difference between the data transferred to a webclient or smart client.

Data handled to the webclient is part of your webpage, as for the smart client it's being transferred over your network.

Is there some software/hardware (ie active virusscanner) which might block your data?

Hope this helps

Re: Can anyone explain 'dataservice' issue?'

PostPosted: Fri Apr 23, 2010 10:28 am
by Kahuna
alb wrote:I am testing *on* the windows server running servoy, so as to eliminate any firewall issues. I have http tunneling enabled.
http://localhost:8080/servoy-webclient works perfectly in a browser - so I know database etc are all ok.
http://localhost:8080/servoy-client/servoy-client.jnlp downloads the jave applet but then dies with 'Cannot find dataservice - it may not be running on server'

How can this be? I am running both WC and SC on the SAME box as the same user.

Any ideas? Why is WC happy and SC isnt?

Al.


Try just http://localhost:8080

I may be wrong but I think that will offer you a WebStart download page and from there you can select the solution to run?

Re: Can anyone explain 'dataservice' issue?'

PostPosted: Fri Apr 23, 2010 10:52 am
by ROCLASI
Hi Al,

Sounds like your server doesn't have all the required ports open. It needs (by default) 8080 and 1099 (RMI).
Since you are able to download the jnlp it means that 1099 is not open.

It all does work for Web client because the client essentially runs on the server and only gives HTML/CSS/JS back to the browser while Smart client requires a persistant connection over these 2 ports.

Hope this helps.

Re: Can anyone explain 'dataservice' issue?'

PostPosted: Fri Apr 23, 2010 10:57 am
by mboegem
ROCLASI wrote:Smart client requires a persistant connection over these 2 ports.


1099 shouldn't be required when http tunneling is enabled, or am I missing something?

Re: Can anyone explain 'dataservice' issue?'

PostPosted: Fri Apr 23, 2010 11:03 am
by ROCLASI
Oh wait, I missed the tunneling part.
Well then it's easy I believe. Don't download the client from port 8080 but from port 80.

Re: Can anyone explain 'dataservice' issue?'

PostPosted: Fri Apr 23, 2010 11:15 am
by mboegem
ROCLASI wrote:Don't download the client from port 8080 but from port 80.


We normally experience the opposite: virusscanner mostly scan port 80 and they can be easily fooled by using 8080.

To be honest I doubt the 'servoy-client.jnlp' part...

Re: Can anyone explain 'dataservice' issue?'

PostPosted: Fri Apr 23, 2010 11:33 am
by ROCLASI
mboegem wrote:We normally experience the opposite: virusscanner mostly scan port 80 and they can be easily fooled by using 8080.

Wouldn't that defeat the purpose of using http tunneling ?
But yes, virusscanners can cause trouble.

mboegem wrote:To be honest I doubt the 'servoy-client.jnlp' part...

This will simply download the smart client without the info to open a specific solution. The user will get, when there are more than 1 solutions visible on the server, the open solution dialog.

Re: Can anyone explain 'dataservice' issue?'

PostPosted: Fri Apr 23, 2010 11:36 am
by Foobrother
Do you have Java network setting set to "Direct Connection"? Usually the "Cannot find dataservice" error comes from this setting not set.
To check it, go to Control Panel > Java > Network Settings and select Direct Connection.

Re: Can anyone explain 'dataservice' issue?'

PostPosted: Fri Apr 23, 2010 12:32 pm
by martinh
I have the same issue when I run my application from my private computer at home.
So it is a client related problem.

I'll try the setting below this weekend.

Foobrother wrote:Do you have Java network setting set to "Direct Connection"? Usually the "Cannot find dataservice" error comes from this setting not set.
To check it, go to Control Panel > Java > Network Settings and select Direct Connection.


We'll see if that solves it.
Even with Windows Firewall off and the Viruschecker off I get the same issue.
So maybe indeed it is a JAVA setting

Re: Can anyone explain 'dataservice' issue?'

PostPosted: Fri Apr 23, 2010 1:36 pm
by pkb
Check for the Java Connection
Control Panel -> Java -> Network Settings -> select "Direct Connection"

Also try unchecking all the 3 check boxes in Servoy Admin -> Network Settings.
Use http://ip:port to run the client.

Hope this work.

Re: Can anyone explain 'dataservice' issue?'

PostPosted: Sat Apr 24, 2010 11:56 pm
by alb
Thanks for the replies all. Now at least I understand why webclient works and sc doesnt.
Just to clarify http://server:8080/servoy-client/servoy-client.jnlp either presents a menu of solutions or opens the only solution on the server if there is only one. Works fine on other servers.

The suggestion RE servoy admin settings - ie uncheck:
SocketFactory.useTwoWaySocket:
SocketFactory.compress:
SocketFactory.useSSL:

Surely I want these on? I am using http tunneling so I dont have to open additional ports. Doesnt this mean I want 2-way sockets and SSL?

Re: Can anyone explain 'dataservice' issue?'

PostPosted: Sun Apr 25, 2010 2:02 am
by alb
Ok
This is getting harder to understand :(
Is there anyway to debug what servoer:port combination the SC *thinks* it is trying to connect to for the dataservice?

Here's the current situation:
From a remote CLIENT:
http://server:8080/servoy-client/servoy-client.jnlp works perfectly.

On the SERVER:
http://localhost:8080/servoy-webclient works perfectly
http://localhost:8080/servoy-client/servoy-client.jnlp opens the SC and then fails with 'Cannot find dataservice'. How is this possible?

I have http tunneling ON - and I know that it is working because I DONT have the RMI port (1099) open on the server. The fact tunneling is working is confirmed by the fact that the SC on an external client runs using port 8080 ONLY.

so why won't it run on localhost:8080 on the server itself?
how can I see what the SC client running on the server is 'trying' to connect to?

Thanks
Al.

Re: Can anyone explain 'dataservice' issue?'

PostPosted: Sun Apr 25, 2010 9:10 am
by alb
I am assuming this might have something to do with it?
Turned on Java console logging and it seems that, not unsurprisingly, the certificate used by my SC for SSL (dev.cesoft.com.au) doesnt match the name of the hostname (localhost). Trace below.
Would this be enough to stop the entire SC from working with a 'cant find dataservice error' ?


25/04/2010 5:03:02 PM com.sebster.tunnel.impl.rb b
INFO: jcifs library found; NTLM support enabled
25/04/2010 5:03:02 PM com.sebster.tunnel.impl.rb b
INFO: bouncy castle library found; SPNEGO support enabled
25/04/2010 5:03:02 PM com.sebster.tunnel.impl.rb b
INFO: using direct connection
javax.net.ssl.SSLException: hostname in certificate didn't match: <localhost> != <dev.cesoft.com.au>
at com.servoy.j2db.util.rmi.hostnameverifier.AbstractVerifier.verify(AbstractVerifier.java:28)
at com.servoy.j2db.util.rmi.hostnameverifier.BrowserCompatHostnameVerifier.verify(BrowserCompatHostnameVerifier.java:1)
at com.servoy.j2db.util.rmi.hostnameverifier.AbstractVerifier.verify(AbstractVerifier.java:53)
at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory$ServoySSLCertificateVerifier.verify(ClientTunnelRMISocketFactoryFactory.java:339)
at com.sebster.tunnel.impl.t.a(t.java:13)
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:273)
at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory$RmiSocketFactoryProvider.<init>(ClientTunnelRMISocketFactoryFactory.java:271)
at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory.createFactoryProvider(ClientTunnelRMISocketFactoryFactory.java:220)
at com.servoy.j2db.server.rmi.tunnel.ClientTunnelRMISocketFactoryFactory.<init>(ClientTunnelRMISocketFactoryFactory.java:209)
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:17)
at com.servoy.j2db.J2DBClient.startupApplication(J2DBClient.java:113)
at com.servoy.j2db.Zyd.run(Zyd.java:4)
at com.servoy.j2db.J2DBClient.mainImpl(J2DBClient.java:458)
at com.servoy.j2db.J2DBClient.main(J2DBClient.java:1176)
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: Can anyone explain 'dataservice' issue?'

PostPosted: Mon Apr 26, 2010 5:39 am
by ptalbot
Yes the localhost url would not match your certificate so this prevents your local client to connect, so if you use http://server:8080/servoy-client/servoy-client.jnlp on the server too it should work!