You are viewing limited content. For full access, please sign in.

Question

Question

Laserfiche API On Premise upload failing

asked on July 2

I am using the Laserfiche API on premise to upload a document and it is generating the following error:

 "setEdoc": {
      "exceptions": [
        {
          "errorCode": -2147024816,
          "errorClass": "extraErrorException",
          "statusCode": 409,
          "operationId": "2c32e8e12a2e4c0798524ad7618d322e",
          "message": "The file exists. [-2147024816]",
          "errorSource": "Laserfiche Server"
        }
      ]
    },

Also, I see the document in Laserfiche but the files size is 0 bytes.

When I switch to my Laserfiche 10.3 server it saves properly and I see that the entire document is available and not 0 bytes.

 

All I am doing is changing the LaserficheServerName variable in the appsettings.json file.

I am passing my admin account on both instances so would not be a security issue.  Also saw nothing in the Event logs.  These are brand new documents so they do not exist. 

[INFO+0ms(12)][POST] https://site/LFRepositoryAPI/v1/Repositories/MedicaDT/Entries/577933/Application%20Security%20Information%20-%20Be%20Safe%20and%20Secure%20SDLC.pptx?autoRename=true
[INFO+12ms(12)]Got sessionkey from contextAuthorization header
[INFO+1s 566ms(10)]EntryConnector GetOperationExceptions | Exception found The file exists. [-2147024816]
[INFO+1s 570ms(10)]EntryConnector GetOperationResults | EntryId : 624574
[INFO+1s 570ms(10)]EntryConnector GetOperationResults | Created with : 1 fields
[INFO+1s 570ms(10)]EntryConnector GetOperationResults | Created with : template 'Supplemental'
[INFO+1s 580ms(10)]EntryController UploadEdoc | PartialSuccess: True
[INFO+1s 623ms(13)]Completed at 2025-07-02T18:04:23.0409067Z LowSecondOp.
[LFRepositoryAPI]HTTP Reponse: 409.[a0d9afca9c2c49c8a4e184ad0c3c482e][0!0](1s 623ms)>[Warning][-1][4000066b-0003-e300-b63f-84710c7967bb][system]

What could be causing this? 

0 0

Answer

SELECTED ANSWER
replied two days ago

I created another volume for the repository and set all uploads to use that volume to that one and it worked as it should. 

Would have been nice to have any indication of what failed but at least that is a solution to this issue. 

1 0

Replies

replied on July 2

Was this repository recently restored from a backup or copied from another repository? If you set another volume, does the document creation succeed?

1 0
replied on July 2

I would compare the 'Supplemental' template in both environments to see if there are differences in terms of required fields or list values.  You could also try to creating the entry without applying a template to confirm that it is indeed related to the template application.  Since it mentions that the entry already exists when you are creating the entry, I would also check whether there may be a folder in the same path with the same name as the entry being created (eg. a folder named "Application Security Information - Be Safe and Secure SDLC"

0 0
SELECTED ANSWER
replied two days ago

I created another volume for the repository and set all uploads to use that volume to that one and it worked as it should. 

Would have been nice to have any indication of what failed but at least that is a solution to this issue. 

1 0
replied two days ago

Likely your database and volume are out of sync with the database being behind the volume on disk (so when the server gets the next file name in the sequence from the database and attempts to create it on disk, it can't because the file is there already in the volume. The server fails the operation to protect from data loss). That's why i was asking whether the repository was restored from a backup or a copy of an existing repository. 

Tech Support can provide a tool to check the repository integrity and inventory any missing or additional files.

1 0
replied one day ago

Makes sense. The database was copied onto a new database, and the volumes were copied onto another server.  We are moving from 10.3 to 12 as the 10.3 servers are on Windows 2012.  

How would I get that tool to check?  We are planning of cutting over to Laserfiche 12 in Prod by the end of September. 

 

 

 

 

0 0
replied one day ago

Your solution provider can get the tool from Tech Support.

0 0
replied on July 2

I submitted it without a template as well and got the same thing.  I tried different files and names to make sure I did not have a folder name conflict.  I am an admin on both Laserfiche instances and used that as my token so that should not be the issue.  

0 0
replied on July 2

I tried to write to another repository and that worked.  But have to figure out what could be causing the issue between repositories on the same server.  Logging as admin on both.

0 0
replied on July 2

What version of Laserfiche server are you using when it does not work (shows 0 bytes)?

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.