Event calling bat file - error 259

General help on how to use Cerberus. Questions on how a particular feature works, how to use feature x with feature y... Please read the "How to use this forum" article before posting.
Post Reply
richard205
Posts: 2
Joined: Tue Jun 25, 2013 5:46 am

Event calling bat file - error 259

Post by richard205 » Thu Sep 28, 2017 5:59 am

Hi,

I've been using Cerberus now for almost 4 years. But have come across a situation which I've been unable to solve as yet.

My scenario is this.

DMZ
This server is not domain joined. Cerberus was installed using the local administrator account and runs under the "Local System" account

Files are deposited from external source to server using SFTP.
On logoff, the event manager calls an event target e,g. (c:\events\testbooks.bat)
When the log off occurs, I see the following in the log pane.

Match for rule 'testbookmove' : Executing action External Process
Invoking process 'C:\events\testbooks.bat' with command line ''
Monitor for process 'C:\events\testbooks.bat' timed out
Process C:\events\testbooks.bat' executed with return code : 259 (failure)

If i run the testbooks.bat file from a command line manually this runs all of the commands within without issue.
The batch file essentially transfers a file(s) to an internal SFTP server (another Cerberus FTP server. At the same time it creates an archived copy elsewhere on the server in the DMZ

Any help on this would be much appreciated.

Many thanks
Richard

pacman
Senior User
Posts: 187
Joined: Thu Apr 28, 2016 1:54 pm

Re: Event calling bat file - error 259

Post by pacman » Thu Sep 28, 2017 11:37 am

Hello, Ricahard.

It could be a permission issue, does the Cerberus Service in windows have permission to execute the script?

richard205
Posts: 2
Joined: Tue Jun 25, 2013 5:46 am

Re: Event calling bat file - error 259

Post by richard205 » Fri Sep 29, 2017 6:05 am

Hi Pacman,

it does seem like its permissions.

This morning, I've changed Cerberus to run from Local System (tried with and without desktop integration), to a user account with logon as a service and at admin level. This now runs and completes each of the elements within the batch file.

I forgot to mention in the batch file, there is a call to another product to SFTP to the internal facing Cerberus SFTP server. I think this is where the 259 message is coming from.
Having created separate event targets for each of the separate lines in the original batch file, running those sequentially in the event rule it ties in with that call of the third party product.

I do still get a 259 message in the log file. But for now, the service processes the files and for my own sanity its working.

Will update this thread once i get that error code sorted out.

many thanks
Richard

Post Reply