Smart Client: FileServerPlugin.java Error

Questions, answers, tips and ideas on Servoy Client

Smart Client: FileServerPlugin.java Error

Postby mark.finlay » Mon Aug 26, 2013 3:41 pm

Hello,

We are using Servoy 5.2.16 and recently encountered a scenario when using the Smart Client where FileServerPlugin throws an error.

This happens when a Smart Client network connection has been interrupted for a period of time and reconnects once network connectivity is restored. The application does seem to reconnect OK and does appear to work as normal with the exception of now not being able to stream files. The end user does not notice any difference until they attempt to upload/download a file.

When this is attempted, the following Java console log error is shown and the file streaming dialogue hangs:

ERROR - Debug - Throwable
java.lang.SecurityException: Rejected unauthenticated access
at com.servoy.extensions.plugins.file.FileServerPlugin.securityCheck(Unknown Source)


Closing down the Smart Client & logging back in restores full functionality. Note that this only seems to occur after losing the connection for a few minutes. If the connection is lost momentarily or for a short period, then it all seems to work as expected.

It seems that internally, the reconnected client authentication check that this plugin performs with the application server fails. Is there an internal timeout that occurs causing a previously authenticated client to lose its authenticated status?

Does anybody have any ideas about this issue?

Best regards,

Mark
User avatar
mark.finlay
 
Posts: 12
Joined: Thu Jun 14, 2012 12:07 pm

Re: Smart Client: FileServerPlugin.java Error

Postby ptalbot » Mon Aug 26, 2013 4:23 pm

Yes, the file plugin server component is only accepting files uploads/downloads from valid clients.
Meaning the clientID is passed with all calls to it and verified against the registered clients.
A timeout occur after 30 minutes by default (configurable in the Tomcat sever/conf/web.xml file).

It seems that somehow the client is still passing its old clientID to the server component but this clientID has been invalidated.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Smart Client: FileServerPlugin.java Error

Postby mark.finlay » Wed Aug 28, 2013 10:08 am

Hi Patrick,

Thanks for your helpful response. Your explanation sounds correct.

Does anybody know whether this has been resolved in Servoy versions 6 or 7?

This issue also occurs in one of the other plugins, the MailServer.java plugin. We noticed that the same error is raised when the connection has been disrupted, resumed and an email is initiated. The work around for that is to set mail.server.allowUnauthenticatedRMIAccess to true. This is not possible with the file plugin and is only a temporary work around rather than a solution.

Additionally, this problem was identified by users using laptop hibernation with active connections to the application server. From an end user point of view, at least the file upload/download not working is obvious for the end user, but the email not being sent is not so apparent.

Any input on this would be appreciated.

Mark
Asset Guardian Solutions Ltd
User avatar
mark.finlay
 
Posts: 12
Joined: Thu Jun 14, 2012 12:07 pm

Re: Smart Client: FileServerPlugin.java Error

Postby ptalbot » Wed Aug 28, 2013 8:12 pm

In Servoy 5.2, I'm afraid there's no workaround for the file plugin.
In Servoy 6.1+, you can bypass the security check for the file server plugin service by adding 'servoy.FileServerService' to the server property 'servoy.application_server.trustedRemotePlugins'.
Just be aware that when doing so any RMI client (which could potentially be any Java client with knowledge of the Open sources of the plugin) will have uploads/downloads capabilities on your server, meaning a potential security breach...
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Smart Client: FileServerPlugin.java Error

Postby Andrei Costescu » Mon Sep 16, 2013 9:56 am

Did you file a case for this?
If not, please do - it sounds like a bug.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Smart Client: FileServerPlugin.java Error

Postby mark.finlay » Tue Oct 01, 2013 5:16 pm

Hi Andrei,

I have now filed a case for this (SVY-5184).

Thanks,

Mark
Asset Guardian Solutions Ltd
User avatar
mark.finlay
 
Posts: 12
Joined: Thu Jun 14, 2012 12:07 pm

Re: Smart Client: FileServerPlugin.java Error

Postby rgansevles » Tue Oct 08, 2013 9:04 pm

This problem was already fixed in Servoy 6.1 and higher.

It is now backported to 5.2.17, 6.0.10.

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL


Return to Servoy Client

Who is online

Users browsing this forum: No registered users and 12 guests

cron