FileserverPlugin fails

Anyone know what this error is on servoy (5.2.1) startup:

2010-09-30 20:07 WrapperSimpleAppMain ERROR com.servoy.j2db.util.Debug Error occured loading server plugin class com.servoy.extensions.plugins.file.FileServerPlugin, error: null

We are having problems with one solution on a Windows 2k8R2x64 server. Been trying to trouble shoot for days. Other solutions work fine but this one says ‘can connect to solutionX’ after the login.

Any ideas?
what does this plug-in do? How can we diagnose why it’s sad :(

do you have any other logging?

it seems to be a null pointer exception when calling i guess initialize on the server side of portion of the FilePlugin (that handles the streaming)

what do you mean by other solutions work fine but 1 solution doesnt?
you mean client pc right? not the actual servoy solution?

I guess if 1 client cant connect to the server something else goes wrong check the java control panel and then the network settings to see if direct connection is enabled

you could also try to enable the tunnel (in http&socket mode)

We had exactly the same error on a server every time we restarted the windows service.

For us it was somehow linked to access rights of the logon account used to run the service. When the service runs under the default Local System account we get the error. When we changed the service to run under an Administrator user account the error disappeared.

I think in Windows Server 2008 (and maybe Windows 7) the Local System account has more restricted rights than in previous Windows versions and so it is better to run the Windows service under a local Admin user account.

For win7 I had to change the service to run under a logon account with the correct rights (admin for me). This corrected the error that you see.

Hi all,

yes, this can be 2 things:

1/ for the file plugin to be able to upload files in a directory on the server-side, the user that is launching the Servoy process (either by the command line or from a service/daemon) needs write access to that directory.

Now if you don’t use the new streamFilesToServer(), streamFilesFromServer(), convertToRemoteFile() and getRemoteFolderContents() methods, you can safely ignore this error… I will have a look at making the error message be more explicit.
I don’t think it’s a good idea not to log this error at all though because you will need it if you intend to use these capabilities and forgot to set up your server accordingly.

But to fix that, you can either:
a) run the server with a user that has admin rights (as some of you did), which you can consider might not be a good idea in terms of security, or
b) you can provide a path to a folder on your server where the ACL would be set to allow write access to the service running Servoy.

To provide that path, there is a new property that you can configure in servoy.properties or in the server admin plugins page:
have a look at the property under “File Plugin”, called ‘servoy.FileServerService.defaultFolder’, simply fill it with the path of your dedicated upload folder, restart your service and it will not complain anymore.

2/ even if you have write access, there can be a case where the plugin would also output an error…

That is if you didn’t provide a default directory in the server admin plugins properties or directly in the servoy.properties file.
In that case, the plugin’s server service (FileServerPlugin), will attempt to find a default path to download and upload to.
This path is supposed to be /application_server/server/webapps/ROOT/uploads/ (it will attempt to create that last folder if it doesn’t exist already)

To find that default path, the only thing it can rely on is the path of the executable that launched Servoy (its starting folder if you prefer), by default this is /application_server/ if you launched from the command line’s bat or sh - if you launched Developer it will be /developer/ (for Win/Linux) and on Mac OS X it will be /developer/Servoy.app/Contents/MacOS/

Now launched from a service, it might well be that the starting path is different, and I will have a look at it. Maybe there is also a way to configure wrapper.conf on windows to tell the service to start the process from a certain path, on linux in init.d I believe, and on Mac OS X to set that path in the plist of the daemon.

I will have a look and see how, taking into account these platform differences I can reliably find the correct path in all cases.
But one thing is for sure, Servoy will need write access to that folder!

Hope this helps,

thanks all. changed the service login account and the error has gone away :)

Hi all,

I manage a solution in wich I can save some attachments into the db BUT when the db dimension became too big than the simple record navigation became sooooo slowly!
So to solve this slowness problem I have decided to use a remote folder in wich I want save my files.

The company that use my program is big,so the user that will use it can change(this complicates to able permission for every user to the server directory).

My question is: If I want configure only one user with read/write permission(‘attach_user’ for example) and launch every servoy client with this user(like RUN AS) without configure the client one by one…
does exist a servoy server property in which I can specify this?

Thanks in advance

Marco

Marco,

The users who are running the clients do not need permission to the file server folder to stream files to it. It is the user account that the Servoy server runs under that needs the permissions. If the server runs as a Windows Service then it is the Log On account of the service that needs the permissions.

So regardless of how many client users you have who need to access the files, you only need one service account user with the permissions to the file server directory.

Ah ok!

By reading the previus post I didn’t understood well!

Thank you Iain!